在游戏时,不管是退出游戏还是选择战机,都要弹出一个对话框,需要以下代码按一个按钮弹出对话框Layout文件:(添加一个按钮)<Buttonandroid:id="@+id/button1"android:layout_width="fill_parent"android:layout_height="wrap_content"android:text="准备起飞"/>在Main..
分类:
移动开发 时间:
2015-08-16 23:27:49
阅读次数:
232
共有属性: java代码中通过btn1关联次控件 android:id="@+id/btn1"控件宽度 android:layout_width="80px"//"80dip"或"80dp"android:layout_width =“wrap_content”android:layout_widt...
分类:
其他好文 时间:
2015-08-15 00:10:03
阅读次数:
216
在控件的任意位置显示图片
效果图xml代码
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:l...
分类:
其他好文 时间:
2015-08-14 01:11:10
阅读次数:
154
activity_main.xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:lay...
分类:
其他好文 时间:
2015-08-13 12:18:59
阅读次数:
86
一:界面设计
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".Ma...
分类:
移动开发 时间:
2015-08-13 12:15:30
阅读次数:
173
LinearLayout和RelativeLayout共有属性:java代码中通过btn1关联次控件android:id="@+id/btn1"控件宽度android:layout_width="80px"//"80dip"或"80dp"android:layout_width =“wrap_con...
分类:
其他好文 时间:
2015-08-13 11:52:43
阅读次数:
103
Automatic Preferred Max Layout Width is not available on iOS versions prior to...
分类:
移动开发 时间:
2015-08-12 14:38:24
阅读次数:
455
效果图:
activity的布局xml:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
andro...
分类:
移动开发 时间:
2015-08-12 13:23:34
阅读次数:
162
这个demo演示了actionbar的各种布局样式。
activity_main.xml<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_pa...
分类:
移动开发 时间:
2015-08-12 09:04:11
阅读次数:
152
消息机制
main.xml文件代码。
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
androi...
分类:
其他好文 时间:
2015-08-10 22:14:40
阅读次数:
154