я получаю черный экран с именем приложения в момент запуска приложения в течение первого действия, как решить это пожалуйста предложить мне ..Черный экран во время запуска приложения
I am getting black screen with application name at the time of launching application over the first activity how to resolve it please suggest me..
/** Вызывается, когда активность сначала создается. */
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
ctx = this;
setVolumeControlStream(AudioManager.STREAM_MUSIC);
requestWindowFeature(Window.FEATURE_NO_TITLE);
Intent i = getIntent();
if (null == i || null == i.getExtras() ||
!i.getExtras().containsKey("levels")) {
activityCustomStarted = false;
setContentView(R.layout.main);
mGameView = (DroidGameView)findViewById(R.id.game);
} else {
SharedPreferences sp = getSharedPreferences(
FrozenDroid.PREFS_NAME, Context.MODE_PRIVATE);
int startingLevel = sp.getInt("levelCustom", 0);
int startingLevelIntent = i.getIntExtra("startingLevel", -2);
startingLevel = (startingLevelIntent == -2) ?
startingLevel : startingLevelIntent;
activityCustomStarted = true;
mGameView = new DroidGameView(this, i.getExtras().getByteArray("levels"),
startingLevel);
setContentView(mGameView);
}
mGameThread = mGameView.getThread();
if (savedInstanceState != null) {
mGameThread.restoreState(savedInstanceState);
}
mGameView.requestFocus();
setFullscreen();
}
XML является
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<com.shagunstudio.bubbleshoot.DroidGameView
android:id="@+id/game"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
</FrameLayout>
активность в menifest
<activity
android:name="com.shagunstudio.bubbleshoot.FrozenDroid"
android:alwaysRetainTaskState="true"
android:configChanges="orientation|keyboard"`enter code here`
android:label="@string/app_name"
android:launchMode="singleInstance"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.FrozenDroid" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter>
<action android``:name="com.shagunstudio.bubbleshoot.GAME" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
Пожалуйста, внесите свой код здесь, чтобы мы могли вам помочь. –