medyo / android-about-page

Create an awesome About Page for your Android App in 2 minutes
2.04k stars 283 forks source link

Left align description text #125

Open apps4research opened 5 years ago

apps4research commented 5 years ago

Is it possible to left-align the description text somehow. I've tried overwriting the gravity for the about library in my styles xml but it has no affect.

apps4research commented 5 years ago

Alternatively, if I could disable the standard description and use .addItem which I can customise that would solve my problem. However, I can't seem to not show the standard description.

viniciusthiengo commented 5 years ago

@apps4research, how are you?

You can access description TextView by ID and then update gravity property, like follow:

// Do that after calling setContentView( aboutPage ). val description = findViewById<TextView>( R.id.description ) description.gravity = Gravity.START

To know more about about_page.xml IDs you can access: https://github.com/medyo/android-about-page/blob/master/library/src/main/res/layout/about_page.xml

I know what you probably are thinking about: why did you not use "kotlin-android-extensions" syntax?

Yes, I tried, but it did not work. So, findViewById() was an another option.

Have a good one.

Att, Vinícius Thiengo.