labelTV.setGravity(Gravity.CENTER | Gravity.BOTTOM);
Kotlin version (thanks to Thommy)
labelTV.gravity = Gravity.CENTER_HORIZONTAL or Gravity.BOTTOM
Also, are you talking about gravity or about layout_gravity? The latter won’t work in a RelativeLayout.
More Related Contents:
- How to change fontFamily of TextView in Android
- How to put a border around an Android TextView?
- Android Paint: .measureText() vs .getTextBounds()
- Place 2 textview beside each other with 2nd textview always visible
- How do I use a compound drawable instead of a LinearLayout that contains an ImageView and a TextView
- What does ellipsize mean in android?
- How to Show Circular Text using TextView in Android
- Whatsapp Message Layout – How to get time-view in the same row
- How to Measure TextView Height Based on Device Width and Font Size?
- Align top of image to top of TextView
- How to reverse the direction of marquee of a TextView
- How to use textview.getLayout()? It returns null
- Should use “sp” instead of “dp” for text sizes
- How do I add a bullet symbol in TextView?
- How add TextView in middle of SeekBar thumb? [duplicate]
- Why not use always android:configChanges=”keyboardHidden|orientation”?
- Set color of TextView span in Android
- Lollipop’s backgroundTint has no effect on a Button
- Android: How to create a Dialog without a title?
- Add ripple effect to my button with button background color?
- Is it possible to write vertically in a textview in android?
- CardView layout_width=”match_parent” does not match parent RecyclerView width
- Centering RecyclerView items with FlexboxLayoutManager
- Custom attributes in styles.xml
- Adding content to a linear layout dynamically?
- How to change default images of CheckBox
- Rotate View Hierarchy 90 degrees
- Mask ImageView with round corner background
- Setting Action Bar title and subtitle
- Android SlidingTabLayout with icons