Skip to content

Commit

Permalink
add firebase event switch in setting view.
Browse files Browse the repository at this point in the history
  • Loading branch information
feilongfl authored and Haleydu committed Aug 6, 2020
1 parent 689e480 commit fbab3e4
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ public class PreferenceManager {
public static final String PREF_OTHER_CHECK_UPDATE = "pref_other_check_update";
public static final String PREF_OTHER_CONNECT_ONLY_WIFI = "pref_other_connect_only_wifi";
public static final String PREF_OTHER_LOADCOVER_ONLY_WIFI = "pref_other_loadcover_only_wifi";
public static final String PREF_OTHER_FIREBASE_EVENT = "pref_other_firebase_event";
public static final String PREF_OTHER_CHECK_UPDATE_LAST = "pref_other_check_update_last";
public static final String PREF_OTHER_STORAGE = "pref_other_storage";
public static final String PREF_OTHER_THEME = "pref_other_theme";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ public class SettingsActivity extends BackActivity implements SettingsView {
CheckBoxPreference mConnectOnlyWifi;
@BindView(R.id.settings_other_loadcover_only_wifi)
CheckBoxPreference mLoadCoverOnlyWifi;
@BindView(R.id.settings_firebase_event)
CheckBoxPreference mFireBaseEvent;

private SettingsPresenter mPresenter;

Expand Down Expand Up @@ -134,6 +136,7 @@ protected void initView() {
mCheckUpdate.bindPreference(PreferenceManager.PREF_OTHER_CHECK_UPDATE, false);
mConnectOnlyWifi.bindPreference(PreferenceManager.PREF_OTHER_CONNECT_ONLY_WIFI, false);
mLoadCoverOnlyWifi.bindPreference(PreferenceManager.PREF_OTHER_LOADCOVER_ONLY_WIFI, false);
mFireBaseEvent.bindPreference(PreferenceManager.PREF_OTHER_FIREBASE_EVENT, true);
mOtherShowTopbar.bindPreference(PreferenceManager.PREF_OTHER_SHOW_TOPBAR,false);
mReaderMode.bindPreference(getFragmentManager(), PreferenceManager.PREF_READER_MODE,
PreferenceManager.READER_MODE_PAGE, R.array.reader_mode_items, DIALOG_REQUEST_READER_MODE);
Expand Down Expand Up @@ -261,6 +264,7 @@ private void changeTheme(int primary, int accent) {
mCheckUpdate.setColorStateList(stateList);
mConnectOnlyWifi.setColorStateList(stateList);
mLoadCoverOnlyWifi.setColorStateList(stateList);
mFireBaseEvent.setColorStateList(stateList);
mOtherShowTopbar.setColorStateList(stateList);
mReaderCloseAutoResizeImage.setColorStateList(stateList);
mReaderVolumeKeyControls.setColorStateList(stateList);
Expand Down
7 changes: 7 additions & 0 deletions app/src/main/res/layout/activity_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,13 @@
app:summary="@string/settings_other_check_update_summary"
app:title="@string/settings_other_check_update" />

<com.hiroshi.cimoc.ui.widget.preference.CheckBoxPreference
android:id="@+id/settings_firebase_event"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:summary="@string/settings_other_firebase_event_summary"
app:title="@string/settings_other_firebase_event" />

<com.hiroshi.cimoc.ui.widget.preference.ChoicePreference
android:id="@+id/settings_other_launch"
android:layout_width="match_parent"
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values-zh-rTW/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,8 @@
<string name="settings_other_storage_edit_neutral">選擇路徑</string>
<string name="settings_other_clear_cache">清理緩存</string>
<string name="settings_other_clear_cache_summary">清理線上漫畫的緩存資料</string>
<string name="settings_other_firebase_event">Firebase數據收集</string>
<string name="settings_other_firebase_event_summary">允許程序通過Firebase收集您的使用情況,以便於分析程序和漫畫源的工作狀態。</string>

<string name="backup_save">備份</string>
<string name="backup_save_comic_auto">自動備份</string>
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@
<string name="settings_other_storage_edit_neutral">选择路径</string>
<string name="settings_other_clear_cache">清理缓存</string>
<string name="settings_other_clear_cache_summary">清理在线漫画的缓存数据</string>
<string name="settings_other_firebase_event">Firebase数据收集</string>
<string name="settings_other_firebase_event_summary">允许程序通过Firebase收集您的使用情况,以便于分析程序和漫画源的工作状态。</string>

<string name="backup_save">备份</string>
<string name="backup_save_comic_auto">自动备份</string>
Expand Down

0 comments on commit fbab3e4

Please sign in to comment.