Skip to content

Instantly share code, notes, and snippets.

@springcome
Created December 20, 2016 11:12
Show Gist options
  • Save springcome/9c5cd7fcce71a355014b0c6a416d9164 to your computer and use it in GitHub Desktop.
Save springcome/9c5cd7fcce71a355014b0c6a416d9164 to your computer and use it in GitHub Desktop.
입력컨트롤러(Button), Android
<?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="horizontal">
<!-- 텍스트만 나오는 버튼 -->
<Button android:id="@+id/btn_1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/btn_text"/>
<!-- Icon만 나오는 버튼 -->
<ImageButton android:id="@+id/btn_2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_accessibility_white_24dp"/>
<!-- 텍스트와 Icon이 나오는 버튼 -->
<Button android:id="@+id/btn_3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/btn_text"
android:drawableLeft="@drawable/ic_accessibility_white_24dp"/>
<Button android:id="@+id/btn_4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/btn_text"
android:drawableRight="@drawable/ic_accessibility_white_24dp"/>
</LinearLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment