Witam mam pytanie odnośne androida. Konkretnie nie działa pętla próbowałem już kilka razy lecz obojętnie jaka metoda aktywność się nie zmienia. Czy jest jakiś błąd w kodzie źródłowym ?
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Thread logoTimer =new Thread(){
public void run(){
try{
short logoTimer = 0;
while(logoTimer <5000){
sleep(100);
logoTimer = (short) (logoTimer +100);
}
Intent intent = new Intent("com.example.hubert.changecollorv1");
startActivity(intent);
} catch (InterruptedException e1) {
e1.printStackTrace();
}
finally {
finish();
}
};
};
};