[MainActivity.java]
public class MainActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}
[activity_main.xml]
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView
android:id="@+id/label"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Type here:"/>
<EditText
android:id="@+id/entry"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@android:drawable/editbox_background"
android:textColor="#000"
android:layout_below="@id/label"/>
<Button
android:id="@+id/ok"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/entry"
android:layout_alignParentRight="true"
android:layout_marginLeft="10dip"
android:text="OK" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toLeftOf="@id/ok"
android:layout_alignTop="@id/ok"
android:text="Cancel" />
</RelativeLayout>
'Programming > Android' 카테고리의 다른 글
Android(9) - 네이버 음성인식 API 이용하기 (3) (4) | 2016.07.26 |
---|---|
Android(8) - 네이버 음성인식 API 이용하기 (2) (8) | 2016.06.17 |
Android(7) - 네이버 음성인식 API 이용하기 (1) (17) | 2016.06.17 |
Android(6) - 이미지 Visible / Invisible (1) | 2016.06.15 |
Android(5) - 애플리케이션으로 SMS SEND/RECEIVE (0) | 2016.06.15 |
WRITTEN BY
,