fix compile time errors from migrating activity to fragment.