解决方案 »
- 求android 常用类和其方法 汇总
- LocationManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER)总是为false
- 想把 NotificationDisplay.java 文件加入到已存在的android 应用工程中, 如何加?
- 请问高通平台下的MMCIMASK0,MMCIMASK1,MMCICLEAR都分别代表什么地址?
- 求助用过DroidBox或TaintDroid的大神
- 请问Android的应用为什么配置了混淆后就不能签名了呢
- Android 关于Service里发广播总是意外停止求救!!!
- 我想用耳机连接单片机来进行数据传输,可是在我关掉单片机时还能接收到数据为什么呢?
- 如何统计多个推广渠道的APP推广的效果呢?
- android 分析网站源代码
- 新建一个工程,res\layout\ 下没有XML布局文件,求解答
- 如何用ndk编译一个它不支持的程序或库
View view1=View.inflate(this,R.layout.page3,null);
btu=(Button) view1.findViewById(R.id.button1);
View.OnClickListener listener1 = new View.OnClickListener() {
public void onClick(View arg0) {
Intent intent =new Intent(MainActivity.this,App1Activity.class);
startActivity(intent);
}
};
btu.setOnClickListener(listener1);布局文件代码
<?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"
android:orientation="vertical" >
<ImageView
android:id="@+id/iv"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/p3"
android:layout_weight="1"
android:scaleType="fitXY"
/>
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="177dp"
android:background="#fff"
android:text="Button" />
</LinearLayout>