2010-01-01 4 views
3

전자 메일 또는 아래 그림과 같은 패턴 잠금 해제와 같은 Android의 기본 응용 프로그램에서 맨 아래 표시 줄에 관한 정보 나 일종의 정보를 찾고 있습니다. Androids 사이트 또는 Google 검색에서이 항목을 찾을 수 없었습니다.버튼 막대에 대한보기가 있습니까? (보기를 설명하는 이미지 링크)

이미지 : 나는이 응용 프로그램의 하단에 사용되는 버튼 바의 표준보기 거기에 생각하지 않습니다 http://img11.imageshack.us/i/viewdn.jpg/

+0

내가 중복 전화 : http://stackoverflow.com/questions/2127459/which-android-control-to-use/2224638 –

답변

2

; 일반적으로 두 개의 Button 항목은 LinearLayout 또는 RelativeLayout에 함께 표시됩니다.

예를 들어, Android Open Source Project보고, 당신은 button bar for one of the email app setup screens 두 평범하고 오래된 Button 객체로 정의됩니다 볼 수 있습니다.

그러나 Google은 각 레이아웃 XML에서 동일한보기 및 속성을 사용하는 대신 Android 테마 또는 하위 레이아웃으로 더 많은 공통 항목을 추상화하지 않았습니다.

7

저는 크리스토퍼가 정확하다고 믿습니다. 이미지에 막대를 만들 특별한 위젯은 없습니다. 그러나 에뮬레이션하려는 경우 레이아웃을 만들고 style="@android:style/ButtonBar" 스타일을 사용할 수 있습니다. 그러면 밝은 회색 배경과 올바른 여백을 얻을 수 있습니다. 에서

+0

쿨! 전에 그 스타일을 보지 않았습니까? 그러나 구글은 자신의 애플 리케이션에서 그것을 사용하는 것을 귀찮게하지 않는다. (내가 본 몇몇 레이아웃에서). –

0

: http://code.google.com/p/k9mail/source/browse/k9mail/trunk/res/layout/account_setup_basics.xml?r=1314

<RelativeLayout 
     android:layout_marginTop="-45dip" 
     android:padding="0dip" 
     android:layout_alignParentBottom="true" 
     android:gravity="bottom|right" 
     android:background="@android:drawable/bottom_bar" 
     android:layout_height="fill_parent" 
     android:layout_width="fill_parent"> 
     <Button 
      android:id="@+id/manual_setup" 
      android:text="@string/account_setup_basics_manual_setup_action" 
      android:minWidth="@dimen/button_minWidth" 
      android:layout_height="wrap_content" 
      android:layout_width="wrap_content" 
      android:layout_marginBottom="-4dip" 
      android:layout_alignParentLeft="true" 
      android:layout_centerVertical="false" 
      /> 
     <Button 
      android:id="@+id/next" 
      android:text="@string/next_action" 
      android:minWidth="@dimen/button_minWidth" 
      android:layout_height="wrap_content" 
      android:layout_width="wrap_content" 
      android:drawableRight="@drawable/button_indicator_next" 
      android:layout_marginBottom="-4dip" 
      android:layout_alignParentRight="true" 
      android:layout_centerVertical="false" 
      /> 
    </RelativeLayout>