나는 안드로이드 스튜디오와 GUI 디자이너위젯 역 - 나는 응용 프로그램을 실행할 때 안드로이드 스튜디오
을 사용 나는 왼쪽에있는 텍스트 뷰를 볼 수 있지만 내가
을 이미지 뷰
과 같은 권리 GUI 디자이너에 넣어 In GUI DesignerIn mobile (I've tried 2 devices with diff System Versions)
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal" android:layout_width="match_parent"
android:layout_height="match_parent"
android:weightSum="1">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/imageView"
android:src="@drawable/celebi"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:contentDescription="@string/celebi_picture" />
<TextView
android:id="@+id/txt_detail"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:textSize="18sp"
android:textStyle="bold"
android:textColor="#000000"
android:layout_marginRight="10dp"
android:layout_marginLeft="10dp"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_toEndOf="@+id/imageView"
android:layout_alignBottom="@+id/imageView"
android:layout_toRightOf="@+id/imageView" />
,536,913,632 10
이 GridLayout 또한 역의 것들!
<GridLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:layout_width="150dp"
android:layout_height="150dp"
android:id="@+id/txt_detail"
android:layout_row="0"
android:layout_column="1" />
<ImageView
android:layout_width="150dp"
android:layout_height="150dp"
android:id="@+id/imageView"
android:layout_row="0"
android:layout_column="2"
android:src="@mipmap/ic_launcher" />
이있는 LinearLayout 같은 일 :
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:layout_width="150dp"
android:layout_height="150dp"
android:id="@+id/txt_detail"
android:layout_row="0"
android:layout_column="1" />
<ImageView
android:layout_width="150dp"
android:layout_height="150dp"
android:id="@+id/imageView"
android:layout_row="0"
android:layout_column="2"
android:src="@mipmap/ic_launcher" />
내가 시도이 : <이미지 뷰 안드로이드 : layout_width = "144dp" 안드로이드 : layout_height = "144dp" 안드로이드 : ID = "@ + ID/이미지 뷰" 안드로이드 : SRC = "@ 드로어 블/mew "/> 같은 문제! LinearLayout과 이것으로 문제가 발생하면 어떻게해야합니까? –
저는 제 대답에 XML을 넣을 것입니다. 그것을 시도하고 그것이 작동하는지보십시오. – CaseyB