今天頭一次接觸安卓配置完了之後,新建了一個項目,參考網上的資料,在main.xml裏面添加了點文字<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:gravity="center_horizontal">
<TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="给小宝宝起个名字:" android:textSize="20px" android:textColor="#0ff" android:background="#333" />
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="遥遥是男孩的小名" android:textSize="20px" android:textColor="#0f0" android:background="#eee" android:layout_weight="3" />
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="瑶瑶是女孩的小名" android:textColor="#00f" android:textSize="20px" android:background="#ccc" android:layout_weight="1" />
<TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="海因是男孩的大名" android:textColor="#f33" android:textSize="20px" android:background="#888" android:layout_weight="1" />
<TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="海音是女孩的大名" android:textColor="#ff3" android:textSize="20px" android:background="#333" android:layout_weight="1" />
</LinearLayout>
運行之後怎麼沒有顯示出來?還是顯示那模擬器默認的東西。。應該怎樣操作
我就是 了新建AVD(android vitural device)
然後在Run Configuration 裏面添加
然後點擊run ...
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:gravity="center_horizontal">
<TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="给小宝宝起个名字:" android:textSize="20px" android:textColor="#0ff" android:background="#333" />
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="遥遥是男孩的小名" android:textSize="20px" android:textColor="#0f0" android:background="#eee" android:layout_weight="3" />
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="瑶瑶是女孩的小名" android:textColor="#00f" android:textSize="20px" android:background="#ccc" android:layout_weight="1" />
<TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="海因是男孩的大名" android:textColor="#f33" android:textSize="20px" android:background="#888" android:layout_weight="1" />
<TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="海音是女孩的大名" android:textColor="#ff3" android:textSize="20px" android:background="#333" android:layout_weight="1" />
</LinearLayout>
運行之後怎麼沒有顯示出來?還是顯示那模擬器默認的東西。。應該怎樣操作
我就是 了新建AVD(android vitural device)
然後在Run Configuration 裏面添加
然後點擊run ...
解决方案 »
- Android 如何实现在线视频播放器并缓存本地
- android 中如何关闭全屏的swf文件
- 51job那个搜索职位的选项卡
- 为什么有的客户端软件只用wifi就可以定位?大多数好像都不行?
- 都是android爱好者吗
- 求Android读取pdf的方法,指点迷津!
- 求教 GoogleMapApi V2 MapView.LayoutParams的替换方法
- Code Convention 自动检查代码规范
- surfaceDestroyed方法点击home键后,执行的比较慢,如何解决
- startActivity无法启动activity
- NDK 求助
- 【求助OPhone开发】web not available问题
对你的项目点右键,然后指向Run As->Run Configuration->Browse选择你的项目->Target->在你要使用的AVD上打勾->Apply->Run
成功的话把分给我吧,缺分数请人帮忙啊
看下Activity中是不是调用了
setContentView(R.layout.main)