Demo05:RelativeLayout
来源:互联网 发布:网络教育需要到学校吗 编辑:程序博客网 时间:2024/05/16 11:06
package com.wuqiong.demo05;import android.app.Activity;import android.os.Bundle;import android.view.Menu;import android.view.MenuItem;public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.main, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { // Handle action bar item clicks here. The action bar will // automatically handle clicks on the Home/Up button, so long // as you specify a parent activity in AndroidManifest.xml. int id = item.getItemId(); if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); }}
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" tools:context="com.wuqiong.demo05.MainActivity" > <TextView android:id="@+id/text_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/type_here" /><EditText android:id="@+id/edit_text" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@id/text_view" /><Button android:id="@+id/button1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/edit_text" android:layout_alignParentRight="true" android:text="OK"/><Button android:id="@+id/button2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/edit_text" android:layout_toLeftOf="@id/button1" android:text="Cancel"/></RelativeLayout>
0 0
- Demo05:RelativeLayout
- Demo05
- ‘RelativeLayout’
- RelativeLayout
- RelativeLayout
- RelativeLayout
- RelativeLayout
- RelativeLayout
- RelativeLayout
- RelativeLayout
- RelativeLayout
- RelativeLayout
- RelativeLayout
- RelativeLayout
- RelativeLayout
- Relativelayout
- RelativeLayout
- RelativeLayout
- 颜色代码大全
- Makefile 好的语句积累
- 构建施耐德楼控系统数据库后台服务器示例工程—(工程创建)
- day19/BufferedWriterDemo1.java
- day19/CopyTestByBuf.java
- Demo05:RelativeLayout
- xUtils系列之DbUtils-概览
- 给定一个源代码文件(.cs, .java),输出该文件的总行数、空行数、注释行数、代码行数
- day19/ExceptionInfo.java
- Webstorm
- awk字符串函数(一)
- day19/LineNumberReaderDemo.java
- pcap文件
- day19/MyBufferedInputStream.java