Skip to content

Commit 36703fd

Browse files
committed
flip Settings and About
1 parent 2d4174c commit 36703fd

16 files changed

Lines changed: 32 additions & 31 deletions

File tree

app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,12 @@
6969
<activity
7070
android:name=".activities.AboutActivity"
7171
android:label="@string/about"
72-
android:parentActivityName=".activities.MainActivity"/>
72+
android:parentActivityName=".activities.SettingsActivity"/>
7373

7474
<activity
7575
android:name=".activities.SettingsActivity"
7676
android:label="@string/settings"
77-
android:parentActivityName=".activities.AboutActivity"/>
77+
android:parentActivityName=".activities.MainActivity"/>
7878

7979
<receiver
8080
android:name=".HardwareShutterReceiver">

app/src/main/java/com/simplemobiletools/camera/activities/AboutActivity.java

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
import android.os.Bundle;
88
import android.text.Html;
99
import android.text.method.LinkMovementMethod;
10-
import android.view.Menu;
11-
import android.view.MenuItem;
1210
import android.view.View;
1311
import android.widget.TextView;
1412

@@ -41,24 +39,6 @@ protected void onCreate(Bundle savedInstanceState) {
4139
setupRateUs();
4240
}
4341

44-
@Override
45-
public boolean onCreateOptionsMenu(Menu menu) {
46-
getMenuInflater().inflate(R.menu.menu, menu);
47-
return true;
48-
}
49-
50-
@Override
51-
public boolean onOptionsItemSelected(MenuItem item) {
52-
switch (item.getItemId()) {
53-
case R.id.settings:
54-
final Intent intent = new Intent(getApplicationContext(), SettingsActivity.class);
55-
startActivity(intent);
56-
return true;
57-
default:
58-
return super.onOptionsItemSelected(item);
59-
}
60-
}
61-
6242
private void setupEmail() {
6343
final String email = mRes.getString(R.string.email);
6444
final String appName = mRes.getString(R.string.app_name);

app/src/main/java/com/simplemobiletools/camera/activities/MainActivity.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public class MainActivity extends SimpleActivity
5555
@BindView(R.id.toggle_photo_video) ImageView mTogglePhotoVideoBtn;
5656
@BindView(R.id.shutter) ImageView mShutterBtn;
5757
@BindView(R.id.video_rec_curr_timer) TextView mRecCurrTimer;
58-
@BindView(R.id.about) View mAboutBtn;
58+
@BindView(R.id.settings) View mAboutBtn;
5959
@BindView(R.id.last_photo_video_preview) ImageView mLastPhotoVideoPreview;
6060

6161
private static final int CAMERA_STORAGE_PERMISSION = 1;
@@ -303,9 +303,9 @@ private void handleShutter() {
303303
}
304304
}
305305

306-
@OnClick(R.id.about)
307-
public void launchAbout() {
308-
final Intent intent = new Intent(getApplicationContext(), AboutActivity.class);
306+
@OnClick(R.id.settings)
307+
public void launchSettings() {
308+
final Intent intent = new Intent(getApplicationContext(), SettingsActivity.class);
309309
startActivity(intent);
310310
}
311311

app/src/main/java/com/simplemobiletools/camera/activities/SettingsActivity.java

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
package com.simplemobiletools.camera.activities;
22

3+
import android.content.Intent;
34
import android.os.Bundle;
45
import android.support.v4.app.TaskStackBuilder;
56
import android.support.v7.widget.AppCompatSpinner;
67
import android.support.v7.widget.SwitchCompat;
8+
import android.view.Menu;
9+
import android.view.MenuItem;
710

811
import com.simplemobiletools.camera.Config;
912
import com.simplemobiletools.camera.R;
@@ -40,6 +43,24 @@ protected void onCreate(Bundle savedInstanceState) {
4043
setupMaxVideoResolution();
4144
}
4245

46+
@Override
47+
public boolean onCreateOptionsMenu(Menu menu) {
48+
getMenuInflater().inflate(R.menu.menu, menu);
49+
return true;
50+
}
51+
52+
@Override
53+
public boolean onOptionsItemSelected(MenuItem item) {
54+
switch (item.getItemId()) {
55+
case R.id.about:
56+
final Intent intent = new Intent(getApplicationContext(), AboutActivity.class);
57+
startActivity(intent);
58+
return true;
59+
default:
60+
return super.onOptionsItemSelected(item);
61+
}
62+
}
63+
4364
private void setupDarkTheme() {
4465
mDarkThemeSwitch.setChecked(mConfig.getIsDarkTheme());
4566
}

app/src/main/res/layout/activity_main.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,21 @@
1717
android:layout_height="wrap_content"/>
1818

1919
<ImageView
20-
android:id="@+id/about"
20+
android:id="@+id/settings"
2121
android:layout_width="@dimen/icon_size"
2222
android:layout_height="@dimen/icon_size"
2323
android:layout_alignParentRight="true"
2424
android:layout_marginRight="@dimen/side_icon_padding"
2525
android:layout_marginTop="@dimen/side_icon_padding"
2626
android:padding="@dimen/side_icon_padding"
27-
android:src="@mipmap/about"/>
27+
android:src="@mipmap/settings"/>
2828

2929
<ImageView
3030
android:id="@+id/toggle_photo_video"
3131
android:layout_width="@dimen/icon_size"
3232
android:layout_height="@dimen/icon_size"
3333
android:layout_alignParentRight="true"
34-
android:layout_below="@+id/about"
34+
android:layout_below="@+id/settings"
3535
android:layout_marginRight="@dimen/side_icon_padding"
3636
android:padding="@dimen/side_icon_padding"
3737
android:src="@mipmap/videocam"/>

app/src/main/res/menu/menu.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<menu xmlns:android="http://schemas.android.com/apk/res/android"
33
xmlns:app="http://schemas.android.com/apk/res-auto">
44
<item
5-
android:id="@+id/settings"
6-
android:title="@string/settings"
5+
android:id="@+id/about"
6+
android:title="@string/about"
77
app:showAsAction="never"/>
88
</menu>
-1.15 KB
Binary file not shown.
1.36 KB
Loading
-801 Bytes
Binary file not shown.
837 Bytes
Loading

0 commit comments

Comments
 (0)