ImageView 바로 아래에 TextView를 정렬하려고했지만 작동하지 않습니다.
ImageView의 오른쪽에 맞 춥니 다.GridView에서 ImageView 바로 아래에 TextView를 정렬하는 방법은 무엇입니까?
이것은 내가 한 행동입니다.
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="5dp" >
<ImageView
android:id="@+id/grid_image"
android:layout_width="70dp"
android:layout_height="70dp">
</ImageView>
<TextView
android:id="@+id/grid_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:layout_marginTop="15dp"
android:singleLine="false"
android:textSize="12sp" >
</TextView>
</LinearLayout>
시도 당신은 이미지 뷰와있는 LinearLayout 필요하지 않습니다 선형 레이아웃 –
에 수직 방향을 제공하기 . 이미지를 TextView 내부에 ** 복합 드로어 블 **로 저장합니다. 보기 및 ViewGroups (및 중첩 된 것들!)에 저장하면 앱 성능이 향상됩니다. –