Skip to content
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

Text size and brightness preferences to show a preview under seek bar #1522

Closed
wants to merge 1 commit into from

Conversation

amynbe
Copy link
Contributor

@amynbe amynbe commented Jan 2, 2021

#708

pref_preview.mp4

Copy link
Contributor Author

@amynbe amynbe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have tried an approach with preview text under the seek bar.

@@ -432,7 +432,7 @@ internal class TranslationAdapter(private val context: Context,

companion object {
private val USE_UTHMANI_SPAN = Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP
private const val ARABIC_MULTIPLIER = 1.4f
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

making this public so SeekBarTextSizePreference can show an accurate preview of arabic text size

@@ -51,6 +51,28 @@
/>
</LinearLayout>

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding these 2 text views under the seekbar, one for arabic and one for the translated language.
They are hidden by default in SeekBarPreference.java and the overriding classes opt in to show them and do something with them (i.e apply text size or brightness on them).

Copy link
Contributor

@ahmedre ahmedre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

really sorry for the very late reply - this looks great masha'Allah! minor comment about the Arabic string, but let's merge this in sha' Allah

android:id="@+id/arabic_preview"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="معاينة"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be @string/prefs_preview and we should add to values-ar/strings.xml

Copy link
Contributor

@ahmedre ahmedre Jan 30, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh - i see why now - will just show one depending on the language

android:id="@+id/arabic_preview"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="معاينة"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

@ahmedre
Copy link
Contributor

ahmedre commented Jan 30, 2021

jazakumAllah khairan - merged here - 25a8d74

@ahmedre ahmedre closed this Jan 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants