change handling of font size, introduce font size setting

This commit is contained in:
Conny Duck 2017-12-01 21:52:10 +01:00
parent 8f8d49f421
commit bf4d0bb722
25 changed files with 208 additions and 83 deletions

View File

@ -15,8 +15,6 @@
package com.keylesspalace.tusky;
import android.annotation.SuppressLint;
import android.app.NotificationManager;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
@ -46,9 +44,7 @@ import okhttp3.logging.HttpLoggingInterceptor;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
@SuppressLint("Registered")
public class BaseActivity extends AppCompatActivity {
protected static final int SERVICE_REQUEST_CODE = 8574603; // This number is arbitrary.
public abstract class BaseActivity extends AppCompatActivity {
public MastodonApi mastodonApi;
protected Dispatcher mastodonApiDispatcher;
@ -60,12 +56,30 @@ public class BaseActivity extends AppCompatActivity {
redirectIfNotLoggedIn();
createMastodonApi();
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);
/* There isn't presently a way to globally change the theme of a whole application at
* runtime, just individual activities. So, each activity has to set its theme before any
* views are created. */
if (PreferenceManager.getDefaultSharedPreferences(this).getBoolean("lightTheme", false)) {
if (preferences.getBoolean("lightTheme", false)) {
setTheme(R.style.AppTheme_Light);
}
int style;
switch(preferences.getString("statusTextSize", "small")) {
case "large":
style = R.style.TextSizeLarge;
break;
case "medium":
style = R.style.TextSizeMedium;
break;
case "small":
default:
style = R.style.TextSizeSmall;
break;
}
getTheme().applyStyle(style, false);
}
@Override

View File

@ -31,7 +31,7 @@ import com.keylesspalace.tusky.fragment.PreferencesFragment;
public class PreferencesActivity extends BaseActivity
implements SharedPreferences.OnSharedPreferenceChangeListener {
private boolean themeSwitched;
private boolean restartActivitiesOnExit;
private @XmlRes int currentPreferences;
private @StringRes int currentTitle;
@ -39,10 +39,10 @@ public class PreferencesActivity extends BaseActivity
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (savedInstanceState != null) {
themeSwitched = savedInstanceState.getBoolean("themeSwitched");
restartActivitiesOnExit = savedInstanceState.getBoolean("restart");
} else {
Bundle extras = getIntent().getExtras();
themeSwitched = extras != null && extras.getBoolean("themeSwitched");
restartActivitiesOnExit = extras != null && extras.getBoolean("restart");
}
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);
@ -91,7 +91,7 @@ public class PreferencesActivity extends BaseActivity
}
private void saveInstanceState(Bundle outState) {
outState.putBoolean("themeSwitched", themeSwitched);
outState.putBoolean("restart", restartActivitiesOnExit);
outState.putInt("preferences", currentPreferences);
outState.putInt("title", currentTitle);
}
@ -105,7 +105,7 @@ public class PreferencesActivity extends BaseActivity
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
switch (key) {
case "lightTheme": {
themeSwitched = true;
restartActivitiesOnExit = true;
// recreate() could be used instead, but it doesn't have an animation B).
Intent intent = getIntent();
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
@ -117,6 +117,10 @@ public class PreferencesActivity extends BaseActivity
overridePendingTransition(R.anim.fade_in, R.anim.fade_out);
break;
}
case "statusTextSize": {
restartActivitiesOnExit = true;
break;
}
case "notificationsEnabled": {
boolean enabled = sharedPreferences.getBoolean("notificationsEnabled", true);
if (enabled) {
@ -146,7 +150,7 @@ public class PreferencesActivity extends BaseActivity
* Either the back stack activities need to all be recreated, or do the easier thing, which
* is hijack the back button press and use it to launch a new MainActivity and clear the
* back stack. */
if (themeSwitched) {
if (restartActivitiesOnExit) {
Intent intent = new Intent(this, MainActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
startActivity(intent);

View File

@ -2,21 +2,31 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="true">
<inset
android:insetBottom="6dp"
android:insetLeft="2dp"
android:insetRight="6dp"
android:insetTop="2dp">
<shape>
<corners
android:radius="3dp"/>
<solid
android:color="@color/md_blue_600"/>
<corners android:radius="3dp" />
<solid android:color="@color/md_blue_600" />
<padding android:bottom="4dp" android:left="8dp" android:right="8dp" android:top="4dp" />
</shape>
</inset>
</item>
<item android:state_enabled="false">
<inset
android:insetBottom="6dp"
android:insetLeft="2dp"
android:insetRight="6dp"
android:insetTop="2dp">
<shape>
<corners
android:radius="3dp"/>
<solid
android:color="@color/md_blue_grey_300"/>
<corners android:radius="3dp" />
<solid android:color="@color/md_blue_grey_300" />
<padding android:bottom="4dp" android:left="8dp" android:right="8dp" android:top="4dp" />
</shape>
</inset>
</item>
</selector>

View File

@ -66,6 +66,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:textSize="?attr/status_text_large"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
@ -75,6 +76,7 @@
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:layout_marginRight="10dp"
android:textSize="?attr/status_text_medium"
android:text="@string/follows_you"
android:textColor="?android:textColorPrimary"
app:layout_constraintEnd_toEndOf="@id/follow_btn"
@ -87,7 +89,7 @@
android:ellipsize="end"
android:maxLines="1"
android:textColor="?android:textColorPrimary"
android:textSize="18sp"
android:textSize="?attr/status_text_large"
android:textStyle="normal|bold"
app:layout_constraintTop_toBottomOf="@id/account_avatar"
tools:text="Tusky Mastodon Client" />
@ -98,6 +100,7 @@
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="1"
android:textSize="?attr/status_text_medium"
android:textColor="?android:textColorSecondary"
app:layout_constraintTop_toBottomOf="@id/account_display_name"
tools:text="\@Tusky" />
@ -123,6 +126,7 @@
android:layout_below="@id/account_username"
android:paddingBottom="16dp"
android:paddingTop="10dp"
android:textSize="?attr/status_text_medium"
android:textColor="?android:textColorTertiary"
app:layout_constraintTop_toBottomOf="@id/account_username"
tools:text="This is a test description" />
@ -137,6 +141,7 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="0"
app:layout_constraintStart_toStartOf="parent"
android:textSize="?attr/status_text_medium"
app:layout_constraintTop_toBottomOf="@id/account_note"
tools:text="3000 Followers" />
@ -149,6 +154,7 @@
app:layout_constraintEnd_toStartOf="@id/statuses_btn"
app:layout_constraintHorizontal_bias="0"
app:layout_constraintStart_toEndOf="@id/followers_tv"
android:textSize="?attr/status_text_medium"
app:layout_constraintTop_toTopOf="@id/followers_tv"
tools:text="500 Following" />
@ -158,6 +164,7 @@
android:layout_height="wrap_content"
android:textColor="@color/account_tab_font_color"
app:layout_constraintEnd_toEndOf="parent"
android:textSize="?attr/status_text_medium"
app:layout_constraintHorizontal_bias="0"
app:layout_constraintStart_toEndOf="@id/following_tv"
app:layout_constraintTop_toTopOf="@id/followers_tv"
@ -194,6 +201,7 @@
android:background="?android:colorBackground"
app:tabGravity="fill"
app:tabMaxWidth="0dp"
app:tabTextAppearance="@style/TuskyTabAppearance"
app:tabSelectedTextColor="?attr/colorAccent">
<android.support.design.widget.TabItem

View File

@ -19,6 +19,7 @@
android:background="@android:color/transparent" />
<TextView
android:textSize="?attr/status_text_small"
android:id="@+id/reply_tv"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -31,6 +32,7 @@
tools:visibility="visible" />
<TextView
android:textSize="?attr/status_text_small"
android:id="@+id/reply_content_tv"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -52,6 +54,7 @@
android:orientation="vertical">
<EditText
android:textSize="?attr/status_text_medium"
android:id="@+id/field_content_warning"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -90,7 +93,7 @@
android:gravity="start|top"
android:hint="@string/hint_compose"
android:inputType="text|textMultiLine|textCapSentences"
android:textSize="20sp" />
android:textSize="?attr/status_text_large" />
<HorizontalScrollView
android:layout_width="match_parent"
@ -194,15 +197,17 @@
<TextView
android:id="@+id/characters_left"
android:layout_width="wrap_content"
android:textSize="?attr/status_text_small"
android:layout_height="wrap_content"
android:textColor="?android:textColorPrimary" />
<Button
android:id="@+id/floating_btn"
android:layout_width="80dp"
android:layout_height="35dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginStart="10dp"
android:textSize="?attr/status_text_large"
android:background="@drawable/compose_button_colors"
android:text="@string/action_send"
android:textColor="@android:color/white" />

View File

@ -31,7 +31,7 @@
android:ellipsize="end"
android:maxLines="1"
android:textColor="?android:textColorPrimary"
android:textSize="16sp"
android:textSize="?attr/status_text_large"
android:textStyle="normal|bold"
tools:text="Display name" />
@ -42,7 +42,7 @@
android:ellipsize="end"
android:maxLines="1"
android:textColor="?android:textColorSecondary"
android:textSize="14sp"
android:textSize="?attr/status_text_medium"
tools:text="\@username" />
</LinearLayout>

View File

@ -2,49 +2,45 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="8dp"
android:gravity="center_vertical">
android:gravity="center_vertical"
android:padding="8dp">
<ImageView
android:id="@+id/avatar"
android:layout_width="42dp"
android:layout_height="42dp"
android:layout_centerVertical="true"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:id="@+id/avatar"
android:src="@drawable/avatar_default"
android:contentDescription="@null" />
android:contentDescription="@null"
android:src="@drawable/avatar_default" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_toEndOf="@id/avatar"
android:layout_toRightOf="@id/avatar"
android:gravity="center_vertical">
android:gravity="center_vertical"
android:orientation="vertical">
<TextView
android:id="@+id/display_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/display_name"
android:maxLines="1"
android:ellipsize="end"
android:textSize="16sp"
android:maxLines="1"
android:textColor="?android:textColorPrimary"
android:textSize="?attr/status_text_large"
android:textStyle="normal|bold" />
<Space
android:layout_width="match_parent"
android:layout_height="4dp" />
<TextView
android:id="@+id/username"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/username"
android:maxLines="1"
android:ellipsize="end"
android:textSize="14sp"
android:textColor="?android:textColorSecondary" />
android:maxLines="1"
android:textColor="?android:textColorSecondary"
android:textSize="?attr/status_text_medium" />
</LinearLayout>

View File

@ -51,7 +51,7 @@
android:ellipsize="end"
android:maxLines="1"
android:textColor="?android:textColorPrimary"
android:textSize="16sp"
android:textSize="?attr/status_text_large"
android:textStyle="normal|bold"
tools:text="Display name" />
@ -62,7 +62,7 @@
android:ellipsize="end"
android:maxLines="1"
android:textColor="?android:textColorSecondary"
android:textSize="14sp"
android:textSize="?attr/status_text_medium"
tools:text="\@username" />
</LinearLayout>

View File

@ -26,6 +26,7 @@
android:paddingLeft="28dp"
android:paddingStart="28dp"
android:textColor="?android:textColorTertiary"
android:textSize="?attr/status_text_medium"
tools:text="Someone followed you" />
<ImageView
@ -40,7 +41,8 @@
android:layout_marginRight="14dp"
android:layout_marginStart="8dp"
android:contentDescription="@string/action_view_profile"
android:scaleType="fitCenter" />
android:scaleType="fitCenter"
android:textSize="?attr/status_text_medium" />
<TextView
android:id="@+id/notification_display_name"
@ -52,6 +54,7 @@
android:ellipsize="end"
android:maxLines="1"
android:textColor="?android:textColorPrimary"
android:textSize="?attr/status_text_medium"
android:textStyle="normal|bold"
tools:text="Test User" />
@ -65,6 +68,7 @@
android:ellipsize="end"
android:maxLines="1"
android:textColor="?android:textColorSecondary"
android:textSize="?attr/status_text_medium"
tools:text="\@testuser" />
</RelativeLayout>

View File

@ -36,7 +36,7 @@
android:ellipsize="end"
android:maxLines="1"
android:textColor="?android:textColorPrimary"
android:textSize="16sp"
android:textSize="?attr/status_text_large"
android:textStyle="normal|bold"
tools:text="Display name" />
@ -47,7 +47,7 @@
android:ellipsize="end"
android:maxLines="1"
android:textColor="?android:textColorSecondary"
android:textSize="14sp"
android:textSize="?attr/status_text_medium"
tools:text="\@username" />
</LinearLayout>

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/footer_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/footer_container">
android:layout_height="match_parent">
<ProgressBar
android:id="@+id/footer_progress_bar"
@ -15,9 +15,10 @@
android:id="@+id/footer_end_message"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:drawablePadding="16dp"
android:text="@string/footer_empty"
android:textAlignment="center"
android:layout_centerInParent="true"
android:drawablePadding="16dp" />
android:textSize="?attr/status_text_medium" />
</RelativeLayout>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<TextView
xmlns:android="http://schemas.android.com/apk/res/android"
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/hashtag"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/hashtag"
android:padding="16dp" />
android:padding="16dp"
android:textSize="?attr/status_text_medium" />

View File

@ -52,7 +52,7 @@
android:ellipsize="end"
android:maxLines="1"
android:textColor="?android:textColorPrimary"
android:textSize="16sp"
android:textSize="?attr/status_text_large"
android:textStyle="normal|bold"
tools:text="Display name" />
@ -63,7 +63,7 @@
android:ellipsize="end"
android:maxLines="1"
android:textColor="?android:textColorSecondary"
android:textSize="14sp"
android:textSize="?attr/status_text_medium"
tools:text="\@username" />
</LinearLayout>

View File

@ -5,16 +5,17 @@
android:orientation="horizontal">
<TextView
android:id="@+id/report_status_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:id="@+id/report_status_content"
android:layout_weight="1"
android:padding="8dp" />
android:padding="8dp"
android:textSize="?attr/status_text_medium" />
<CheckBox
android:id="@+id/report_status_check_box"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/report_status_check_box"
android:layout_gravity="center_vertical"
android:layout_margin="16dp" />

View File

@ -10,7 +10,8 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.91"
android:padding="8dp" />
android:padding="8dp"
android:textSize="?attr/status_text_medium" />
<ImageButton
android:id="@+id/suppr"

View File

@ -20,6 +20,7 @@
android:paddingLeft="38dp"
android:paddingStart="38dp"
android:textColor="?android:textColorTertiary"
android:textSize="?attr/status_text_medium"
tools:text="ConnyDuck boosted" />
<ImageView
@ -69,6 +70,7 @@
android:paddingRight="@dimen/status_display_name_right_padding"
android:paddingStart="0dp"
android:textColor="?android:textColorPrimary"
android:textSize="?attr/status_text_medium"
android:textStyle="normal|bold"
tools:text="Ente" />
@ -83,6 +85,7 @@
android:ellipsize="end"
android:maxLines="1"
android:textColor="?android:textColorSecondary"
android:textSize="?attr/status_text_medium"
tools:text="\@Entenhausen" />
<TextView
@ -94,6 +97,7 @@
android:layout_marginLeft="4dp"
android:layout_marginStart="4dp"
android:textColor="?android:textColorSecondary"
android:textSize="?attr/status_text_medium"
tools:text="13:37" />
</RelativeLayout>
@ -115,7 +119,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:lineSpacingMultiplier="1.1"
android:textColor="?android:textColorPrimary" />
android:textColor="?android:textColorPrimary"
android:textSize="?attr/status_text_medium" />
<ToggleButton
android:id="@+id/status_content_warning_button"
@ -132,7 +137,7 @@
android:textAllCaps="true"
android:textOff="@string/status_content_warning_show_more"
android:textOn="@string/status_content_warning_show_less"
android:textSize="12sp" />
android:textSize="?attr/status_text_medium" />
</com.keylesspalace.tusky.view.FlowLayout>
@ -149,6 +154,7 @@
android:focusable="true"
android:lineSpacingMultiplier="1.1"
android:textColor="?android:textColorPrimary"
android:textSize="?attr/status_text_medium"
tools:text="This is a status" />
<android.support.constraint.ConstraintLayout
@ -279,6 +285,7 @@
android:padding="8dp"
android:textAlignment="center"
android:textColor="@android:color/white"
android:textSize="?attr/status_text_medium"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
@ -292,6 +299,7 @@
android:background="?attr/selectableItemBackground"
android:drawablePadding="4dp"
android:gravity="center_vertical"
android:textSize="?attr/status_text_medium"
android:visibility="gone" />
</android.support.constraint.ConstraintLayout>

View File

@ -37,6 +37,7 @@
android:ellipsize="end"
android:maxLines="1"
android:textColor="?android:textColorPrimary"
android:textSize="?attr/status_text_medium"
android:textStyle="normal|bold"
tools:text="Display Name" />
@ -48,6 +49,7 @@
android:ellipsize="end"
android:maxLines="1"
android:textColor="?android:textColorSecondary"
android:textSize="?attr/status_text_medium"
tools:text="\@ConnyDuck\@mastodon.social" />
</LinearLayout>
@ -67,7 +69,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:lineSpacingMultiplier="1.1"
android:textColor="?android:textColorPrimary" />
android:textColor="?android:textColorPrimary"
android:textSize="?attr/status_text_medium" />
<ToggleButton
android:id="@+id/status_content_warning_button"
@ -82,7 +85,8 @@
android:paddingTop="3dp"
android:textAllCaps="true"
android:textOff="@string/status_content_warning_show_more"
android:textOn="@string/status_content_warning_show_less" />
android:textOn="@string/status_content_warning_show_less"
android:textSize="?attr/status_text_medium" />
</com.keylesspalace.tusky.view.FlowLayout>
@ -94,7 +98,8 @@
android:layout_marginBottom="4dp"
android:focusable="true"
android:lineSpacingMultiplier="1.1"
android:textColor="?android:textColorPrimary" />
android:textColor="?android:textColorPrimary"
android:textSize="?attr/status_text_medium" />
<LinearLayout
android:id="@+id/card_view"
@ -130,7 +135,8 @@
android:ellipsize="end"
android:fontFamily="sans-serif-medium"
android:lines="1"
android:textColor="?android:textColorPrimary" />
android:textColor="?android:textColorPrimary"
android:textSize="?attr/status_text_medium" />
<TextView
android:id="@+id/card_description"
@ -140,7 +146,8 @@
android:ellipsize="end"
android:lineSpacingMultiplier="1.1"
android:maxLines="2"
android:textColor="?android:textColorSecondary" />
android:textColor="?android:textColorSecondary"
android:textSize="?attr/status_text_medium" />
<TextView
android:id="@+id/card_link"
@ -148,7 +155,8 @@
android:layout_height="wrap_content"
android:ellipsize="end"
android:lines="1"
android:textColor="?android:textColorTertiary" />
android:textColor="?android:textColorTertiary"
android:textSize="?attr/status_text_medium" />
</LinearLayout>
</LinearLayout>
@ -278,6 +286,7 @@
android:padding="8dp"
android:textAlignment="center"
android:textColor="@android:color/white"
android:textSize="?attr/status_text_medium"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
@ -291,6 +300,7 @@
android:background="?attr/selectableItemBackground"
android:drawablePadding="4dp"
android:gravity="center_vertical"
android:textSize="?attr/status_text_medium"
android:visibility="gone" />
</android.support.constraint.ConstraintLayout>
@ -302,7 +312,8 @@
android:layout_below="@id/status_media_preview_container"
android:layout_marginBottom="6dp"
android:layout_marginTop="10dp"
android:textColor="?android:textColorTertiary" />
android:textColor="?android:textColorTertiary"
android:textSize="?attr/status_text_medium" />
<LinearLayout
android:layout_width="match_parent"
@ -347,7 +358,8 @@
<TextView
android:id="@+id/status_reblogs"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
android:layout_height="wrap_content"
android:textSize="?attr/status_text_medium" />
<Space
android:layout_width="0dp"
@ -370,7 +382,8 @@
<TextView
android:id="@+id/status_favourites"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
android:layout_height="wrap_content"
android:textSize="?attr/status_text_medium" />
<Space
android:layout_width="0dp"

View File

@ -22,6 +22,7 @@
android:paddingLeft="28dp"
android:paddingStart="28dp"
android:textColor="?android:textColorSecondary"
android:textSize="?attr/status_text_medium"
tools:text="Someone favourited your status" />
<RelativeLayout
@ -48,6 +49,7 @@
android:paddingStart="0dp"
android:textAppearance="@android:style/TextAppearance.DeviceDefault.Small"
android:textColor="?android:textColorTertiary"
android:textSize="?attr/status_text_medium"
android:textStyle="normal|bold"
tools:text="Ente" />
@ -62,6 +64,7 @@
android:ellipsize="end"
android:maxLines="1"
android:textColor="?android:textColorTertiary"
android:textSize="?attr/status_text_medium"
tools:text="\@Entenhausen" />
<TextView
@ -73,6 +76,7 @@
android:layout_marginLeft="4dp"
android:layout_marginStart="4dp"
android:textColor="?android:textColorTertiary"
android:textSize="?attr/status_text_medium"
tools:text="13:37" />
</RelativeLayout>
@ -96,8 +100,10 @@
android:layout_height="wrap_content"
android:lineSpacingMultiplier="1.1"
android:textColor="?android:textColorTertiary"
android:textSize="?attr/status_text_medium"
tools:text="Example CW text" />
<ToggleButton
android:id="@+id/notification_content_warning_button"
android:layout_width="wrap_content"
@ -113,7 +119,7 @@
android:textAllCaps="true"
android:textOff="@string/status_content_warning_show_more"
android:textOn="@string/status_content_warning_show_less"
android:textSize="12sp" />
android:textSize="?attr/status_text_medium" />
</com.keylesspalace.tusky.view.FlowLayout>
@ -127,6 +133,7 @@
android:lineSpacingMultiplier="1.1"
android:paddingBottom="10dp"
android:textColor="?android:textColorTertiary"
android:textSize="?attr/status_text_medium"
tools:text="Example status here" />
<ImageView

View File

@ -5,4 +5,5 @@
android:layout_width="match_parent"
android:layout_height="72dp"
android:text="@string/load_more_placeholder_text"
android:textColor="?attr/colorAccent" />
android:textColor="?attr/colorAccent"
android:textSize="?attr/status_text_medium" />

View File

@ -151,12 +151,20 @@
<item>2 Stunden</item>
</string-array>
<string-array name="post_privacy_names" inputType="integer">
<string-array name="post_privacy_names">
<item>Öffentlich</item>
<item>Nicht gelistet</item>
<item>Nur Folgende</item>
</string-array>
<string name="pref_status_text_size">Schriftgröße</string>
<string-array name="status_text_size_names">
<item>Klein</item>
<item>Normal</item>
<item>Groß</item>
</string-array>
<string name="notification_mention_format">%s hat dich erwähnt</string>
<string name="notification_summary_large">%1$s, %2$s, %3$s und %4$d andere</string>
<string name="notification_summary_medium">%1$s, %2$s, und %3$s</string>

View File

@ -46,5 +46,10 @@
<attr name="card_image_background" format="reference|color" />
<attr name="play_indicator_drawable" format="reference" />
<attr name="status_text_small" format="dimension" />
<attr name="status_text_medium" format="dimension" />
<attr name="status_text_large" format="dimension" />
</resources>

View File

@ -19,9 +19,15 @@
<item>120</item>
</string-array>
<string-array name="post_privacy_values" inputType="integer">
<string-array name="post_privacy_values">
<item>public</item>
<item>unlisted</item>
<item>private</item>
</string-array>
<string-array name="status_text_size_values">
<item>small</item>
<item>medium</item>
<item>large</item>
</string-array>
</resources>

View File

@ -191,12 +191,20 @@
<string name="pref_default_post_privacy">Default post privacy</string>
<string name="pref_publishing">Publishing</string>
<string-array name="post_privacy_names" inputType="integer">
<string-array name="post_privacy_names">
<item>Public</item>
<item>Unlisted</item>
<item>Followers-only</item>
</string-array>
<string name="pref_status_text_size">Status text size</string>
<string-array name="status_text_size_names">
<item>Small</item>
<item>Medium</item>
<item>Large</item>
</string-array>
<string name="notification_channel_mention_name">New Mentions</string>
<string name="notification_channel_mention_descriptions">Notifications about new mentions</string>
<string name="notification_channel_follow_name">New Followers</string>

View File

@ -1,5 +1,21 @@
<resources>
<style name="TextSizeSmall">
<item name="status_text_small">12dp</item>
<item name="status_text_medium">14dp</item>
<item name="status_text_large">16dp</item>
</style>
<style name="TextSizeMedium">
<item name="status_text_small">14dp</item>
<item name="status_text_medium">16dp</item>
<item name="status_text_large">18dp</item>
</style>
<style name="TextSizeLarge">
<item name="status_text_small">16dp</item>
<item name="status_text_medium">18dp</item>
<item name="status_text_large">20dp</item>
</style>
<style name="TabLayoutTextStyle" parent="TextAppearance.Design.Tab">
<item name="android:textStyle">normal|bold</item>
</style>
@ -19,7 +35,6 @@
<!--Base Application Theme Styles (Dark)-->
<style name="AppTheme" parent="Theme.AppCompat.NoActionBar">
<item name="android:textSize">15sp</item>
<item name="colorPrimary">@color/color_primary_dark</item>
<item name="colorPrimaryDark">@color/color_primary_dark_dark</item>
<item name="colorAccent">@color/color_accent_dark</item>
@ -106,8 +121,6 @@
<!--Light Application Theme Styles-->
<style name="AppTheme.Light" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:textSize">15sp</item>
<item name="colorPrimary">@color/color_primary_light</item>
<item name="colorPrimaryDark">@color/color_primary_dark_light</item>
<item name="colorAccent">@color/color_accent_light</item>
@ -174,7 +187,7 @@
<item name="play_indicator_drawable">@drawable/ic_play_indicator_light</item>
</style>
</style>
<style name="AppTheme.ImageButton.Light" parent="Widget.AppCompat.Button.Borderless.Colored">
<item name="android:tint">@color/image_button_light</item>
@ -191,4 +204,8 @@
<item name="windowActionBarOverlay">true</item>
</style>
<style name="TuskyTabAppearance" parent="TextAppearance.Design.Tab">
<item name="android:textSize">?attr/status_text_medium</item>
</style>
</resources>

View File

@ -9,6 +9,14 @@
android:key="lightTheme"
android:title="@string/pref_title_light_theme" />
<ListPreference
android:defaultValue="medium"
android:entries="@array/status_text_size_names"
android:entryValues="@array/status_text_size_values"
android:key="statusTextSize"
android:summary="%s"
android:title="@string/pref_status_text_size" />
<CheckBoxPreference
android:defaultValue="false"
android:key="fabHide"