-
-
Notifications
You must be signed in to change notification settings - Fork 457
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add RTL Support #1842
Add RTL Support #1842
Conversation
I am open to any feedback! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found 17 potential problems in the proposed changes. Check the Files changed tab for more details.
Sorry for the wait. I'm currently busy preparing the 0.14 release and this PR might break some things so it will be added for 0.15 to give us some more time to test it. From a quick glance it looks fine but I'll properly review it in the coming weeks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found 17 potential problems in the proposed changes. Check the Files changed tab for more details.
No worries mate. Take your time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found 17 potential problems in the proposed changes. Check the Files changed tab for more details.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm looking into it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found 17 potential problems in the proposed changes. Check the Files changed tab for more details.
It only showed in the browsing screen (so when in a library) |
I couldn't reproduce it. I am guessing maybe it has to do with your non-stock theme. Should I just eliminate shadows going down? |
Also are we sure these are shadows? |
It's the default theme
Partially background, partially shadow |
I meant your OS theme. The title progress bar and the tick don't look the same on my machine. Honestly, I couldn't reproduce it so I don't know what to do. |
Testing was done with the Android emulator (Android 12) with nothing changed. |
I tried both Android 12 TV emulator images available in Android Studio. Neither look like your screenshot. They looked more like mine. There was a light blue circle tick on the cards and no shadow. I'm sorry, I couldn't reproduce the issue. I don't know what to do. |
Did some more testing and apparently this only happens when the library is set to align items vertically, weirdly enough. |
Thank you! I managed to reproduce it! I'll investigate the root cause. |
It should be fixed now. |
@@ -452,7 +452,7 @@ | |||
if (item.getBaseItemType() == BaseItemType.Series) { | |||
firstRow = new InfoItem( | |||
getString(R.string.lbl_seasons), | |||
Utils.getSafeValue(item.getChildCount(), 0).toString()); | |||
String.format("%d", Utils.getSafeValue(item.getChildCount(), 0))); |
Check notice
Code scanning
Implied default locale in case conversion
@@ -816,7 +816,7 @@ | |||
|
|||
private String getRunTime() { | |||
Long runtime = Utils.getSafeValue(mBaseItem.getRunTimeTicks(), mBaseItem.getOriginalRunTimeTicks()); | |||
return runtime != null && runtime > 0 ? (int) Math.ceil((double) runtime / 600000000) + getString(R.string.lbl_min) : ""; | |||
return runtime != null && runtime > 0 ? String.format("%d%s", (int) Math.ceil((double) runtime / 600000000), getString(R.string.lbl_min)) : ""; |
Check notice
Code scanning
Implied default locale in case conversion
@@ -50,7 +50,8 @@ | |||
android:largeHeap="true" | |||
android:roundIcon="@drawable/app_icon_round" | |||
android:theme="@style/Theme.Jellyfin" | |||
android:usesCleartextTraffic="true"> | |||
android:usesCleartextTraffic="true" |
Check notice
Code scanning
Attribute unused on older versions
@@ -234,7 +237,7 @@ | |||
|
|||
TextView amt = new TextView(context); | |||
amt.setTextSize(textSize); | |||
amt.setText(item.getCommunityRating().toString()+" "); | |||
amt.setText(nf.format(item.getCommunityRating()) + " "); |
Check notice
Code scanning
TextView Internationalization
@@ -252,7 +255,7 @@ | |||
layout.addView(tomato); | |||
TextView amt = new TextView(context); | |||
amt.setTextSize(textSize); | |||
amt.setText(item.getCriticRating().toString() + "% "); | |||
amt.setText(nfp.format(item.getCriticRating()/100) + " "); |
Check notice
Code scanning
TextView Internationalization
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to work now! Thanks!
Changes
I added RTL support for this app. Most of the work was clicking the refactor button in Android Studio. Other parts included properly formatting numbers (to support Eastern Arabic Numbers, for example), rewriting certain layouts (like legacy card image layout) and adding more constraints to others.
Issues
None