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

Enlarge text size #6

Open
deepu2 opened this issue Feb 2, 2019 · 5 comments
Open

Enlarge text size #6

deepu2 opened this issue Feb 2, 2019 · 5 comments
Labels
bug Something isn't working

Comments

@deepu2
Copy link

deepu2 commented Feb 2, 2019

The text is very small and hard to read.
https://photos.app.goo.gl/QUa7jZ4dxtCpqTeh9


We're using [Polar.sh](https://polar.sh/niccokunzmann) so you can upvote and help fund this issue. We receive the funding once the issue is completed & confirmed by you. Thank you in advance for helping prioritize & fund our work. Fund with Polar
@niccokunzmann
Copy link
Owner

Yes, that is very small.
If you like, you can contribute a bigger text size.
However, for my screen it is ok - small old phone.

https://github.com/niccokunzmann/bhagavad-gita-android/blob/master/app/src/main/res/values/dimens.xml
What would happen if we do not set it in pixels - is there any other measurement unit? Maybe millimeters or em like in the browser.

If you like, you can test out solutions.


![](https://lh3.googleusercontent.com/WxSc-O60kHskah9JLQtA9WJZd-zajHp0FxfaVDTikcGqlltSOz7J6uaCxRgJsQPv3xCOT8LA4LdHOh9TwwWonxVgWZwvAaeK9bDkGYQmPldOJoTLCMm4fWcsT7EMKuy-0X2CBNzrp5s=w550-h941-no)

@niccokunzmann niccokunzmann added the bug Something isn't working label Feb 2, 2019
@ghost
Copy link

ghost commented Feb 3, 2019

Hope it helps. The relevant links from official source:

https://developer.android.com/guide/practices/screens_support (parent link, generally useful)

the relevant code examples:

For Java ( click to expand )

// The gesture threshold expressed in dp
private static final float GESTURE_THRESHOLD_DP = 16.0f;

// Get the screen's density scale
final float scale = getResources().getDisplayMetrics().density;
// Convert the dps to pixels, based on density scale
mGestureThreshold = (int) (GESTURE_THRESHOLD_DP * scale + 0.5f);

// Use mGestureThreshold as a distance in pixels...

For Kotlin ( click to expand )

// The gesture threshold expressed in dp
private const val GESTURE_THRESHOLD_DP = 16.0f
...
private var mGestureThreshold: Int = 0
...
override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)

    // Get the screen's density scale
    val scale: Float = resources.displayMetrics.density
    // Convert the dps to pixels, based on density scale
    mGestureThreshold = (GESTURE_THRESHOLD_DP * scale + 0.5f).toInt()

    // Use mGestureThreshold as a distance in pixels...
}

@niccokunzmann
Copy link
Owner

niccokunzmann commented Feb 3, 2019

@snow8gaia Thanks, this is relevant. I wonder how to approach it: Should we use dp instead of pixels or use different settings as shown in the table for different screen sizes.

I think, someone can try a dp value which works for them, post it here and I will also have a look if it works on my screen.

@maxolasersquad
Copy link

On top of the given documentation, a way to configure the size would be helpful. Far-sighted people may need bigger text on the same screen as those without.

@ghost
Copy link

ghost commented May 10, 2019

To be clear, I am not working on this.

( tautological statement )

The [English source](https://bhagavadgita.io/) is an abominable translation, ignoring phonetics ; because its already translated to Hindi.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants