Use sp for the label font size
Make it scalable (e.g. with the font size defined in the Accessibility settings)
This commit is contained in:
parent
5cd2a65dfe
commit
6d47f220b9
3 changed files with 8 additions and 9 deletions
|
@ -27,7 +27,6 @@ import android.graphics.ColorFilter;
|
|||
import android.support.v7.widget.CardView;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.text.TextUtils;
|
||||
import android.util.TypedValue;
|
||||
import android.view.View;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.ImageView;
|
||||
|
@ -133,8 +132,8 @@ public class EntryViewHolder extends RecyclerView.ViewHolder
|
|||
}
|
||||
|
||||
public void setLabelSize(int size) {
|
||||
label.setTextSize(TypedValue.COMPLEX_UNIT_PT, size);
|
||||
tags.setTextSize(TypedValue.COMPLEX_UNIT_PT, size - 2);
|
||||
label.setTextSize(size);
|
||||
tags.setTextSize(0.75f * size);
|
||||
}
|
||||
|
||||
public void setLabelScroll(boolean active) {
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:textSize="8pt" />
|
||||
android:textSize="18sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textViewTags"
|
||||
|
@ -85,7 +85,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:textSize="6pt" />
|
||||
android:textSize="13.5sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
<string name="settings_key_lang" translatable="false">pref_lang</string>
|
||||
<string name="settings_key_theme" translatable="false">pref_theme</string>
|
||||
<string name="settings_key_label_size" translatable="false">pref_label_size</string>
|
||||
<string name="settings_key_label_size" translatable="false">pref_label_size_sp</string>
|
||||
<string name="settings_key_label_scroll" translatable="false">pref_label_scroll</string>
|
||||
|
||||
<string name="settings_key_backup_ask" translatable="false">pref_backup_ask</string>
|
||||
|
@ -36,7 +36,7 @@
|
|||
<string name="settings_default_auth" translatable="false">none</string>
|
||||
<string name="settings_default_lang" translatable="false">system</string>
|
||||
<string name="settings_default_theme" translatable="false">light</string>
|
||||
<integer name="settings_default_label_size">8</integer>
|
||||
<integer name="settings_default_label_size">18</integer>
|
||||
|
||||
<!-- List values -->
|
||||
<string-array name="settings_values_auth" translatable="false">
|
||||
|
@ -75,6 +75,6 @@
|
|||
</string-array>
|
||||
|
||||
<!-- Constraints -->
|
||||
<integer name="settings_min_label_size">4</integer>
|
||||
<integer name="settings_max_label_size">12</integer>
|
||||
<integer name="settings_min_label_size">12</integer>
|
||||
<integer name="settings_max_label_size">24</integer>
|
||||
</resources>
|
Loading…
Reference in a new issue