Android初学:联系创建Activity
2016-03-17 22:04
465 查看
public class Activity2 extends Activity{ @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // setContentView(R.layout.layout2); System.out.println("这是我运行的第一个Activity"); Log.d("text","Log输出的信息"); } }
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent">//匹配父窗口 <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="大家好" />//内容包裹 </LinearLayout>
相关文章推荐
- android学习之路(二)高级用户界面设计
- 属性资源与Android命名空间
- android保存文件到SD卡,无卡时自动保存到手机 和读出文件
- android基础---->JSON数据的解析
- Android 内核 - 01 Binder
- Android Studio 使用心得体会
- Android所有系统资源图标android.R.drawable查看
- ubuntu 14.04.1下安装android 4.2编译环境出错总结
- ImageViewd的图片显示问题
- Android学习之BlurImageView实现图像模糊效果
- ViewPage实现图片轮播效果
- Android ListView滑动回弹——overScrollBy
- Android编译,打包、签名详细教程
- 开源库xUtils3使用详解
- android开发教程之listview使用方法
- Android 进程常驻(0)----MarsDaemon使用说明
- Android基础知识学习记录[1]
- Android Studio 使用正式签名进行调试
- Android自定义弹出框AlertDialog
- ListView与RecyclerView的区别