public class SpeedFragment extends Fragment {
View view;
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable final Bundle savedInstanceState) {
return inflater.inflate(R.layout.fragment_speed, container, false);
new Thread() {
public void run() {
try {
sleep(1500);
} catch (Throwable t) {
}
try {
BitmapFactory.Options options = new BitmapFactory.Options();
final ImageView v = findViewById(R.id.testBackground);
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_speed, container, false);
ImageView v = view.findViewById(R.id.testBackground);
// Add your code//
return view;
}