move the Settings btn to the main screen
This commit is contained in:
parent
0e2845312c
commit
b1e3943dce
4 changed files with 8 additions and 30 deletions
|
@ -8,8 +8,6 @@ import android.os.Bundle;
|
||||||
import android.support.v7.app.AppCompatActivity;
|
import android.support.v7.app.AppCompatActivity;
|
||||||
import android.text.Html;
|
import android.text.Html;
|
||||||
import android.text.method.LinkMovementMethod;
|
import android.text.method.LinkMovementMethod;
|
||||||
import android.view.Menu;
|
|
||||||
import android.view.MenuItem;
|
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
@ -42,24 +40,6 @@ public class AboutActivity extends AppCompatActivity {
|
||||||
setupRateUs();
|
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() {
|
private void setupEmail() {
|
||||||
final String email = mRes.getString(R.string.email);
|
final String email = mRes.getString(R.string.email);
|
||||||
final String appName = mRes.getString(R.string.app_name);
|
final String appName = mRes.getString(R.string.app_name);
|
||||||
|
|
|
@ -108,9 +108,11 @@ public class MainActivity extends AppCompatActivity
|
||||||
@Override
|
@Override
|
||||||
public boolean onOptionsItemSelected(MenuItem item) {
|
public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
switch (item.getItemId()) {
|
switch (item.getItemId()) {
|
||||||
|
case R.id.settings:
|
||||||
|
startActivity(new Intent(getApplicationContext(), SettingsActivity.class));
|
||||||
|
return true;
|
||||||
case R.id.about:
|
case R.id.about:
|
||||||
final Intent intent = new Intent(getApplicationContext(), AboutActivity.class);
|
startActivity(new Intent(getApplicationContext(), AboutActivity.class));
|
||||||
startActivity(intent);
|
|
||||||
return true;
|
return true;
|
||||||
default:
|
default:
|
||||||
return super.onOptionsItemSelected(item);
|
return super.onOptionsItemSelected(item);
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
|
<item
|
||||||
|
android:id="@+id/settings"
|
||||||
|
android:title="@string/settings"
|
||||||
|
app:showAsAction="never"/>
|
||||||
<item
|
<item
|
||||||
android:id="@+id/about"
|
android:id="@+id/about"
|
||||||
android:title="@string/about"
|
android:title="@string/about"
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
|
||||||
<item
|
|
||||||
android:id="@+id/settings"
|
|
||||||
android:title="@string/settings"
|
|
||||||
app:showAsAction="never"/>
|
|
||||||
</menu>
|
|
Loading…
Reference in a new issue