I currently have a textview that is centered, and would like to add another textview below the centered textview, but it just places it at the same place as the previous textview, is there a way to fix this?
Code:
<FrameLayout
android:layout_width="350dp"
android:layout_height="500dp"
android:background="@color/white">
<TextView
android:id="@+id/info_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:text="@string/test"
android:textSize="18sp"
android:textStyle="normal"
/>
<TextView
android:id="@+id/info_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:text="@string/test"
android:textSize="18sp"
android:textStyle="normal"
/>
</FrameLayout>
Your are setting gravity in 2nd textview as center remove it or use your desire gravity there