Merge branch 'develop' of github.com:TwidereProject/Twidere-Android into chameleon

This commit is contained in:
Mariotaku Lee 2016-12-23 08:42:12 +08:00
commit 77299e457c
5 changed files with 23 additions and 0 deletions

View File

@ -253,6 +253,8 @@ public interface SharedPreferenceConstants {
String KEY_NOTIFICATION_MENTIONS_ONLY = "notification_mentions_only";
@Preference(type = BOOLEAN, hasDefault = true, defaultBoolean = false)
String KEY_PEBBLE_NOTIFICATIONS = "pebble_notifications";
@Preference(type = BOOLEAN, hasDefault = true, defaultBoolean = true)
String KEY_FAB_VISIBLE = "fab_visible";
@Preference(type = STRING, hasDefault = true, defaultString = VALUE_COMPOSE_NOW_ACTION_COMPOSE)
String KEY_COMPOSE_NOW_ACTION = "compose_now_action";

View File

@ -356,6 +356,12 @@ class HomeActivity : BaseActivity(), OnClickListener, OnPageChangeListener, Supp
drawerToggleButton.visibility = View.GONE
}
if (preferences.getBoolean(SharedPreferenceConstants.KEY_FAB_VISIBLE)) {
actionsButton.visibility = View.VISIBLE
} else {
actionsButton.visibility = View.GONE
}
homeContent.addOnLayoutChangeListener { v, left, top, right, bottom, oldLeft, oldTop, oldRight, oldBottom ->
if (top != oldTop) {
val fragment = leftDrawerFragment

View File

@ -805,4 +805,7 @@
<string name="filter_everywhere_description">Folgendes wird in Twidere gefiltert:\n · Tweets dieses Benutzers\n · Tweets, die diesen Benutzer erwähnen\n · Retweets/Zitate dieses Benutzers</string>
<!-- Verb. Used for skip some settings -->
<!-- Used for decide something later, like permission request -->
<string name="fab_visible">Floating Action Button</string>
<string name="fab_visible_summary">Den Floating Action Button anzeigen</string>
</resources>

View File

@ -821,4 +821,6 @@
<string name="preference_randomize_account_rename_accounts_confirm">Rename existing accounts?</string>
<string name="message_auto_refresh_confirm">Enable auto refresh to get new tweets automatically?</string>
<string name="error_info_oauth_timestamp_error">Please check your system date &amp; time settings.</string>
<string name="fab_visible">Floating Action Button</string>
<string name="fab_visible_summary">Show the Floating Action Button</string>
</resources>

View File

@ -21,6 +21,16 @@
<!--suppress AndroidElementNotAllowed -->
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<SwitchPreferenceCompat
android:defaultValue="true"
android:key="fab_visible"
android:summary="@string/fab_visible_summary"
android:title="@string/fab_visible">
<extra
android:name="should_recreate"
android:value="true"/>
</SwitchPreferenceCompat>
<SwitchPreferenceCompat
android:defaultValue="false"
android:key="quick_send"