布局问题 布局uiimageviewupload 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 布局代码是:<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > <FrameLayout android:layout_width="match_parent" android:layout_height="match_parent" > <SurfaceView android:id="@+id/previewSV" android:layout_width="match_parent" android:layout_height="match_parent" /> </FrameLayout> <com.cn.view.DrawImageView android:id="@+id/drawIV" android:layout_width="match_parent" android:layout_height="match_parent" /> <ImageButton android:id="@+id/btn_shutter" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_centerHorizontal="true" android:layout_marginBottom="10dip" android:background="@drawable/photo_img_btn" /></RelativeLayout> 调用代码是:package com.cn.activity;import android.app.Activity;import android.content.Intent;import android.os.Bundle;import android.view.View;import android.view.View.OnClickListener;import com.cn.PlayCamera.R;import com.cn.view.MyImageView;public class RolateAnimActivity extends Activity { //获取拍摄按钮 private MyImageView screen; @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.rolate_main); //获取拍摄按钮组件 screen = (MyImageView) findViewById(R.id.screen); //定义拍摄按钮点击事件 screen.setOnClickListener(new ScreenListeren()); } private class ScreenListeren implements OnClickListener{ @Override public void onClick(View v) { Intent intent = new Intent(RolateAnimActivity.this , RectPhotoActivity.class); startActivity(intent); } } } Intent intent = new Intent(RolateAnimActivity.this , RectPhotoActivity.class);跳转后的活动要合对应的布局联系在一起,你直接跳转至照相机可能就看不到预览的xml了 装个Adroid-sdk怎么这么费劲!一下午一晚上了没弄完! 控件位置问题 求解Preference布局问题 如何开机修改默认壁纸 如何做通讯录,基于android平台 Sench Cmd4 打包apk失败 新手入驻CSDN,有点迷茫,麻烦各位大大指点一下 如何将一布局转换为Bitmap?? Android中Eclipse错误You must restart adb and Eclipse. 求个大佬 ubuntu 下android模拟器运行一直是黑屏? 关于Android照相的一段代码
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" > <FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent" > <SurfaceView
android:id="@+id/previewSV"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</FrameLayout>
<com.cn.view.DrawImageView
android:id="@+id/drawIV"
android:layout_width="match_parent"
android:layout_height="match_parent" /> <ImageButton
android:id="@+id/btn_shutter"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="10dip"
android:background="@drawable/photo_img_btn" /></RelativeLayout>
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;import com.cn.PlayCamera.R;
import com.cn.view.MyImageView;
public class RolateAnimActivity extends Activity {
//获取拍摄按钮
private MyImageView screen;
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.rolate_main);
//获取拍摄按钮组件
screen = (MyImageView) findViewById(R.id.screen);
//定义拍摄按钮点击事件
screen.setOnClickListener(new ScreenListeren());
}
private class ScreenListeren implements OnClickListener{ @Override
public void onClick(View v) { Intent intent = new Intent(RolateAnimActivity.this , RectPhotoActivity.class);
startActivity(intent);
}
}
}