Note that there are some explanatory texts on larger screens.

plurals
  1. POSkipped Frames On Choreographer On Changing Background Colors
    primarykey
    data
    text
    <p>Hi im trying to build an app which turn screen to some thing like flash lights or police siren .tested on galaxy gio with 2.3 android on it .on 2.3 + devices it stucks on first color. the error on logcat is skipped frames too much work for an activity ! ive tried to reduce the delay but it wont work.it only working on 4.0 + android version what should i do ?</p> <pre><code>public class MainActivity extends Activity { RelativeLayout soli; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //full screeen requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); //full screen setContentView(R.layout.activity_main); //brightness full WindowManager.LayoutParams lp = getWindow().getAttributes(); lp.screenBrightness = 100 / 100.0f; //brightness full soli = (RelativeLayout) findViewById(R.id.soli); } public void soheil(){ final RelativeLayout soli = ((RelativeLayout) findViewById(R.id.soli)); ColorDrawable f = new ColorDrawable(0xff00ff00); ColorDrawable f2 = new ColorDrawable(0xffff0000); ColorDrawable f3 = new ColorDrawable(0xff0000ff); ColorDrawable f4 = new ColorDrawable(0xff0000ff); AnimationDrawable a = new AnimationDrawable(); int DELAY=1500; a.addFrame(f, DELAY); a.addFrame(f2, DELAY); a.addFrame(f3, DELAY); a.addFrame(f4, DELAY); a.setOneShot(false); soli.setBackgroundDrawable(a); // is deprecated API 16 // soli.setBackground(a); // API 16 a.start(); } @Override protected void onStart() { super.onStart();soheil(); } @Override protected void onDestroy() { super.onDestroy(); } @Override protected void onResume() { super.onResume(); } @Override protected void onPause() { super.onDestroy(); } @Override protected void onStop() { super.onDestroy(); } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload