我無法在顯示屏上看到我的TextView。我把的LinearLayout和TextView的在RelativeLayout的,但只有LinearLayout中可以看出,而不是TextView的TextView在Android Studio的RelativeLayout中不起作用
請幫我這個代碼。在此先感謝
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_height="match_parent"
android:layout_width="match_parent"
>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context="com.example.dakshesh.happybirthday.MainActivity">
<ImageView
android:src="@mipmap/ic_launcher"
android:layout_height="0dp"
android:layout_width="match_parent"
android:layout_weight="1"
android:scaleType="centerCrop"
/>
<ImageView
android:src="@mipmap/ic_launcher"
android:layout_height="0dp"
android:layout_width="match_parent"
android:layout_weight="1"
android:scaleType="centerCrop"
/>
<ImageView
android:src="@mipmap/ic_launcher"
android:layout_height="0dp"
android:layout_width="match_parent"
android:layout_weight="1"
android:scaleType="centerCrop"
/>
</LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="16sp"
android:textStyle="bold"
android:textSize="20dp"
android:text="Bahubali"
/>
</RelativeLayout>
如果你想顯示的'TextView'?在視圖的頂部或視圖的底部?請詳細說明。 –
請粘貼您的代碼,而不是包含鏈接。 – jlively
使用'ScrollView'來獲取'TextView' –