From fce2433a0008fee35bc8a9c0e651ff3552666412 Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 18 Jul 2016 18:58:22 +0200 Subject: [PATCH] move the Settings btn to the main screen --- .../filemanager/activities/AboutActivity.java | 20 ------------------- .../filemanager/activities/MainActivity.java | 6 ++++-- app/src/main/res/menu/menu.xml | 4 ++++ app/src/main/res/menu/menu_about.xml | 8 -------- 4 files changed, 8 insertions(+), 30 deletions(-) delete mode 100644 app/src/main/res/menu/menu_about.xml diff --git a/app/src/main/java/com/simplemobiletools/filemanager/activities/AboutActivity.java b/app/src/main/java/com/simplemobiletools/filemanager/activities/AboutActivity.java index 0e3d7bf5..d9c22c31 100644 --- a/app/src/main/java/com/simplemobiletools/filemanager/activities/AboutActivity.java +++ b/app/src/main/java/com/simplemobiletools/filemanager/activities/AboutActivity.java @@ -8,8 +8,6 @@ import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.text.Html; import android.text.method.LinkMovementMethod; -import android.view.Menu; -import android.view.MenuItem; import android.view.View; import android.widget.TextView; @@ -42,24 +40,6 @@ public class AboutActivity extends AppCompatActivity { setupRateUs(); } - @Override - public boolean onCreateOptionsMenu(Menu menu) { - getMenuInflater().inflate(R.menu.menu_about, menu); - return true; - } - - @Override - public boolean onOptionsItemSelected(MenuItem item) { - switch (item.getItemId()) { - case R.id.settings: - final Intent intent = new Intent(getApplicationContext(), SettingsActivity.class); - startActivity(intent); - return true; - default: - return super.onOptionsItemSelected(item); - } - } - private void setupEmail() { final String email = mRes.getString(R.string.email); final String appName = mRes.getString(R.string.app_name); diff --git a/app/src/main/java/com/simplemobiletools/filemanager/activities/MainActivity.java b/app/src/main/java/com/simplemobiletools/filemanager/activities/MainActivity.java index d6520568..339e379e 100644 --- a/app/src/main/java/com/simplemobiletools/filemanager/activities/MainActivity.java +++ b/app/src/main/java/com/simplemobiletools/filemanager/activities/MainActivity.java @@ -74,9 +74,11 @@ public class MainActivity extends AppCompatActivity implements ItemsFragment.Ite @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { + case R.id.settings: + startActivity(new Intent(getApplicationContext(), SettingsActivity.class)); + return true; case R.id.about: - final Intent intent = new Intent(getApplicationContext(), AboutActivity.class); - startActivity(intent); + startActivity(new Intent(getApplicationContext(), AboutActivity.class)); return true; default: return super.onOptionsItemSelected(item); diff --git a/app/src/main/res/menu/menu.xml b/app/src/main/res/menu/menu.xml index 0cce6d24..815619cd 100644 --- a/app/src/main/res/menu/menu.xml +++ b/app/src/main/res/menu/menu.xml @@ -1,6 +1,10 @@ + - - -