D2_1 安装模拟器Genymotion
来源:互联网 发布:精易编程助手教程 编辑:程序博客网 时间:2024/05/17 03:19
1.折腾2小时,最终放弃,还是先用自带的.
2.看到日志工具才发现Java还不够啊.
3.学习流程与代码
流程:
1.手动创建活动:
创建Android项目(两个地方都不勾选Create Activity)-关闭其它项目-在src目录手动创建活动(package)-
让package继承Activity并重写onCreate方法(code1)
2.创建和加载布局:
在res/layout目录下创建Android XML File-Button元素的添加(code2)-活动中加载布局(code3)
3.AndroidManifest文件中注册:
在AndroidManifest文件中给活动注册(code4)
4.隐藏标题栏:
在活动的onCreate()方法中添加代码(code5)
5.活动中使用Toast:
在活动的onCreate()方法中添加代码(code6)
代码:
-----------------code1----------------
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
}
-----------------code2----------------
<Button
android:id="@+id/button_1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Button 1"
/>
-----------------code3----------------
setContentView(R.layout.fisrt_layout);
-----------------code4----------------
<activity
android:name=".FirstActivity"
android:label="This is FirstActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
-----------------code5----------------
requestWindowFeature(Window.FEATURE_NO_TITLE);
-----------------code6----------------
Button button1=(Button)findViewById(R.id.button_1);
button1.setOnClickListener(new OnClickListener(){
@Override
public void onClick(View v)
{
Toast.makeText(FirstActivity.this,"You clicked Button 1",Toast.LENGTH_SHORT).show();
}
});
Record:P38
- D2_1 安装模拟器Genymotion
- android模拟器 genymotion安装
- android模拟器 genymotion安装
- Android Genymotion 模拟器 安装
- 模拟器安装 - genymotion
- Genymotion模拟器安装
- 安装genymotion模拟器
- Genymotion模拟器安装失败
- 安装genymotion模拟器
- Android模拟器Genymotion安装
- Genymotion模拟器安装教程
- 下载安装genymotion模拟器
- 安装Genymotion模拟器
- 安装genymotion模拟器
- Genymotion模拟器安装教程
- 安装genymotion模拟器
- genymotion模拟器安装apk
- Genymotion模拟器安装
- DragSortListView拖动排序的ListView,同时支持ListView滑动item删除
- leetcode_71_Simplify Path
- 模仿百度卫士手机版应用源码项目最新版更新版
- 在32及64位系统中拒绝访问 ProgID: "excel.application"及配置Microsoft Excel Application权限解决方案
- 19.Spring_事务的传播行为以及其他属性
- D2_1 安装模拟器Genymotion
- Poker UI 2 美工分类
- ArcGIS开发手动添加License类
- Android发送Notification
- 在Solr4.10配置IKAnalyzer 同义词、扩展词库、停顿词详解
- ASM磁盘组异机迁移
- Struts2.1.8.1 升级至Struts2.3.20
- 项目总结——MVC+MongoDB实现文件上传
- Android 获取最近应用的缩略图