0
I wonder how I put the text inside a cardview higher.
In my code it’s like this:
<android.support.v7.widget.CardView
android:id="@+id/card_view8"
android:layout_width="fill_parent"
android:layout_height="50dp"
android:layout_gravity="center"
android:layout_margin="5dp"
android:background="@color/colorPrimaryDark"
card_view:cardCornerRadius="2dp"
card_view:contentPadding="10dp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/textView26"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:text="DETALHES"
android:layout_centerInParent="true"
android:textAppearance="?android:attr/textAppearanceLarge" />
</RelativeLayout>
</android.support.v7.widget.CardView>
Also enter your cardView code
– Furflez
Edit your question placing their codes to complement... But from what I took a quick look, I may be wrong, but you set the height of the cardView as 50dp, set to center whatever is inside it and are using a 10dp padding that is pushing your
textView
, and how he is Large, ends up getting cut up...– Furflez
Try to give a paddingBottom, will solve this problem, you can go testing as it is by own preview of Android Studio
– Leonardo Dias
@Furflez did what you requested. Thanks for the tip.
– Artur Mafezzoli Júnior
@Leonardodias put so in the android code:paddingBottom="@dimen/activity_vertical_margin" and was the same thing.
– Artur Mafezzoli Júnior