flip Settings and About

This commit is contained in:
tibbi 2016-07-26 20:21:24 +02:00
parent 2d4174c23e
commit 36703fd9e4
16 changed files with 32 additions and 31 deletions

View File

@ -69,12 +69,12 @@
<activity
android:name=".activities.AboutActivity"
android:label="@string/about"
android:parentActivityName=".activities.MainActivity"/>
android:parentActivityName=".activities.SettingsActivity"/>
<activity
android:name=".activities.SettingsActivity"
android:label="@string/settings"
android:parentActivityName=".activities.AboutActivity"/>
android:parentActivityName=".activities.MainActivity"/>
<receiver
android:name=".HardwareShutterReceiver">

View File

@ -7,8 +7,6 @@ import android.net.Uri;
import android.os.Bundle;
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;
@ -41,24 +39,6 @@ public class AboutActivity extends SimpleActivity {
setupRateUs();
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu, 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);

View File

@ -55,7 +55,7 @@ public class MainActivity extends SimpleActivity
@BindView(R.id.toggle_photo_video) ImageView mTogglePhotoVideoBtn;
@BindView(R.id.shutter) ImageView mShutterBtn;
@BindView(R.id.video_rec_curr_timer) TextView mRecCurrTimer;
@BindView(R.id.about) View mAboutBtn;
@BindView(R.id.settings) View mAboutBtn;
@BindView(R.id.last_photo_video_preview) ImageView mLastPhotoVideoPreview;
private static final int CAMERA_STORAGE_PERMISSION = 1;
@ -303,9 +303,9 @@ public class MainActivity extends SimpleActivity
}
}
@OnClick(R.id.about)
public void launchAbout() {
final Intent intent = new Intent(getApplicationContext(), AboutActivity.class);
@OnClick(R.id.settings)
public void launchSettings() {
final Intent intent = new Intent(getApplicationContext(), SettingsActivity.class);
startActivity(intent);
}

View File

@ -1,9 +1,12 @@
package com.simplemobiletools.camera.activities;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.TaskStackBuilder;
import android.support.v7.widget.AppCompatSpinner;
import android.support.v7.widget.SwitchCompat;
import android.view.Menu;
import android.view.MenuItem;
import com.simplemobiletools.camera.Config;
import com.simplemobiletools.camera.R;
@ -40,6 +43,24 @@ public class SettingsActivity extends SimpleActivity {
setupMaxVideoResolution();
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.about:
final Intent intent = new Intent(getApplicationContext(), AboutActivity.class);
startActivity(intent);
return true;
default:
return super.onOptionsItemSelected(item);
}
}
private void setupDarkTheme() {
mDarkThemeSwitch.setChecked(mConfig.getIsDarkTheme());
}

View File

@ -17,21 +17,21 @@
android:layout_height="wrap_content"/>
<ImageView
android:id="@+id/about"
android:id="@+id/settings"
android:layout_width="@dimen/icon_size"
android:layout_height="@dimen/icon_size"
android:layout_alignParentRight="true"
android:layout_marginRight="@dimen/side_icon_padding"
android:layout_marginTop="@dimen/side_icon_padding"
android:padding="@dimen/side_icon_padding"
android:src="@mipmap/about"/>
android:src="@mipmap/settings"/>
<ImageView
android:id="@+id/toggle_photo_video"
android:layout_width="@dimen/icon_size"
android:layout_height="@dimen/icon_size"
android:layout_alignParentRight="true"
android:layout_below="@+id/about"
android:layout_below="@+id/settings"
android:layout_marginRight="@dimen/side_icon_padding"
android:padding="@dimen/side_icon_padding"
android:src="@mipmap/videocam"/>

View File

@ -2,7 +2,7 @@
<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"
android:id="@+id/about"
android:title="@string/about"
app:showAsAction="never"/>
</menu>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 801 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 837 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB