FastScrollerを無効にする設定を追加

This commit is contained in:
tateisu 2017-04-26 02:21:00 +09:00
parent d63acf471e
commit 46d29a4f2d
6 changed files with 29 additions and 1 deletions

View File

@ -33,6 +33,8 @@ public class ActAppSetting extends AppCompatActivity implements CompoundButton.O
Switch swDontConfirmBeforeCloseColumn;
Switch swPriorLocalURL;
Switch swDisableFastScroller;
Spinner spBackButtonAction;
static final int BACK_ASK_ALWAYS =0;
@ -50,6 +52,10 @@ public class ActAppSetting extends AppCompatActivity implements CompoundButton.O
swPriorLocalURL = (Switch) findViewById( R.id.swPriorLocalURL );
swPriorLocalURL.setOnCheckedChangeListener( this );
swDisableFastScroller = (Switch) findViewById( R.id.swDisableFastScroller );
swDisableFastScroller.setOnCheckedChangeListener( this );
spBackButtonAction = (Spinner) findViewById( R.id.spBackButtonAction );
spBackButtonAction.setOnItemSelectedListener( this );
@ -69,7 +75,7 @@ public class ActAppSetting extends AppCompatActivity implements CompoundButton.O
swDontConfirmBeforeCloseColumn.setChecked( pref.getBoolean( Pref.KEY_DONT_CONFIRM_BEFORE_CLOSE_COLUMN, false ) );
swPriorLocalURL.setChecked( pref.getBoolean( Pref.KEY_PRIOR_LOCAL_URL, false ) );
swDisableFastScroller.setChecked( pref.getBoolean( Pref.KEY_DISABLE_FAST_SCROLLER, false ) );
spBackButtonAction.setSelection( pref.getInt(Pref.KEY_BACK_BUTTON_ACTION,0) );
load_busy = false;
@ -80,6 +86,7 @@ public class ActAppSetting extends AppCompatActivity implements CompoundButton.O
pref.edit()
.putBoolean( Pref.KEY_DONT_CONFIRM_BEFORE_CLOSE_COLUMN, swDontConfirmBeforeCloseColumn.isChecked() )
.putBoolean( Pref.KEY_PRIOR_LOCAL_URL, swPriorLocalURL.isChecked() )
.putBoolean( Pref.KEY_DISABLE_FAST_SCROLLER, swDisableFastScroller.isChecked() )
.putInt( Pref.KEY_BACK_BUTTON_ACTION, spBackButtonAction.getSelectedItemPosition() )
.apply();
}

View File

@ -102,6 +102,8 @@ public class ColumnViewHolder implements View.OnClickListener, Column.VisualCall
etSearch = (EditText) root.findViewById( R.id.etSearch );
cbResolve = (CheckBox) root.findViewById( R.id.cbResolve );
listView.setFastScrollEnabled( !Pref.pref(activity).getBoolean( Pref.KEY_DISABLE_FAST_SCROLLER,false) );
if( column.type != Column.TYPE_SEARCH ){
llSearch.setVisibility( View.GONE );
}else{

View File

@ -15,5 +15,6 @@ public class Pref {
public static final String KEY_DONT_CONFIRM_BEFORE_CLOSE_COLUMN ="DontConfirmBeforeCloseColumn";
public static final String KEY_BACK_BUTTON_ACTION ="back_button_action";
public static final String KEY_PRIOR_LOCAL_URL = "prior_local_url";
public static final String KEY_DISABLE_FAST_SCROLLER = "disable_fast_scroller";
}

View File

@ -73,6 +73,22 @@ android:scrollbarStyle="outsideOverlay"
<View style="@style/setting_divider"/>
<TextView
style="@style/setting_row_label"
android:text="@string/disable_fast_scroller"
/>
<LinearLayout style="@style/setting_row_form">
<Switch
android:id="@+id/swDisableFastScroller"
style="@style/setting_horizontal_stretch"
/>
</LinearLayout>
<View style="@style/setting_divider"/>
<!--<TextView-->
<!--style="@style/setting_row_label"-->
<!--android:text="@string/actions"-->

View File

@ -154,4 +154,5 @@
<string name="open_column_list">カラム一覧を開く</string>
<string name="back_button_action">戻るボタンの動作</string>
<string name="prior_local_url_when_open_attachment">添付画像を開く時に自タンスURLを重視</string>
<string name="disable_fast_scroller">FastScrollerを無効にする(アプリ再起動が必要)</string>
</resources>

View File

@ -153,4 +153,5 @@
<string name="open_column_list">open column list</string>
<string name="back_button_action">back button action</string>
<string name="prior_local_url_when_open_attachment">prior local URL when open attachment</string>
<string name="disable_fast_scroller">disable fast scroller (app restart required)</string>
</resources>