1
나는이 버튼 내가 모든 이미지를 어떻게하면 안드로이드에서이 디자인을 얻을 수 있습니까?
에 대한 다음과 같은 설계를 달성해야합니다. 누름 상태 및 보통 상태의 왼쪽 둥근 이미지 단추 텍스트 배경 이미지이지만 사각형 모양입니다. 내가 선형 레이아웃과 테이블 레이아웃 을 사용하고이 내가
어떻게
을 얻을 내 XML 코드
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/stbk"
android:gravity="center"
android:orientation="vertical" >
<TableLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:gravity="center" >
<TableRow
android:id="@+id/tableRow1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/scttransband" >
<ImageView
android:id="@+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/acc" />
<Button
android:id="@+id/accountButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:gravity="left|center"
android:paddingLeft="15dp"
android:text="My Account" />
</TableRow>
<TableRow
android:id="@+id/tableRow2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:background="@drawable/scttransband" >
<ImageView
android:id="@+id/imageView2"
android:layout_width="60dp"
android:layout_height="64dp"
android:src="@drawable/dd" />
<Button
android:id="@+id/locateButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:gravity="left|center"
android:paddingLeft="15dp"
android:text="Locate Branches & ATM" />
</TableRow>
이 출력입니다 왼쪽 공동을 자르나요? 배경에 대한 rners 및 배경과 왼쪽 이미지 변경과 텍스트 색 변경도 수행하도록 어떻게 눌린 상태로 만들 수 있습니까?
clipdrawable을 사용하는 것이 좋습니다 .. –
나에게 예제를 줄 수 있습니까? – WISHY
여기에 아주 좋은 예가 있습니다 http://blog.mediarain.com/2011/04/android-custom-progressbar-withround-corners/ 도움이되는지 확인하십시오. –