Old Welcome removed
This commit is contained in:
parent
cb24d47868
commit
8298506d51
2 changed files with 0 additions and 119 deletions
|
@ -63,20 +63,6 @@ public class MainActivity extends BaseActivity implements NavigationView.OnNavig
|
|||
|
||||
NewLevelManager newLevelManager = NewLevelManager.getInstance(getApplicationContext(), settings);
|
||||
|
||||
// Is this the very first time we start this app?
|
||||
boolean firstStart = settings.getBoolean("firstStart", true);
|
||||
if(firstStart) {
|
||||
// preload some levels so we don't have to generate as many and we can start playing right away.
|
||||
newLevelManager.loadFirstStartLevels();
|
||||
|
||||
WelcomeDialog welcomeDialog = new WelcomeDialog();
|
||||
welcomeDialog.show(getFragmentManager(), "WelcomeDialog");
|
||||
|
||||
SharedPreferences.Editor editor = settings.edit();
|
||||
editor.putBoolean("firstStart", false);
|
||||
editor.commit();
|
||||
}
|
||||
|
||||
// check if we need to pre generate levels.
|
||||
newLevelManager.checkAndRestock();
|
||||
|
||||
|
@ -431,32 +417,4 @@ public class MainActivity extends BaseActivity implements NavigationView.OnNavig
|
|||
}
|
||||
}
|
||||
|
||||
public static class WelcomeDialog extends DialogFragment {
|
||||
|
||||
@Override
|
||||
public void onAttach(Activity activity) {
|
||||
super.onAttach(activity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
||||
|
||||
LayoutInflater i = getActivity().getLayoutInflater();
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
|
||||
|
||||
builder.setView(i.inflate(R.layout.welcome_dialog, null));
|
||||
builder.setIcon(R.mipmap.ic_launcher_nopfa);
|
||||
builder.setTitle(getActivity().getString(R.string.app_name_long));
|
||||
builder.setPositiveButton(getActivity().getString(R.string.okay), null);
|
||||
builder.setNegativeButton(getActivity().getString(R.string.view_help), new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
Intent intent = new Intent(getActivity(),HelpActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
|
||||
return builder.create();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,77 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="@dimen/activity_horizontal_margin">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/welcome" />
|
||||
<Space
|
||||
android:layout_width="10dp"
|
||||
android:layout_height="20dp" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textStyle="bold"
|
||||
android:text="@string/field_select_description_headline"
|
||||
style="@style/Base.DialogWindowTitle.AppCompat"/>
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layoutDirection="ltr"
|
||||
android:orientation="horizontal">
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/ic_keyboard_arrow_left_black_24dp"/>
|
||||
<ImageView
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/icon_default_9x9"/>
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/ic_keyboard_arrow_right_black_24dp"/>
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="@string/field_select_description"/>
|
||||
<Space
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textStyle="bold"
|
||||
android:text="@string/difficulty_description_headline"
|
||||
style="@style/Base.DialogWindowTitle.AppCompat"/>
|
||||
<RatingBar
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/difficultyBar"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:isIndicator="true"
|
||||
android:numStars="4"
|
||||
android:rating="1"
|
||||
android:stepSize="1"
|
||||
style="@style/RatingBar"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="@string/difficulty_description"/>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
Loading…
Reference in a new issue