mirror of
https://github.com/tateisu/SubwayTooter
synced 2025-01-29 18:19:22 +01:00
アプリ設定に「投稿画面のボタンバーを上端に表示」を追加
This commit is contained in:
parent
b91bbdcfaa
commit
4dc139b6d9
@ -9,8 +9,8 @@ android {
|
||||
applicationId "jp.juggler.subwaytooter"
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 25
|
||||
versionCode 85
|
||||
versionName "0.8.5"
|
||||
versionCode 86
|
||||
versionName "0.8.6"
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
|
@ -93,6 +93,7 @@ public class ActAppSetting extends AppCompatActivity
|
||||
Switch swDisableTabletMode;
|
||||
Switch swDontCropMediaThumb;
|
||||
Switch swPriorChrome;
|
||||
Switch swPostButtonBarTop;
|
||||
|
||||
Spinner spBackButtonAction;
|
||||
Spinner spUITheme;
|
||||
@ -172,6 +173,10 @@ public class ActAppSetting extends AppCompatActivity
|
||||
swPriorChrome = (Switch) findViewById( R.id.swPriorChrome );
|
||||
swPriorChrome.setOnCheckedChangeListener( this );
|
||||
|
||||
swPostButtonBarTop = (Switch) findViewById( R.id.swPostButtonBarTop );
|
||||
swPostButtonBarTop.setOnCheckedChangeListener( this );
|
||||
|
||||
|
||||
cbNotificationSound = (CheckBox) findViewById( R.id.cbNotificationSound );
|
||||
cbNotificationVibration = (CheckBox) findViewById( R.id.cbNotificationVibration );
|
||||
cbNotificationLED = (CheckBox) findViewById( R.id.cbNotificationLED );
|
||||
@ -293,6 +298,7 @@ public class ActAppSetting extends AppCompatActivity
|
||||
swDontScreenOff.setChecked( pref.getBoolean( Pref.KEY_DONT_SCREEN_OFF, false ) );
|
||||
swDisableTabletMode.setChecked( pref.getBoolean( Pref.KEY_DISABLE_TABLET_MODE, false ) );
|
||||
swDontCropMediaThumb.setChecked( pref.getBoolean( Pref.KEY_DONT_CROP_MEDIA_THUMBNAIL, false ) );
|
||||
swPostButtonBarTop.setChecked( pref.getBoolean( Pref.KEY_POST_BUTTON_BAR_AT_TOP, false ) );
|
||||
|
||||
// Switch with default true
|
||||
swDisableFastScroller.setChecked( pref.getBoolean( Pref.KEY_DISABLE_FAST_SCROLLER, true ) );
|
||||
@ -344,7 +350,8 @@ public class ActAppSetting extends AppCompatActivity
|
||||
.putBoolean( Pref.KEY_DISABLE_TABLET_MODE, swDisableTabletMode.isChecked() )
|
||||
.putBoolean( Pref.KEY_DONT_CROP_MEDIA_THUMBNAIL, swDontCropMediaThumb.isChecked() )
|
||||
.putBoolean( Pref.KEY_PRIOR_CHROME, swPriorChrome.isChecked() )
|
||||
|
||||
.putBoolean( Pref.KEY_POST_BUTTON_BAR_AT_TOP, swPostButtonBarTop.isChecked() )
|
||||
|
||||
.putBoolean( Pref.KEY_NOTIFICATION_SOUND, cbNotificationSound.isChecked() )
|
||||
.putBoolean( Pref.KEY_NOTIFICATION_VIBRATION, cbNotificationVibration.isChecked() )
|
||||
.putBoolean( Pref.KEY_NOTIFICATION_LED, cbNotificationLED.isChecked() )
|
||||
|
@ -31,6 +31,7 @@ import android.text.TextUtils;
|
||||
import android.text.TextWatcher;
|
||||
import android.text.method.LinkMovementMethod;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.ViewTreeObserver;
|
||||
import android.widget.Button;
|
||||
import android.widget.CheckBox;
|
||||
@ -546,6 +547,13 @@ public class ActPost extends AppCompatActivity implements View.OnClickListener,
|
||||
|
||||
setContentView( R.layout.act_post );
|
||||
|
||||
if( Pref.pref(this).getBoolean( Pref.KEY_POST_BUTTON_BAR_AT_TOP ,false)){
|
||||
View bar = findViewById( R.id.llFooterBar );
|
||||
ViewGroup parent = (ViewGroup) bar.getParent();
|
||||
parent.removeView( bar );
|
||||
parent.addView( bar,0 );
|
||||
}
|
||||
|
||||
Styler.fixHorizontalMargin( findViewById( R.id.scrollView ) );
|
||||
Styler.fixHorizontalMargin( findViewById( R.id.llFooterBar ) );
|
||||
|
||||
|
@ -296,6 +296,7 @@ public class AppDataExporter {
|
||||
case Pref.KEY_DISABLE_TABLET_MODE:
|
||||
case Pref.KEY_DONT_CROP_MEDIA_THUMBNAIL:
|
||||
case Pref.KEY_PRIOR_CHROME:
|
||||
case Pref.KEY_POST_BUTTON_BAR_AT_TOP:
|
||||
boolean bv = reader.nextBoolean();
|
||||
e.putBoolean( k, bv );
|
||||
break;
|
||||
|
@ -57,5 +57,7 @@ public class Pref {
|
||||
|
||||
static final String KEY_PRIOR_CHROME = "prior_chrome";
|
||||
|
||||
static final String KEY_POST_BUTTON_BAR_AT_TOP = "post_button_bar_at_top";
|
||||
|
||||
// 項目を追加したらAppDataExporter#importPref のswitch文も更新すること
|
||||
}
|
||||
|
@ -253,6 +253,23 @@
|
||||
|
||||
<View style="@style/setting_divider"/>
|
||||
|
||||
<TextView
|
||||
style="@style/setting_row_label"
|
||||
android:text="@string/show_post_button_bar_top"
|
||||
/>
|
||||
|
||||
<LinearLayout style="@style/setting_row_form">
|
||||
|
||||
<Switch
|
||||
android:id="@+id/swPostButtonBarTop"
|
||||
style="@style/setting_horizontal_stretch"
|
||||
android:gravity="center"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View style="@style/setting_divider"/>
|
||||
|
||||
|
||||
<!-- =============================================== -->
|
||||
|
||||
|
@ -364,7 +364,7 @@
|
||||
<string name="text_to_speech_initializing">TextToSpeech initializing…</string>
|
||||
<string name="text_to_speech_initialize_failed">TextToSpeech initializing failed. status=%1$s</string>
|
||||
<string name="text_to_speech_shutdown">TextToSpeech shutdown…</string>
|
||||
|
||||
<string name="show_post_button_bar_top">Show buttons bar at the top of posting screen</string>
|
||||
|
||||
<!--<string name="abc_action_bar_home_description">Revenir à l\'accueil</string>-->
|
||||
<!--<string name="abc_action_bar_home_description_format">%1$s, %2$s</string>-->
|
||||
|
@ -651,5 +651,6 @@
|
||||
<string name="text_to_speech_initializing">TextToSpeechの初期化中…</string>
|
||||
<string name="text_to_speech_initialize_failed">TextToSpeechの初期化に失敗。status=%1$s</string>
|
||||
<string name="text_to_speech_shutdown">TextToSpeechの後処理…</string>
|
||||
<string name="show_post_button_bar_top">投稿画面のボタンバーを上端に表示</string>
|
||||
|
||||
</resources>
|
||||
|
@ -359,4 +359,5 @@
|
||||
<string name="text_to_speech_initializing">TextToSpeech initializing…</string>
|
||||
<string name="text_to_speech_initialize_failed">TextToSpeech initializing failed. status=%1$s</string>
|
||||
<string name="text_to_speech_shutdown">TextToSpeech shutdown…</string>
|
||||
<string name="show_post_button_bar_top">Show buttons bar at the top of posting screen</string>
|
||||
</resources>
|
||||
|
Loading…
x
Reference in New Issue
Block a user