java - New Activity from SherlockFragment -
When I click on to open a new activity and try to set up a program designed button to putExtra But the activity will not be so, even after the inauguration, it stays for 1 second and then accidents
button code:. Blog .setOnClickListener (New View. OnClickListener) {Public Zero onClick (see v) {Log.e ("button", "clicked blog"); I = New meaning (getSherlockActivity (), Soundcloud.class); startActivity (i);}}); New class: Layout: Manifest xml: Logcat: It should be done
Public class Soundcloud activity extends {@Override protected Zero onCreate (bundled savedInstanceState) {//this.requestWindowFeature(Window.FEATURE_NO_TITLE) ; Super.onCreate (savedInstanceState); //setRequestedOrientation (ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); Logs. E ("activity", "in action"); SetContentView (R.layout.soundcloud); }}
& lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; LinearLayout xmlns: android = "Http://schemaskandroidkcom/apk/res/android" Android: Layout_width = "Match_parent" Android: Layout_height = "Match_parent" android: orientation = "vertical" & gt; & Lt; / LinearLayout & gt;
& lt; Manifest xmlns: android = "http://schemas.android.com/apk/res/android" package = "com.example. ********" Android: versionCode = "1" Android: versionName = " 1.0 "& gt; & Lt; Use-SDK Android: minSdkVersion = "8" Android: targetSdkVersion = "19" /> & Lt; Permission Android: name = "android.permission.INTERNET" /> & Lt; Usage-permission Android: name = "android.permission.INTERNET" /> & Lt; Permission Android: name = "android.permission.ACCESS_NETWORK_STATE" /> & Lt; Usage-permission Android: name = "android.permission.ACCESS_NETWORK_STATE" /> & Lt; Usage-permission Android: name = "android.permission.ACCESS_WIFI_STATE" / & gt; & Lt; Android Android: allowBackup = "true" android: icon = "@draubable / IC_Luncher" Android: label = "@ string / app_name" Android: Theme = "@ Style / Aaptim" & gt; & Lt; Activity Android: name = "com. ***** ***. Main activity" Android: label = "@ string / ap_name" & gt; & Lt; Intent-Filter & gt; & Lt; Action Android: name = "android.intent.action.MAIN" /> & Lt; Category android: name = "android.intent.category.LAUNCHER" /> & Lt; / Intent-Filter & gt; & Lt; / Activity & gt; & Lt; Activity Android: name = "com. *****. *** VOICOICOD" Android: label = "blog" & gt; & Lt; / Activity & gt; & Lt; / Application & gt; & Lt; / Reveal & gt;
07-24 22: 27: 22.310: E / pass 2.2 (24015): Blog - Success of Connection 07-24 22: 27: 23.990: E / button (24015): Clicked blog 07-24 22: 27: 24.280: E / activity (24015): activity in 07-24 22: 27: 25.080: w / dalvikvm (24015): threadid = 1: Exit with thread unexplained exception (group = 0x40f21438)
blog [i] .setOnClickListener (New View. OnClickListener) {Public Zero onClick (see v) {Log.e ("button", "clicked blog" ); I mean = new intent (Ge TActivity (), Soundcloud.class); getActivity (). StartActivity (i);}});
Comments
Post a Comment