내가, 당신이 볼 수있는 각 구분자의 중심에 타일이 같은 배경 이미지와 세 개의 텍스트 뷰있을 것이다 레이아웃의 종류를 디자인 할 때 TextView 텍스트 크기 중 하나가 증가하면 다른 Textiew는 같은 위치에 유지됩니다.
2
A
답변
2
는 u는이
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<TextView
android:id="@+id/textView1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text="TextView" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/textView2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_horizontal"
android:text="TextView" />
<TextView
android:id="@+id/textView3"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_horizontal"
android:text="TextView" />
<TextView
android:id="@+id/textView4"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_horizontal"
android:text="TextView" />
</LinearLayout>
</LinearLayout>
1
이 시도 시도 할 수 있습니다 ..
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#0D181E" >
<TextView
android:id="@+id/txt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_alignParentTop="true"
android:text="TextView"
android:textColor="#FFFFFF"
android:layout_margin="5dp"
android:textSize="20dp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignBottom="true"
android:layout_below="@+id/txt"
android:orientation="horizontal" >
<TextView
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="TextView"
android:textColor="#FFFFFF"
android:layout_margin="5dp"
android:layout_gravity="center"
android:gravity="center"
android:textSize="20dp" />
<view
android:layout_width="2dp"
android:layout_height="match_parent"
android:textColor="#FFFFFF"
/>
<TextView
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="TextView"
android:textColor="#FFFFFF"
android:layout_margin="5dp"
android:layout_gravity="center"
android:gravity="center"
android:textSize="20dp" />
<view
android:layout_width="2dp"
android:layout_height="match_parent"
android:textColor="#FFFFFF"
/>
<TextView
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="TextView"
android:textColor="#FFFFFF"
android:layout_margin="5dp"
android:layout_gravity="center"
android:gravity="center"
android:textSize="20dp" />
</LinearLayout>
</RelativeLayout>
1
는 U 드래그 수 있으며, XML 파일의 하락은 당신의 소원을 가지고 있지만 조언은 상대 레이아웃을 사용합니다. 그것은 일부 전체 시나리오를 사용할 수 있습니다
관련 문제
- 1. 안드로이드 레이아웃 : 내 레이아웃에 텍스트 뷰를 배치해야
- 2. 안드로이드 : 그리드 레이아웃에 뷰를 배치하는 방법
- 3. 텍스트 뷰를 나란히 배치하는 방법은 무엇입니까?
- 4. 안드로이드 : 템플릿 파일에서 텍스트 뷰를 생성하고 기존의 텍스트 뷰
- 5. 에 Superclasses 및 레이아웃 안드로이드
- 6. CCUIViewWrapper로 뷰를 배치하는 방법
- 7. 안드로이드, 레이아웃 이미지 및 텍스트
- 8. 안드로이드 - 텍스트 입력을 구현 사용자 정의 레이아웃
- 9. 두 개의 텍스트 뷰를 병합하는 상대 레이아웃
- 10. 안드로이드 : 상대적 레이아웃 레이아웃
- 11. 안드로이드 - RelativeLayout을 사용하여이 사용자 지정 풍선 뷰를 배치하는 방법
- 12. ionic에서 여러 뷰를 배치하는 방법
- 13. xib의 UIScrollView에서 뷰를 배치하는 방법은 무엇입니까?
- 14. CollapsingToolbarLayout 위에 뷰를 배치하는 방법
- 15. 그리드에 뷰를 배치하는 간단한 방법
- 16. 안드로이드 사용자 정의 텍스트 뷰는 레이아웃 파일
- 17. 안드로이드 자바에서 동적으로 버튼/텍스트 뷰를 작성
- 18. 안드로이드 UI에서 텍스트 뷰를 업데이트하는 방법
- 19. 안드로이드 스튜디오에서 자바 클래스의 레이아웃 (.XML)에 액세스
- 20. 안드로이드 레이아웃 정렬 문제
- 21. 레이아웃 [안드로이드]
- 22. 캔버스 위에 뷰를 배치하는 데 문제가 있습니다.
- 23. 레이아웃 배경에 UIImageView를 배치하는 방법
- 24. 안드로이드, 레이아웃
- 25. 안드로이드 레이아웃 Fill_Parent 문제
- 26. 레이아웃 옵션 - 안드로이드
- 27. 안드로이드 레이아웃
- 28. 안드로이드 레이아웃 (TextView)
- 29. 은, RelativeLayout의 아이가 내가 할 노력하고있어하면 텍스트 뷰가 부모의 작성해야하는 동안 텍스트 뷰를 통해 이미지 뷰를 배치하는 것입니다
- 30. 안드로이드 레이아웃 문제, 모서리에 이미지가있는 텍스트
답해 주셔서 감사합니다. – KousiK