2011-07-26 2 views
-1

위젯을 이동하는 방법 및 텍스트보기에서 거리에있는 버튼의 간격을 지정하려면 어떻게할까요? 다양한 레이아웃에서 다른 위젯의 위치를 ​​보여주는 자습서 링크를 게시 할 수 있습니까? 감사.가로 직선이있는 경우

답변

0

Common Layout Objects | Android Developers은 특히 예제 피드를 찾는 사용자에게 특히 유용합니다. User Interface | Android Developers

객체 간격의 경우, 선택의 여지가 있지만, 가장 간단한은 두 요소의 여백 설정하는 것입니다 : 당신이 순수 문서를 찾고 있다면, 모든 것이 여기

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" android:orientation="horizontal"> 
    <TextView android:text="TextView" 
     android:id="@+id/editText1" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content"></TextView> 
    <Button android:id="@+id/button1" 
     android:layout_marginLeft="50dip" 
     android:text="Button" 
     android:layout_height="wrap_content" 
     android:layout_width="wrap_content"></Button> 
</LinearLayout>