I made a simple android to demonstrate bursts, there are two steps in this, but after the screen saver program stopped working ... please help me with this.
my code is:
splash.java
package com.esp.therisemethod.ui; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import com.esp.therisemethod.R; import com.esp.therisemethod.util.Log; public class SplashActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_splash); Thread splashThread = new Thread() { public void run() { try { sleep(2000); } catch (InterruptedException e) { Log.error(this.getClass() + "::: OnCreate Thread :::", e); } Intent intent = null; intent = new Intent(SplashActivity.this, Registration.class); startActivity(intent); finish(); } }; splashThread.start(); } }
registration.java
package com.esp.therisemethod.ui; import android.app.Activity; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import com.esp.therisemethod.R; import com.esp.therisemethod.uc.Header; public class Registration extends Activity implements OnClickListener{ Button bt_login,bt_Reg; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_registration); bt_login =(Button)findViewById(R.id.bt_login); bt_Reg=(Button)findViewById(R.id.bt_reg); } @Override public void onClick(View v) {
Logcat
06-26 06:09:22.635: E/Trace(2371): error opening trace file: No such file or directory (2) 06-26 06:09:23.055: D/dalvikvm(2371): GC_FOR_ALLOC freed 34K, 7% free 2408K/2588K, paused 45ms, total 51ms 06-26 06:09:23.096: I/dalvikvm-heap(2371): Grow heap (frag case) to 5.264MB for 2908176-byte allocation 06-26 06:09:23.155: D/dalvikvm(2371): GC_FOR_ALLOC freed 1K, 4% free 5247K/5432K, paused 50ms, total 50ms 06-26 06:09:23.225: D/dalvikvm(2371): GC_CONCURRENT freed <1K, 4% free 5246K/5432K, paused 9ms+15ms, total 74ms 06-26 06:09:23.597: D/dalvikvm(2371): GC_FOR_ALLOC freed <1K, 4% free 5246K/5432K, paused 30ms, total 30ms 06-26 06:09:23.615: I/dalvikvm-heap(2371): Grow heap (frag case) to 6.497MB for 1292972-byte allocation 06-26 06:09:23.755: D/dalvikvm(2371): GC_CONCURRENT freed 0K, 3% free 6509K/6696K, paused 74ms+15ms, total 142ms 06-26 06:09:24.025: D/gralloc_goldfish(2371): Emulator without GPU emulation detected. 06-26 06:09:26.375: D/AndroidRuntime(2371): Shutting down VM 06-26 06:09:26.395: W/dalvikvm(2371): threadid=1: thread exiting with uncaught exception (group=0x40a71930) 06-26 06:09:26.905: E/AndroidRuntime(2371): FATAL EXCEPTION: main 06-26 06:09:26.905: E/AndroidRuntime(2371): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.esp.therisemethod/com.esp.therisemethod.ui.Registration}: android.view.InflateException: Binary XML file line
please help me ... thanx in advance
source share