mirror of
https://github.com/TwidereProject/Twidere-Android
synced 2025-02-02 17:56:56 +01:00
moved settings
This commit is contained in:
parent
0d61d09f06
commit
88cb1fd072
@ -341,15 +341,15 @@ public class HomeActivity extends BaseAppCompatActivity implements OnClickListen
|
||||
mNotificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
|
||||
mMultiSelectHandler = new MultiSelectEventHandler(this);
|
||||
mMultiSelectHandler.dispatchOnCreate();
|
||||
// if (!Utils.hasAccount(this)) {
|
||||
// final Intent signInIntent = new Intent(INTENT_ACTION_TWITTER_LOGIN);
|
||||
// signInIntent.setClass(this, SignInActivity.class);
|
||||
// startActivity(signInIntent);
|
||||
// finish();
|
||||
// return;
|
||||
// } else {
|
||||
// notifyAccountsChanged();
|
||||
// }
|
||||
if (!Utils.hasAccount(this)) {
|
||||
final Intent signInIntent = new Intent(INTENT_ACTION_TWITTER_LOGIN);
|
||||
signInIntent.setClass(this, SignInActivity.class);
|
||||
startActivity(signInIntent);
|
||||
finish();
|
||||
return;
|
||||
} else {
|
||||
notifyAccountsChanged();
|
||||
}
|
||||
final Intent intent = getIntent();
|
||||
if (openSettingsWizard()) {
|
||||
finish();
|
||||
@ -482,7 +482,8 @@ public class HomeActivity extends BaseAppCompatActivity implements OnClickListen
|
||||
|
||||
// spice
|
||||
SpiceProfilingUtil.profile(this, SpiceProfilingUtil.FILE_NAME_APP, "App Stop");
|
||||
SpiceProfilingUtil.profile(this, SpiceProfilingUtil.FILE_NAME_ONLAUNCH, "App Stop" + "," + NetworkStateUtil.getConnectedType(this) + "," + Build.MODEL);
|
||||
SpiceProfilingUtil.profile(this, SpiceProfilingUtil.FILE_NAME_ONLAUNCH, "App Stop" + ","
|
||||
+ NetworkStateUtil.getConnectedType(this) + "," + Build.MODEL);
|
||||
//end
|
||||
super.onStop();
|
||||
}
|
||||
|
@ -761,4 +761,5 @@
|
||||
<string name="dark_theme">Dark theme</string>
|
||||
<string name="wizard_hint_title_location_requirement">Location permission</string>
|
||||
<string name="wizard_hint_summary_location_requirement">Twidere needs location permission when you send tweet containing location.</string>
|
||||
<string name="scrapyard">Scrapyard</string>
|
||||
</resources>
|
@ -1,25 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:title="@string/cards">
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="cat_card_preview"
|
||||
android:order="11"
|
||||
android:title="@string/preview">
|
||||
<org.mariotaku.twidere.preference.CardPreviewPreference android:key="card_preview" />
|
||||
<org.mariotaku.twidere.preference.CardPreviewPreference android:key="card_preview"/>
|
||||
</PreferenceCategory>
|
||||
|
||||
<org.mariotaku.twidere.preference.AutoFixSwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="name_first"
|
||||
<org.mariotaku.twidere.preference.SeekBarDialogPreference
|
||||
android:defaultValue="@integer/default_text_size"
|
||||
android:key="text_size_int"
|
||||
android:order="22"
|
||||
android:summaryOff="@string/name_first_summary_off"
|
||||
android:summaryOn="@string/name_first_summary_on"
|
||||
android:title="@string/name_first">
|
||||
android:summary="@string/text_size_summary"
|
||||
android:title="@string/size"
|
||||
app:max="24"
|
||||
app:min="12"
|
||||
app:progressTextSuffix="sp">
|
||||
<extra
|
||||
android:name="notify_change"
|
||||
android:value="true" />
|
||||
</org.mariotaku.twidere.preference.AutoFixSwitchPreference>
|
||||
android:value="true"/>
|
||||
</org.mariotaku.twidere.preference.SeekBarDialogPreference>
|
||||
|
||||
<org.mariotaku.twidere.preference.AutoFixSwitchPreference
|
||||
android:defaultValue="true"
|
||||
@ -28,20 +31,8 @@
|
||||
android:title="@string/profile_image">
|
||||
<extra
|
||||
android:name="notify_change"
|
||||
android:value="true" />
|
||||
android:value="true"/>
|
||||
</org.mariotaku.twidere.preference.AutoFixSwitchPreference>
|
||||
<org.mariotaku.twidere.preference.SummaryListPreference
|
||||
android:defaultValue="@string/default_profile_image_style"
|
||||
android:entries="@array/entries_profile_image_style"
|
||||
android:entryValues="@array/values_profile_image_style"
|
||||
android:key="profile_image_style"
|
||||
android:order="24"
|
||||
android:title="@string/profile_image_style">
|
||||
<extra
|
||||
android:name="notify_change"
|
||||
android:value="true" />
|
||||
</org.mariotaku.twidere.preference.SummaryListPreference>
|
||||
|
||||
<org.mariotaku.twidere.preference.AutoFixSwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="media_preview"
|
||||
@ -49,19 +40,8 @@
|
||||
android:title="@string/media_preview">
|
||||
<extra
|
||||
android:name="notify_change"
|
||||
android:value="true" />
|
||||
android:value="true"/>
|
||||
</org.mariotaku.twidere.preference.AutoFixSwitchPreference>
|
||||
<org.mariotaku.twidere.preference.SummaryListPreference
|
||||
android:defaultValue="crop"
|
||||
android:entries="@array/entries_media_preview_style"
|
||||
android:entryValues="@array/values_media_preview_style"
|
||||
android:key="media_preview_style"
|
||||
android:order="26"
|
||||
android:title="@string/media_preview_style">
|
||||
<extra
|
||||
android:name="notify_change"
|
||||
android:value="true" />
|
||||
</org.mariotaku.twidere.preference.SummaryListPreference>
|
||||
|
||||
<org.mariotaku.twidere.preference.LinkHighlightPreference
|
||||
android:defaultValue="none"
|
||||
@ -70,28 +50,9 @@
|
||||
android:title="@string/link_highlight_option">
|
||||
<extra
|
||||
android:name="notify_change"
|
||||
android:value="true" />
|
||||
android:value="true"/>
|
||||
</org.mariotaku.twidere.preference.LinkHighlightPreference>
|
||||
|
||||
<org.mariotaku.twidere.preference.AutoFixSwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="show_absolute_time"
|
||||
android:order="30"
|
||||
android:summary="@string/show_absolute_time_summary"
|
||||
android:title="@string/show_absolute_time">
|
||||
<extra
|
||||
android:name="notify_change"
|
||||
android:value="true" />
|
||||
</org.mariotaku.twidere.preference.AutoFixSwitchPreference>
|
||||
<org.mariotaku.twidere.preference.AutoFixSwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="card_animation"
|
||||
android:order="31"
|
||||
android:title="@string/card_animation">
|
||||
<extra
|
||||
android:name="notify_change"
|
||||
android:value="true" />
|
||||
</org.mariotaku.twidere.preference.AutoFixSwitchPreference>
|
||||
<org.mariotaku.twidere.preference.AutoFixSwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="compact_cards"
|
||||
@ -100,7 +61,7 @@
|
||||
android:title="@string/compact_cards">
|
||||
<extra
|
||||
android:name="notify_change"
|
||||
android:value="true" />
|
||||
android:value="true"/>
|
||||
</org.mariotaku.twidere.preference.AutoFixSwitchPreference>
|
||||
<org.mariotaku.twidere.preference.AutoFixSwitchPreference
|
||||
android:defaultValue="false"
|
||||
@ -109,7 +70,7 @@
|
||||
android:title="@string/hide_card_actions">
|
||||
<extra
|
||||
android:name="notify_change"
|
||||
android:value="true" />
|
||||
android:value="true"/>
|
||||
</org.mariotaku.twidere.preference.AutoFixSwitchPreference>
|
||||
|
||||
</PreferenceScreen>
|
@ -5,51 +5,6 @@
|
||||
|
||||
<PreferenceCategory android:title="@string/font">
|
||||
|
||||
<org.mariotaku.twidere.preference.ThemeFontFamilyPreference
|
||||
android:defaultValue="sans-serif-light"
|
||||
android:enabled="@bool/has_font_family"
|
||||
android:key="theme_font_family"
|
||||
android:title="@string/style">
|
||||
<extra
|
||||
android:name="notify_change"
|
||||
android:value="true" />
|
||||
</org.mariotaku.twidere.preference.ThemeFontFamilyPreference>
|
||||
|
||||
<org.mariotaku.twidere.preference.SeekBarDialogPreference
|
||||
android:defaultValue="@integer/default_text_size"
|
||||
android:key="text_size_int"
|
||||
android:summary="@string/text_size_summary"
|
||||
android:title="@string/size"
|
||||
app:max="24"
|
||||
app:min="12"
|
||||
app:progressTextSuffix="sp">
|
||||
<extra
|
||||
android:name="notify_change"
|
||||
android:value="true" />
|
||||
</org.mariotaku.twidere.preference.SeekBarDialogPreference>
|
||||
|
||||
</PreferenceCategory>
|
||||
<org.mariotaku.twidere.preference.AutoFixSwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="unread_count"
|
||||
android:title="@string/unread_count">
|
||||
<extra
|
||||
android:name="notify_change"
|
||||
android:value="true" />
|
||||
</org.mariotaku.twidere.preference.AutoFixSwitchPreference>
|
||||
|
||||
<org.mariotaku.twidere.preference.AutoFixSwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="leftside_compose_button"
|
||||
android:summary="@string/leftside_compose_button_summary"
|
||||
android:title="@string/leftside_compose_button" />
|
||||
|
||||
<org.mariotaku.twidere.preference.SummaryListPreference
|
||||
android:defaultValue="@string/default_tab_display_option"
|
||||
android:entries="@array/entries_tab_display_option"
|
||||
android:entryValues="@array/values_tab_display_option"
|
||||
android:key="tab_display_option"
|
||||
android:title="@string/tab_display_option" />
|
||||
|
||||
|
||||
</PreferenceScreen>
|
@ -39,7 +39,6 @@
|
||||
|
||||
<Preference
|
||||
android:fragment="org.mariotaku.twidere.fragment.SettingsDetailsFragment"
|
||||
android:key="data_profiling_settings"
|
||||
android:title="@string/usage_statistics">
|
||||
<extra
|
||||
android:name="resid"
|
||||
@ -50,4 +49,12 @@
|
||||
android:key="import_export_settings"
|
||||
android:title="@string/import_export_settings"/>
|
||||
|
||||
<Preference
|
||||
android:fragment="org.mariotaku.twidere.fragment.SettingsDetailsFragment"
|
||||
android:title="@string/scrapyard">
|
||||
<extra
|
||||
android:name="resid"
|
||||
android:value="@xml/preferences_scrapyard"/>
|
||||
</Preference>
|
||||
|
||||
</PreferenceScreen>
|
97
twidere/src/main/res/xml/preferences_scrapyard.xml
Normal file
97
twidere/src/main/res/xml/preferences_scrapyard.xml
Normal file
@ -0,0 +1,97 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Twidere - Twitter client for Android
|
||||
~
|
||||
~ Copyright (C) 2012-2015 Mariotaku Lee <mariotaku.lee@gmail.com>
|
||||
~
|
||||
~ This program is free software: you can redistribute it and/or modify
|
||||
~ it under the terms of the GNU General Public License as published by
|
||||
~ the Free Software Foundation, either version 3 of the License, or
|
||||
~ (at your option) any later version.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful,
|
||||
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
~ GNU General Public License for more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License
|
||||
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<org.mariotaku.twidere.preference.AutoFixSwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="name_first"
|
||||
android:order="22"
|
||||
android:summaryOff="@string/name_first_summary_off"
|
||||
android:summaryOn="@string/name_first_summary_on"
|
||||
android:title="@string/name_first">
|
||||
<extra
|
||||
android:name="notify_change"
|
||||
android:value="true"/>
|
||||
</org.mariotaku.twidere.preference.AutoFixSwitchPreference>
|
||||
<org.mariotaku.twidere.preference.SummaryListPreference
|
||||
android:defaultValue="@string/default_profile_image_style"
|
||||
android:entries="@array/entries_profile_image_style"
|
||||
android:entryValues="@array/values_profile_image_style"
|
||||
android:key="profile_image_style"
|
||||
android:order="24"
|
||||
android:title="@string/profile_image_style">
|
||||
<extra
|
||||
android:name="notify_change"
|
||||
android:value="true"/>
|
||||
</org.mariotaku.twidere.preference.SummaryListPreference>
|
||||
|
||||
<org.mariotaku.twidere.preference.SummaryListPreference
|
||||
android:defaultValue="crop"
|
||||
android:entries="@array/entries_media_preview_style"
|
||||
android:entryValues="@array/values_media_preview_style"
|
||||
android:key="media_preview_style"
|
||||
android:order="26"
|
||||
android:title="@string/media_preview_style">
|
||||
<extra
|
||||
android:name="notify_change"
|
||||
android:value="true"/>
|
||||
</org.mariotaku.twidere.preference.SummaryListPreference>
|
||||
<org.mariotaku.twidere.preference.AutoFixSwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="show_absolute_time"
|
||||
android:order="30"
|
||||
android:summary="@string/show_absolute_time_summary"
|
||||
android:title="@string/show_absolute_time">
|
||||
<extra
|
||||
android:name="notify_change"
|
||||
android:value="true"/>
|
||||
</org.mariotaku.twidere.preference.AutoFixSwitchPreference>
|
||||
<org.mariotaku.twidere.preference.AutoFixSwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="card_animation"
|
||||
android:order="31"
|
||||
android:title="@string/card_animation">
|
||||
<extra
|
||||
android:name="notify_change"
|
||||
android:value="true" />
|
||||
</org.mariotaku.twidere.preference.AutoFixSwitchPreference>
|
||||
<org.mariotaku.twidere.preference.AutoFixSwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="unread_count"
|
||||
android:title="@string/unread_count">
|
||||
<extra
|
||||
android:name="notify_change"
|
||||
android:value="true" />
|
||||
</org.mariotaku.twidere.preference.AutoFixSwitchPreference>
|
||||
|
||||
<org.mariotaku.twidere.preference.SummaryListPreference
|
||||
android:defaultValue="@string/default_tab_display_option"
|
||||
android:entries="@array/entries_tab_display_option"
|
||||
android:entryValues="@array/values_tab_display_option"
|
||||
android:key="tab_display_option"
|
||||
android:title="@string/tab_display_option" />
|
||||
|
||||
<org.mariotaku.twidere.preference.AutoFixSwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="leftside_compose_button"
|
||||
android:summary="@string/leftside_compose_button_summary"
|
||||
android:title="@string/leftside_compose_button" />
|
||||
</PreferenceScreen>
|
@ -13,8 +13,8 @@
|
||||
</PreferenceCategory>
|
||||
|
||||
<org.mariotaku.twidere.preference.DarkLightThemeTogglePreference
|
||||
android:order="21"
|
||||
android:key="theme"
|
||||
android:order="21"
|
||||
android:title="@string/dark_theme">
|
||||
<extra
|
||||
android:name="notify_change"
|
||||
@ -32,7 +32,7 @@
|
||||
|
||||
<org.mariotaku.twidere.preference.ColorPickerPreference
|
||||
android:key="theme_color"
|
||||
android:order="25"
|
||||
android:order="23"
|
||||
android:title="@string/color"
|
||||
app:defaultColor="@color/branding_color">
|
||||
<extra
|
||||
@ -40,5 +40,16 @@
|
||||
android:value="true"/>
|
||||
</org.mariotaku.twidere.preference.ColorPickerPreference>
|
||||
|
||||
<org.mariotaku.twidere.preference.ThemeFontFamilyPreference
|
||||
android:defaultValue="sans-serif-light"
|
||||
android:enabled="@bool/has_font_family"
|
||||
android:key="theme_font_family"
|
||||
android:order="24"
|
||||
android:title="@string/style">
|
||||
<extra
|
||||
android:name="notify_change"
|
||||
android:value="true"/>
|
||||
</org.mariotaku.twidere.preference.ThemeFontFamilyPreference>
|
||||
|
||||
|
||||
</PreferenceScreen>
|
@ -10,14 +10,6 @@
|
||||
android:name="resid"
|
||||
android:value="@xml/preferences_theme"/>
|
||||
</header>
|
||||
<header
|
||||
android:fragment="org.mariotaku.twidere.fragment.SettingsDetailsFragment"
|
||||
android:icon="@drawable/ic_action_view_quilt"
|
||||
android:title="@string/settings_interface">
|
||||
<extra
|
||||
android:name="resid"
|
||||
android:value="@xml/preferences_interface"/>
|
||||
</header>
|
||||
<header
|
||||
android:fragment="org.mariotaku.twidere.fragment.SettingsDetailsFragment"
|
||||
android:icon="@drawable/ic_action_card"
|
||||
|
Loading…
x
Reference in New Issue
Block a user