<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:text="@string/**yourtextstring**"
/>
set the 'gravity' attribute center_horizontal and center_vertical
yourTextView.setGravity(Gravity.CENTER);
Code Example |
---|
Css :: flexbox go to next row |
Css :: tailwindcss forms plugin |
Css :: @media for mobile |
Css :: rotate text css |
Css :: how to do a background blur in css |
Css :: tailwind remove button outline |
Css :: instagram gradient css |
Css :: css flip image horizontally |
Css :: ajouter une image dans un before after |
Css :: css first child |
Css :: use font awesome as content in css |
Css :: css resize image without distortion |
Css :: flip image css |
Css :: ion-slider pagination color |
Css :: list style position |
Css :: html font white text with black border |
Css :: invisible button css |
Css :: make images same size css |
Css :: css detect if input has value |
Css :: give transition on box shadow |
Css :: bootstrap text truncate |
Css :: remove outline of input css |
Css :: how to center an overlay button using flex box |
Css :: check if swap is working |
Css :: clearfix css |
Css :: nunito font |
Css :: css media query |
Css :: css not class |
Css :: circle background image css |
Css :: mat radio button color |