Skip to content
This repository was archived by the owner on Sep 3, 2024. It is now read-only.

Commit c1b8940

Browse files
authored
app: revert using included sesl_roboto font set (#68)
Signed-off-by: BlackMesa123 <[email protected]>
1 parent 5c033d5 commit c1b8940

21 files changed

+50
-58
lines changed

yanndroid/oneui/src/main/java/androidx/appcompat/widget/SeslDropDownItemTextView.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public SeslDropDownItemTextView(Context context, AttributeSet attributeSet, int
3131
public void setChecked(boolean z) {
3232
Context context;
3333
super.setChecked(z);
34-
setTypeface(ResourcesCompat.getFont(getContext(), R.font.sesl_roboto), z ? 1 : 0);
34+
setTypeface(Typeface.create("sec-roboto-light", z ? 1 : 0));
3535
if (z && (context = getContext()) != null && getCurrentTextColor() == -65281) {
3636
Log.w(TAG, "text color reload!");
3737
ColorStateList colorStateList = ResourcesCompat.getColorStateList(context.getResources(), R.color.sesl_spinner_dropdown_text_color, context.getTheme());

yanndroid/oneui/src/main/java/de/dlyt/yanndroid/oneui/layout/AboutPage.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public void onClick(View view) {
108108
});
109109

110110
if (mIsOneUI4) {
111-
app_name.setTypeface(ResourcesCompat.getFont(context, R.font.sesl_roboto), Typeface.NORMAL);
111+
app_name.setTypeface(Typeface.create(getResources().getString(R.string.sesl_font_family_regular), Typeface.NORMAL));
112112
app_name.setTextSize(0, getResources().getDimension(R.dimen.sesl4_about_app_name_text_size));
113113
version.setTextSize(0, getResources().getDimension(R.dimen.sesl4_about_secondary_text_size));
114114
about_optional_text.setTextSize(0, getResources().getDimension(R.dimen.sesl4_about_secondary_text_size));

yanndroid/oneui/src/main/java/de/dlyt/yanndroid/oneui/menu/PopupMenu.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ private TextView createTitleView() {
170170
context.getResources().getDimensionPixelSize(R.dimen.sesl_context_menu_title_end_padding),
171171
context.getResources().getDimensionPixelSize(R.dimen.sesl_context_menu_title_bottom_padding));
172172
titleView.setTextColor(context.getResources().getColor(R.color.item_color));
173-
titleView.setTypeface(ResourcesCompat.getFont(context, R.font.sesl_roboto), Typeface.BOLD);
173+
titleView.setTypeface(Typeface.create(context.getResources().getString(R.string.sesl_font_family_regular), Typeface.BOLD));
174174
titleView.setTextAlignment(View.TEXT_ALIGNMENT_VIEW_START);
175175
titleView.setMaxLines(2);
176176
titleView.setTextSize(TypedValue.COMPLEX_UNIT_PX, context.getResources().getDimensionPixelSize(R.dimen.sesl_context_menu_title_text_size));

yanndroid/oneui/src/main/java/de/dlyt/yanndroid/oneui/preference/HorizontalRadioPreference.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import android.annotation.SuppressLint;
44
import android.content.Context;
55
import android.content.res.TypedArray;
6+
import android.graphics.Typeface;
67
import android.os.Parcel;
78
import android.os.Parcelable;
89
import android.text.TextUtils;
@@ -323,10 +324,10 @@ private void invalidate() {
323324
if (!mIsDividerEnabled)
324325
radioButton.jumpDrawablesToCurrentState();
325326
tv1.setSelected(z);
326-
tv1.setTypeface(null, z ? 1 : 0);
327+
tv1.setTypeface(Typeface.create("sec-roboto-light", z ? 1 : 0));
327328
if (tv2 != null) {
328329
tv2.setSelected(z);
329-
tv2.setTypeface(null, z ? 1 : 0);
330+
tv2.setTypeface(Typeface.create("sec-roboto-light", z ? 1 : 0));
330331
}
331332
if (mIsColorFilterEnabled && imageView != null) {
332333
imageView.setColorFilter(z ? mSelectedColor : mUnselectedColor);

yanndroid/oneui/src/main/java/de/dlyt/yanndroid/oneui/sesl/tabs/SamsungBaseTabLayout.java

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
import androidx.appcompat.content.res.AppCompatResources;
4646
import androidx.appcompat.widget.TooltipCompat;
4747
import androidx.core.content.ContextCompat;
48-
import androidx.core.content.res.ResourcesCompat;
4948
import androidx.core.graphics.drawable.DrawableCompat;
5049
import androidx.core.util.Pools;
5150
import androidx.core.view.AccessibilityDelegateCompat;
@@ -90,14 +89,15 @@ public class SamsungBaseTabLayout extends HorizontalScrollView {
9089
public boolean inlineLabel;
9190
public int mBadgeColor;
9291
public int mBadgeTextColor;
92+
public Typeface mBoldTypeface;
9393
public int mDepthStyle;
9494
public int mIconTextGap;
9595
public boolean mIsScaledTextSizeType;
96+
public Typeface mNormalTypeface;
9697
public int mRequestedTabWidth;
9798
public int mSubTabIndicatorHeight;
9899
public int mSubTabSelectedIndicatorColor;
99100
public int mTabSelectedIndicatorColor;
100-
public Typeface mTypeface;
101101
public int mode;
102102
public TabLayoutOnPageChangeListener pageChangeListener;
103103
public PagerAdapter pagerAdapter;
@@ -197,7 +197,9 @@ public SamsungBaseTabLayout(Context var1, AttributeSet var2, int var3) {
197197
}
198198

199199
Resources var12 = this.getResources();
200-
this.mTypeface = ResourcesCompat.getFont(var1, R.font.sesl_roboto);
200+
String var13 = var12.getString(R.string.sesl_font_family_regular);
201+
this.mBoldTypeface = Typeface.create(var13, 1);
202+
this.mNormalTypeface = Typeface.create(var13, 0);
201203
this.mSubTabIndicatorHeight = var12.getDimensionPixelSize(R.dimen.sesl_tablayout_subtab_indicator_height);
202204
if (var9.hasValue(R.styleable.SamsungTabLayout_tabTextColor)) {
203205
this.tabTextColors = MaterialResources.getColorStateList(var1, var9, R.styleable.SamsungTabLayout_tabTextColor);
@@ -1087,7 +1089,7 @@ public final void setSelectedTabView(int var1, boolean var2) {
10871089
if (var4 == var1) {
10881090
if (var8.textView != null) {
10891091
this.startTextColorChangeAnimation(var8.textView, this.getSelectedTabTextColor());
1090-
var8.textView.setTypeface(mTypeface, Typeface.BOLD);
1092+
var8.textView.setTypeface(this.mBoldTypeface);
10911093
var8.textView.setSelected(true);
10921094
}
10931095

@@ -1106,7 +1108,7 @@ public final void setSelectedTabView(int var1, boolean var2) {
11061108
}
11071109

11081110
if (var8.textView != null) {
1109-
var8.textView.setTypeface(mTypeface, Typeface.NORMAL);
1111+
var8.textView.setTypeface(this.mNormalTypeface);
11101112
this.startTextColorChangeAnimation(var8.textView, this.tabTextColors.getDefaultColor());
11111113
var8.textView.setSelected(false);
11121114
}
@@ -2290,7 +2292,7 @@ public final boolean startTabTouchAnimation(MotionEvent var1, KeyEvent var2) {
22902292
if (var3 != 0) {
22912293
if (var3 != 1) {
22922294
if (var3 == 3) {
2293-
this.textView.setTypeface(mTypeface, Typeface.NORMAL);
2295+
this.textView.setTypeface(SamsungBaseTabLayout.this.mNormalTypeface);
22942296
var5 = SamsungBaseTabLayout.this;
22952297
var5.startTextColorChangeAnimation(this.textView, var5.tabTextColors.getDefaultColor());
22962298
var6 = this.mIndicatorView;
@@ -2303,7 +2305,7 @@ public final boolean startTabTouchAnimation(MotionEvent var1, KeyEvent var2) {
23032305
if (var7 != null) {
23042306
var4 = var7.view.textView;
23052307
if (var4 != null) {
2306-
var4.setTypeface(mTypeface, Typeface.BOLD);
2308+
var4.setTypeface(SamsungBaseTabLayout.this.mBoldTypeface);
23072309
var8 = SamsungBaseTabLayout.this;
23082310
var8.startTextColorChangeAnimation(var7.view.textView, var8.getSelectedTabTextColor());
23092311
}
@@ -2341,7 +2343,7 @@ public final boolean startTabTouchAnimation(MotionEvent var1, KeyEvent var2) {
23412343
if (this.tab.position != SamsungBaseTabLayout.this.getSelectedTabPosition()) {
23422344
TextView var9 = this.textView;
23432345
if (var9 != null) {
2344-
var9.setTypeface(mTypeface, Typeface.BOLD);
2346+
var9.setTypeface(SamsungBaseTabLayout.this.mBoldTypeface);
23452347
var5 = SamsungBaseTabLayout.this;
23462348
var5.startTextColorChangeAnimation(this.textView, var5.getSelectedTabTextColor());
23472349
var6 = this.mIndicatorView;
@@ -2354,7 +2356,7 @@ public final boolean startTabTouchAnimation(MotionEvent var1, KeyEvent var2) {
23542356
if (var7 != null) {
23552357
var4 = var7.view.textView;
23562358
if (var4 != null) {
2357-
var4.setTypeface(mTypeface, Typeface.NORMAL);
2359+
var4.setTypeface(SamsungBaseTabLayout.this.mNormalTypeface);
23582360
var8 = SamsungBaseTabLayout.this;
23592361
var8.startTextColorChangeAnimation(var7.view.textView, var8.tabTextColors.getDefaultColor());
23602362
}

yanndroid/oneui/src/main/java/de/dlyt/yanndroid/oneui/view/OptionButton.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public void setIcon(Drawable icon) {
103103
public void setButtonSelected(Boolean selected) {
104104
this.mSelected = selected;
105105
setTextColor(mSelected);
106-
textView.setTypeface(ResourcesCompat.getFont(getContext(), R.font.sesl_roboto), mSelected ? Typeface.BOLD : Typeface.NORMAL);
106+
textView.setTypeface(Typeface.create(getResources().getString(R.string.sesl_font_family_regular), mSelected ? Typeface.BOLD : Typeface.NORMAL));
107107
}
108108

109109
public void toggleButtonSelected() {
-1.64 MB
Binary file not shown.
-1.62 MB
Binary file not shown.

yanndroid/oneui/src/main/res/font/sesl_roboto.xml

Lines changed: 0 additions & 11 deletions
This file was deleted.

yanndroid/oneui/src/main/res/layout-land/setting_color_picker_layout.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
android:layout_height="fill_parent"
5858
android:background="@drawable/setting_dialog_action_button_ripple"
5959
android:focusable="true"
60-
android:fontFamily="@font/sesl_roboto"
60+
android:fontFamily="@string/sesl_font_family_regular"
6161
android:gravity="center"
6262
android:includeFontPadding="false"
6363
android:singleLine="true"
@@ -86,7 +86,7 @@
8686
android:layout_height="fill_parent"
8787
android:background="@drawable/setting_dialog_action_button_ripple"
8888
android:focusable="true"
89-
android:fontFamily="@font/sesl_roboto"
89+
android:fontFamily="@string/sesl_font_family_regular"
9090
android:gravity="center"
9191
android:includeFontPadding="false"
9292
android:text="@string/sesl_done"

0 commit comments

Comments
 (0)