留白的布局设计 - eglSurfaceAttrib未实现 [英] Blank layout - eglSurfaceAttrib not implemented
问题描述
我不断recieving以下消息:eglSurfaceAttrib没有实现我试图清理项目,舱单,搜索其他人谁也有类似的问题,小号,但我的努力没有成功发挥各地。任何帮助将大大AP preciated。下面是我的活动code
公共类ProfileCreation延伸活动{
公共类LoadImg延伸活动{
私有静态最终诠释RESULT_LOAD_IMAGE = 1;
的FrameLayout布局;
按钮保存;
@覆盖
公共无效的onCreate(包savedInstanceState){
super.onCreate(savedInstanceState);
的setContentView(R.layout.activity_profile_creation);
节省=(按钮)findViewById(R.id.btnConfirm);
字符串picturePath = preferenceManager.getDefaultShared preferences(本).getString(picturePath,);
如果(!picturePath.equals())
{
ImageView的ImageView的=(ImageView的)findViewById(R.id.profilePicture preVIEW);
imageView.setImageBitmap(BitmapFactory.de codeFILE(picturePath));
}
按钮buttonLoadImage =(按钮)findViewById(R.id.btnPictureSelect);
buttonLoadImage.setOnClickListener(新View.OnClickListener(){
@覆盖
公共无效的onClick(查看为arg0){
意图I =新的意图(
Intent.ACTION_PICK,
android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
startActivityForResult(ⅰ,RESULT_LOAD_IMAGE);
}
});
save.setOnClickListener(新View.OnClickListener(){
@覆盖
公共无效的onClick(查看为arg0){
//找到图像中资源>
点阵位图= BitmapFactory.de codeFILE(picturePath);
//转换到字节
ByteArrayOutputStream流=新ByteArrayOutputStream();
//的COM preSS的图像质量下降规模1 - 100
bitmap.com preSS(Bitmap.Com pressFormat.PNG,100,流);
目标图像= NULL;
尝试 {
字符串路径= NULL;
图像= readInFile(路径);
}
赶上(例外五){
e.printStackTrace();
}
//创建ParseFile
ParseFile文件=新ParseFile(picturePath(字节[])图像);
//将图像上传到解析云
file.saveInBackground();
//创建一个新的类的解析被称为ImageUpload
的parseObject imgupload =新的parseObject(图像);
//创建一个名为ImageName栏,并设置串
imgupload.put(图像,picturePath);
//创建一个名为镜像文件栏,并插入图片
imgupload.put(镜像文件,文件);
//创建类和列
imgupload.saveInBackground();
//显示一个简单的烤面包的消息
Toast.makeText(LoadImg.this,图像保存,上传一个又一个,Toast.LENGTH_SHORT).show();
}
});
}
私人字节[] readInFile(字符串路径)抛出IOException异常{
// TODO自动生成方法存根
byte []的数据= NULL;
档案文件=新的文件(路径);
InputStream的INPUT_STREAM =新的BufferedInputStream(新的FileInputStream(
文件));
ByteArrayOutputStream缓冲区=新ByteArrayOutputStream();
数据=新的字节[16384] // 16K
INT bytes_read缓存;
而((bytes_read缓存= input_stream.read(数据,0,data.length))!= - 1){
buffer.write(数据,0,bytes_read缓存);
}
input_stream.close();
返回buffer.toByteArray();
}}}
下面是清单文件
< XML版本=1.0编码=UTF-8&GT?;
<舱单的xmlns:机器人=http://schemas.android.com/apk/res/android
包=com.dooba.beta
安卓版code =1
机器人:VERSIONNAME =1.0>
<使用-权限的Android:名称=android.permission.INTERNET对/>
<使用-权限的Android:名称=android.permission.ACCESS_NETWORK_STATE/>
<用途-SDK
安卓的minSdkVersion =13
机器人:targetSdkVersion =19/>
<使用-权限的Android:名称=android.permission.READ_EXTERNAL_STORAGE/>
<应用
机器人:名称=com.dooba.beta.IntegratingFacebookTutorialApplication
机器人:allowBackup =真
机器人:图标=@可绘制/ ic_launcher
机器人:标签=@字符串/ APP_NAME
机器人:主题=@风格/ AppTheme>
<活动
机器人:名称=com.dooba.beta.LoginActivity
机器人:标签=@字符串/ APP_NAME
机器人:launchMode =singleTop
机器人:screenOrientation =画像
机器人:主题=@安卓风格/ Theme.Holo.Light.NoActionBar>
<意向滤光器>
<作用机器人:名称=android.intent.action.MAIN/>
<类机器人:名称=android.intent.category.LAUNCHER/>
&所述; /意图滤光器>
< /活性GT;
<活动
机器人:名称=com.dooba.beta.UserDetailsActivity
机器人:标签=@字符串/ APP_NAME
机器人:screenOrientation =画像
机器人:主题=@安卓风格/ Theme.Holo.Light.NoActionBar/>
<活动
机器人:名称=com.dooba.beta.EventsActivity
机器人:标签=@字符串/ APP_NAME
机器人:screenOrientation =画像
机器人:主题=@安卓风格/ Theme.Holo.Light.NoActionBar/>
<活动
机器人:名称=com.facebook.LoginActivity
机器人:标签=@字符串/ APP_NAME
机器人:主题=@安卓风格/ Theme.Translucent.NoTitleBar/>
&所述;元数据
机器人:名称=com.facebook.sdk.ApplicationId
机器人:值=@字符串/ APP_ID/>
<活动
机器人:名称=com.dooba.beta.MoodActivity
机器人:标签=@字符串/ title_activity_mood
机器人:screenOrientation =画像
机器人:主题=@安卓风格/ Theme.Holo.Light.NoActionBar>
< /活性GT;
<活动
机器人:名称=com.dooba.beta.ProfileCreation
机器人:screenOrientation =画像
机器人:标签=@字符串/ title_activity_profile_creation
机器人:主题=@安卓风格/ Theme.Holo.Light.NoActionBar>
< /活性GT;
< /用途>
< /舱单>
和下面的布局文件
<滚动型的xmlns:机器人=http://schemas.android.com/apk/res/android
机器人:layout_width =match_parent
机器人:背景=@可绘制/ white_blue
机器人:layout_height =match_parent>
< RelativeLayout的
机器人:layout_width =match_parent
机器人:layout_height =match_parent
机器人:重力=中心
机器人:方向=垂直>
< RadioGroup中
机器人:ID =@ + ID / radioGroup1
机器人:layout_width =WRAP_CONTENT
机器人:layout_height =WRAP_CONTENT
机器人:layout_alignLeft =@ + ID / textView1
机器人:layout_below =@ + ID / textView1
机器人:layout_marginTop =14dp
机器人:文字颜色=#000000>
<单选按钮
机器人:ID =@ + ID / radio0
机器人:layout_width =WRAP_CONTENT
机器人:layout_height =WRAP_CONTENT
机器人:检查=真
机器人:文本=男
机器人:文字颜色=#000000/>
<单选按钮
机器人:ID =@ + ID /收音机1
机器人:layout_width =WRAP_CONTENT
机器人:layout_height =WRAP_CONTENT
机器人:文本=女
机器人:文字颜色=#000000/>
<单选按钮
机器人:ID =@ + ID / RADIO2
机器人:layout_width =WRAP_CONTENT
机器人:layout_height =WRAP_CONTENT
机器人:文本=没有响应
机器人:文字颜色=#000000/>
< / RadioGroup中>
<的TextView
机器人:ID =@ + ID / textView4
机器人:layout_width =WRAP_CONTENT
机器人:layout_height =WRAP_CONTENT
机器人:layout_alignParentTop =真
机器人:layout_centerHorizontal =真
机器人:重力=中心
机器人:文本=配置文件创建
机器人:文字颜色=#000000
机器人:TEXTSIZE =22sp
机器人:TEXTSTYLE =黑体/>
<的TextView
机器人:ID =@ + ID / textView5
机器人:layout_width =WRAP_CONTENT
机器人:layout_height =WRAP_CONTENT
机器人:layout_alignLeft =@ + ID / radioGroup1
机器人:layout_below =@ + ID / radioGroup1
机器人:layout_marginTop =32dp
机器人:文本=搜索距离(100公里)
机器人:textAppearance =机器人:ATTR / textAppearanceMedium
机器人:文字颜色=#000000/>
<搜索栏
机器人:ID =@ + ID / seekBar1
机器人:layout_width =300dp
机器人:layout_height =35dp
机器人:layout_alignLeft =@ + ID / textView3
机器人:layout_below =@ + ID / textView5
机器人:layout_marginTop =18dp/>
<的TextView
机器人:ID =@ + ID / textView3
机器人:layout_width =WRAP_CONTENT
机器人:layout_height =WRAP_CONTENT
机器人:layout_alignLeft =@ + ID / profilePicture preVIEW
机器人:layout_below =@ + ID / seekBar1
机器人:layout_marginTop =22dp
机器人:文本=头像
机器人:文字颜色=#000000
机器人:TEXTSIZE =16SP
机器人:TEXTSTYLE =黑体/>
<按钮
机器人:ID =@ + ID / btnConfirm
机器人:layout_width =200dp
机器人:layout_height =50dp
机器人:layout_below =@ + ID / profilePicture preVIEW
机器人:layout_centerHorizontal =真
机器人:layout_marginTop =30dp
机器人:重力=中心
机器人:的onClick =uploadPhoto
机器人:文本=确认/>
<按钮
机器人:ID =@ + ID / btnPictureSelect
机器人:layout_width =120dp
机器人:layout_height =50dp
机器人:layout_above =@ + ID / btnConfirm
机器人:layout_alignLeft =@ + ID /按钮1
机器人:layout_alignRight =@ + ID /按钮1
机器人:的onClick =pickPhoto
机器人:文本=选择图片
机器人:TEXTSIZE =15sp/>
<的TextView
机器人:ID =@ + ID / textView6
机器人:layout_width =WRAP_CONTENT
机器人:layout_height =WRAP_CONTENT
机器人:layout_alignLeft =@ + ID / editText1
机器人:layout_below =@ + ID / textView4
机器人:layout_marginTop =16DP
机器人:文本=小文
机器人:textAppearance =:/>中的Android ATTR / textAppearanceSmall?
<的EditText
机器人:ID =@ + ID / editText1
机器人:layout_width =WRAP_CONTENT
机器人:layout_height =WRAP_CONTENT
机器人:layout_alignLeft =@ + ID / seekBar1
机器人:layout_below =@ + ID / textView6
机器人:EMS =10
机器人:提示=用户名/ Peferred名
机器人:inputType =textPersonName
机器人:文字颜色=#000000
机器人:TEXTSIZE =16SP>
<不是requestFocus />
< /的EditText>
<的TextView
机器人:ID =@ + ID / textView1
机器人:layout_width =WRAP_CONTENT
机器人:layout_height =WRAP_CONTENT
机器人:layout_alignLeft =@ + ID / textView7
机器人:layout_below =@ + ID / textView7
机器人:layout_marginTop =28dp
机器人:文本=我是一个
机器人:文字颜色=#000000
机器人:TEXTSIZE =16SP
机器人:TEXTSTYLE =黑体/>
<的TextView
机器人:ID =@ + ID / textView2
机器人:layout_width =WRAP_CONTENT
机器人:layout_height =WRAP_CONTENT
机器人:layout_alignBaseline =@ + ID / textView1
机器人:layout_alignBottom =@ + ID / textView1
机器人:layout_alignLeft =@ + ID / radioGroup2
机器人:文本=寻找
机器人:文字颜色=#000000
机器人:TEXTSIZE =16SP
机器人:TEXTSTYLE =黑体/>
<的EditText
机器人:ID =@ + ID / editText3
机器人:layout_width =WRAP_CONTENT
机器人:layout_height =WRAP_CONTENT
机器人:layout_alignBaseline =@ + ID / textView7
机器人:layout_alignBottom =@ + ID / textView7
机器人:layout_toRightOf =@ + ID / textView1
机器人:EMS =10
机器人:inputType =号/>
<的TextView
机器人:ID =@ + ID / textView7
机器人:layout_width =WRAP_CONTENT
机器人:layout_height =WRAP_CONTENT
机器人:layout_alignLeft =@ + ID / editText1
机器人:layout_below =@ + ID / editText1
机器人:layout_marginTop =20dp
机器人:文本=时代
机器人:文字颜色=#000000
机器人:TEXTSIZE =16SP/>
< ImageView的
机器人:ID =@ + ID / profilePicture preVIEW
机器人:layout_width =150dp
机器人:layout_height =120dp
机器人:layout_alignLeft =@ + ID / btnConfirm
机器人:layout_alignRight =@ + ID / textView4
机器人:layout_below =@ + ID / textView3
机器人:layout_marginTop =20dp
机器人:layout_weight =0.90
机器人:阿尔法=0.8
机器人:后台=#d2d2d2/>
<按钮
机器人:ID =@ + ID /按钮1
机器人:layout_width =100dp
机器人:layout_height =70dp
机器人:layout_above =@ + ID / btnPictureSelect
机器人:layout_toRightOf =@ + ID / textView4
机器人:文本=从Facebook上载
机器人:TEXTSIZE =15sp/>
< RadioGroup中
机器人:ID =@ + ID / radioGroup2
机器人:layout_width =WRAP_CONTENT
机器人:layout_height =WRAP_CONTENT
机器人:layout_above =@ + ID / textView5
机器人:layout_toRightOf =@ + ID / radioGroup1>
<单选按钮
机器人:ID =@ + ID / radio0
机器人:layout_width =WRAP_CONTENT
机器人:layout_height =WRAP_CONTENT
机器人:检查=真
机器人:文本=男
机器人:文字颜色=#000000/>
<单选按钮
机器人:ID =@ + ID /收音机1
机器人:layout_width =WRAP_CONTENT
机器人:layout_height =WRAP_CONTENT
机器人:文本=女
机器人:文字颜色=#000000/>
<单选按钮
机器人:ID =@ + ID / RADIO2
机器人:layout_width =WRAP_CONTENT
机器人:layout_height =WRAP_CONTENT
机器人:文本=没有响应
机器人:文字颜色=#000000/>
< / RadioGroup中>
< / RelativeLayout的>
< /滚动型>
更新 在logcat中所示的错误。布局现在显示,但eglSurfaceAttrib未实现的错误依然存在。
07-28 00:54:11.288:D / dalvikvm(1248):延迟启用CheckJNI
07-28 00:54:11.484:D / dalvikvm(1248):GC_CONCURRENT释放255K,11%免费3088K / 3456K,暂停3毫秒+ 1毫秒,15毫秒总
07-28 00:54:11.484:D / dalvikvm(1248):WAIT_FOR_CONCURRENT_GC受阻6ms的
07-28 00:54:11.484:I / dalvikvm堆(1248):成长堆(破片的情况下),以4.198MB为1127532字节分配
07-28 00:54:11.488:D / dalvikvm(1248),:GC_FOR_ALLOC释放< 1K,9%的自由4189K / 4560K,暂停1毫秒,1毫秒总
07-28 00:54:11.592:I / JDWP(1248):忽略第二调试器 - 接受和丢弃
07-28 00:54:11.600:D / dalvikvm(1248):GC_FOR_ALLOC释放6K,7%免费4480K / 4800K,暂停为33ms,共34ms
07-28 00:54:11.804:D / libEGL(1248):加载/system/lib/egl/libEGL_genymotion.so
07-28 00:54:11.804:D /(1248):HostConnection ::得到()新主机连接建立0xb7985ee8,TID 1248
07-28 00:54:11.820:D / libEGL(1248):加载/system/lib/egl/libGLESv1_CM_genymotion.so
07-28 00:54:11.820:D / libEGL(1248):加载/system/lib/egl/libGLESv2_genymotion.so
07-28 00:54:11.868:W / EGL_genymotion(1248):eglSurfaceAttrib未实现
07-28 00:54:11.868:E / OpenGLRenderer(1248):获得MAX_TEXTURE_SIZE从GradienCache
07-28 00:54:11.872:E / OpenGLRenderer(1248):MAX_TEXTURE_SIZE:16384
07-28 00:54:11.876:E / OpenGLRenderer(1248),:获取MAX_TEXTURE_SIZE从缓存:: initConstraints()
07-28 00:54:11.876:E / OpenGLRenderer(1248):MAX_TEXTURE_SIZE:16384
07-28 00:54:11.876:D / OpenGLRenderer(1248):启用调试模式0
07-28 00:54:24.612:I / JDWP(1248):忽略第二调试器 - 接受和丢弃
07-28 00:54:24.788:I / JDWP(1248):忽略第二调试器 - 接受和丢弃
07-28 00:54:36.984:I / JDWP(1248):忽略第二调试器 - 接受和丢弃
07-28 00:54:37.576:W / IInputConnectionWrapper(1248):showStatusIcon上的非活动InputConnection
07-28 00:54:42.984:W / EGL_genymotion(1248):eglSurfaceAttrib未实现
07-28 00:54:43.744:W / ViewRootImpl(1248):删除事件,由于没有窗口焦点:KeyEvent的{行动= ACTION_DOWN,关键code = KEY code_ENTER,扫描code = 28,亚状态= 0,旗帜= 0x8中,执行repeatCount = 0,eventTime = 65685,停机= 65685,DEVICEID = 1,源= 0x301}
07-28 00:54:43.744:W / ViewRootImpl(1248):删除事件,由于没有窗口焦点:KeyEvent的{行动= ACTION_DOWN,关键code = KEY code_ENTER,扫描code = 28,亚状态= 0,旗帜= 0x8中,执行repeatCount = 0,eventTime = 65859,停机= 65859,DEVICEID = 1,源= 0x301}
07-28 00:54:43.752:W / ViewRootImpl(1248),:删除事件,由于没有窗口焦点:KeyEvent的{行动= ACTION_DOWN,关键code = KEY code_ENTER,扫描code = 28,亚状态= 0,旗帜= 0x8中,执行repeatCount = 0,eventTime = 66028,停机= 66028,DEVICEID = 1,源= 0x301}
07-28 00:54:43.760:W / ViewRootImpl(1248):删除事件,由于没有窗口焦点:KeyEvent的{行动= ACTION_DOWN,关键code = KEY code_ENTER,扫描code = 28,亚状态= 0,旗帜= 0x8中,执行repeatCount = 0,eventTime = 66186,停机= 66186,DEVICEID = 1,源= 0x301}
07-28 00:54:44.320:I / JDWP(1248):忽略第二调试器 - 接受和丢弃
正在申报两项活动在你的文件: ProfileCreation
和 LoadImg
。只有后者有其的onCreate()
方法定义。但安卓
将搜索 ProfileCreation
的onCreate()
方法没有找到它。因此,它不画你的布局。卸下活动的声明之一。我还注意到,LoadImg活动是不是在你的manifest.xml文件中定义。
编辑:你开始你的 ACTION_PICK意图
与 startActivityForResult()
。对于接收的结果意图
,你必须重写 onActivityResult()
的方法,这样你就可以处理摄取的图像信息从画廊。
I am constantly recieving the following message: eglSurfaceAttrib not implemented I tried cleaning the project, played around with manifest, search others who had similar issue s but my attempt have been unsuccessful. Any help would be greatly appreciated. Below is my activity code
public class ProfileCreation extends Activity {
public class LoadImg extends Activity {
private static final int RESULT_LOAD_IMAGE = 1;
FrameLayout layout;
Button save ;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_profile_creation);
save=(Button) findViewById(R.id.btnConfirm);
String picturePath = PreferenceManager.getDefaultSharedPreferences(this).getString("picturePath", "");
if(!picturePath.equals(""))
{
ImageView imageView = (ImageView) findViewById(R.id.profilePicturePreview);
imageView.setImageBitmap(BitmapFactory.decodeFile(picturePath));
}
Button buttonLoadImage = (Button) findViewById(R.id.btnPictureSelect);
buttonLoadImage.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View arg0) {
Intent i = new Intent(
Intent.ACTION_PICK,
android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
startActivityForResult(i, RESULT_LOAD_IMAGE);
}
});
save.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View arg0) {
// Locate the image in res >
Bitmap bitmap = BitmapFactory.decodeFile("picturePath");
// Convert it to byte
ByteArrayOutputStream stream = new ByteArrayOutputStream();
// Compress image to lower quality scale 1 - 100
bitmap.compress(Bitmap.CompressFormat.PNG, 100, stream);
Object image = null;
try {
String path = null;
image = readInFile(path);
}
catch(Exception e) {
e.printStackTrace();
}
// Create the ParseFile
ParseFile file = new ParseFile("picturePath", (byte[]) image);
// Upload the image into Parse Cloud
file.saveInBackground();
// Create a New Class called "ImageUpload" in Parse
ParseObject imgupload = new ParseObject("Image");
// Create a column named "ImageName" and set the string
imgupload.put("Image", "picturePath");
// Create a column named "ImageFile" and insert the image
imgupload.put("ImageFile", file);
// Create the class and the columns
imgupload.saveInBackground();
// Show a simple toast message
Toast.makeText(LoadImg.this, "Image Saved, Upload another one ",Toast.LENGTH_SHORT).show();
}
});
}
private byte[] readInFile(String path) throws IOException {
// TODO Auto-generated method stub
byte[] data = null;
File file = new File(path);
InputStream input_stream = new BufferedInputStream(new FileInputStream(
file));
ByteArrayOutputStream buffer = new ByteArrayOutputStream();
data = new byte[16384]; // 16K
int bytes_read;
while ((bytes_read = input_stream.read(data, 0, data.length)) != -1) {
buffer.write(data, 0, bytes_read);
}
input_stream.close();
return buffer.toByteArray();
}}}
Below is the Manifest file
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.dooba.beta"
android:versionCode="1"
android:versionName="1.0" >
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-sdk
android:minSdkVersion="13"
android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<application
android:name="com.dooba.beta.IntegratingFacebookTutorialApplication"
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.dooba.beta.LoginActivity"
android:label="@string/app_name"
android:launchMode="singleTop"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.Holo.Light.NoActionBar" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.dooba.beta.UserDetailsActivity"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.Holo.Light.NoActionBar" />
<activity
android:name="com.dooba.beta.EventsActivity"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.Holo.Light.NoActionBar" />
<activity
android:name="com.facebook.LoginActivity"
android:label="@string/app_name"
android:theme="@android:style/Theme.Translucent.NoTitleBar" />
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="@string/app_id" />
<activity
android:name="com.dooba.beta.MoodActivity"
android:label="@string/title_activity_mood"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.Holo.Light.NoActionBar" >
</activity>
<activity
android:name="com.dooba.beta.ProfileCreation"
android:screenOrientation="portrait"
android:label="@string/title_activity_profile_creation"
android:theme="@android:style/Theme.Holo.Light.NoActionBar" >
</activity>
</application>
</manifest>
and below is the layout file
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:background="@drawable/white_blue"
android:layout_height="match_parent">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical" >
<RadioGroup
android:id="@+id/radioGroup1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/textView1"
android:layout_below="@+id/textView1"
android:layout_marginTop="14dp"
android:textColor="#000000" >
<RadioButton
android:id="@+id/radio0"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="true"
android:text="Male"
android:textColor="#000000" />
<RadioButton
android:id="@+id/radio1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Female"
android:textColor="#000000" />
<RadioButton
android:id="@+id/radio2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="No response"
android:textColor="#000000" />
</RadioGroup>
<TextView
android:id="@+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:gravity="center"
android:text="Profile Creation"
android:textColor="#000000"
android:textSize="22sp"
android:textStyle="bold" />
<TextView
android:id="@+id/textView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/radioGroup1"
android:layout_below="@+id/radioGroup1"
android:layout_marginTop="32dp"
android:text="Search Distance (100KM)"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#000000" />
<SeekBar
android:id="@+id/seekBar1"
android:layout_width="300dp"
android:layout_height="35dp"
android:layout_alignLeft="@+id/textView3"
android:layout_below="@+id/textView5"
android:layout_marginTop="18dp" />
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/profilePicturePreview"
android:layout_below="@+id/seekBar1"
android:layout_marginTop="22dp"
android:text="Profile Picture"
android:textColor="#000000"
android:textSize="16sp"
android:textStyle="bold" />
<Button
android:id="@+id/btnConfirm"
android:layout_width="200dp"
android:layout_height="50dp"
android:layout_below="@+id/profilePicturePreview"
android:layout_centerHorizontal="true"
android:layout_marginTop="30dp"
android:gravity="center"
android:onClick="uploadPhoto"
android:text="Confirm" />
<Button
android:id="@+id/btnPictureSelect"
android:layout_width="120dp"
android:layout_height="50dp"
android:layout_above="@+id/btnConfirm"
android:layout_alignLeft="@+id/button1"
android:layout_alignRight="@+id/button1"
android:onClick="pickPhoto"
android:text="Select photo"
android:textSize="15sp" />
<TextView
android:id="@+id/textView6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/editText1"
android:layout_below="@+id/textView4"
android:layout_marginTop="16dp"
android:text="Small Text"
android:textAppearance="?android:attr/textAppearanceSmall" />
<EditText
android:id="@+id/editText1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/seekBar1"
android:layout_below="@+id/textView6"
android:ems="10"
android:hint="Username / Peferred Name"
android:inputType="textPersonName"
android:textColor="#000000"
android:textSize="16sp" >
<requestFocus />
</EditText>
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/textView7"
android:layout_below="@+id/textView7"
android:layout_marginTop="28dp"
android:text="I am a"
android:textColor="#000000"
android:textSize="16sp"
android:textStyle="bold" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/textView1"
android:layout_alignBottom="@+id/textView1"
android:layout_alignLeft="@+id/radioGroup2"
android:text="Looking for"
android:textColor="#000000"
android:textSize="16sp"
android:textStyle="bold" />
<EditText
android:id="@+id/editText3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/textView7"
android:layout_alignBottom="@+id/textView7"
android:layout_toRightOf="@+id/textView1"
android:ems="10"
android:inputType="number" />
<TextView
android:id="@+id/textView7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/editText1"
android:layout_below="@+id/editText1"
android:layout_marginTop="20dp"
android:text="Age"
android:textColor="#000000"
android:textSize="16sp" />
<ImageView
android:id="@+id/profilePicturePreview"
android:layout_width="150dp"
android:layout_height="120dp"
android:layout_alignLeft="@+id/btnConfirm"
android:layout_alignRight="@+id/textView4"
android:layout_below="@+id/textView3"
android:layout_marginTop="20dp"
android:layout_weight="0.90"
android:alpha="0.8"
android:background="#d2d2d2" />
<Button
android:id="@+id/button1"
android:layout_width="100dp"
android:layout_height="70dp"
android:layout_above="@+id/btnPictureSelect"
android:layout_toRightOf="@+id/textView4"
android:text="Upload from Facebook"
android:textSize="15sp" />
<RadioGroup
android:id="@+id/radioGroup2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/textView5"
android:layout_toRightOf="@+id/radioGroup1" >
<RadioButton
android:id="@+id/radio0"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="true"
android:text="Male"
android:textColor="#000000" />
<RadioButton
android:id="@+id/radio1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Female"
android:textColor="#000000" />
<RadioButton
android:id="@+id/radio2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="No response"
android:textColor="#000000" />
</RadioGroup>
</RelativeLayout>
</ScrollView>
Update Error shown in logcat. Layout now shows, but eglSurfaceAttrib not implemented error remains.
07-28 00:54:11.288: D/dalvikvm(1248): Late-enabling CheckJNI
07-28 00:54:11.484: D/dalvikvm(1248): GC_CONCURRENT freed 255K, 11% free 3088K/3456K, paused 3ms+1ms, total 15ms
07-28 00:54:11.484: D/dalvikvm(1248): WAIT_FOR_CONCURRENT_GC blocked 6ms
07-28 00:54:11.484: I/dalvikvm-heap(1248): Grow heap (frag case) to 4.198MB for 1127532-byte allocation
07-28 00:54:11.488: D/dalvikvm(1248): GC_FOR_ALLOC freed <1K, 9% free 4189K/4560K, paused 1ms, total 1ms
07-28 00:54:11.592: I/jdwp(1248): Ignoring second debugger -- accepting and dropping
07-28 00:54:11.600: D/dalvikvm(1248): GC_FOR_ALLOC freed 6K, 7% free 4480K/4800K, paused 33ms, total 34ms
07-28 00:54:11.804: D/libEGL(1248): loaded /system/lib/egl/libEGL_genymotion.so
07-28 00:54:11.804: D/(1248): HostConnection::get() New Host Connection established 0xb7985ee8, tid 1248
07-28 00:54:11.820: D/libEGL(1248): loaded /system/lib/egl/libGLESv1_CM_genymotion.so
07-28 00:54:11.820: D/libEGL(1248): loaded /system/lib/egl/libGLESv2_genymotion.so
07-28 00:54:11.868: W/EGL_genymotion(1248): eglSurfaceAttrib not implemented
07-28 00:54:11.868: E/OpenGLRenderer(1248): Getting MAX_TEXTURE_SIZE from GradienCache
07-28 00:54:11.872: E/OpenGLRenderer(1248): MAX_TEXTURE_SIZE: 16384
07-28 00:54:11.876: E/OpenGLRenderer(1248): Getting MAX_TEXTURE_SIZE from Caches::initConstraints()
07-28 00:54:11.876: E/OpenGLRenderer(1248): MAX_TEXTURE_SIZE: 16384
07-28 00:54:11.876: D/OpenGLRenderer(1248): Enabling debug mode 0
07-28 00:54:24.612: I/jdwp(1248): Ignoring second debugger -- accepting and dropping
07-28 00:54:24.788: I/jdwp(1248): Ignoring second debugger -- accepting and dropping
07-28 00:54:36.984: I/jdwp(1248): Ignoring second debugger -- accepting and dropping
07-28 00:54:37.576: W/IInputConnectionWrapper(1248): showStatusIcon on inactive InputConnection
07-28 00:54:42.984: W/EGL_genymotion(1248): eglSurfaceAttrib not implemented
07-28 00:54:43.744: W/ViewRootImpl(1248): Dropping event due to no window focus: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_ENTER, scanCode=28, metaState=0, flags=0x8, repeatCount=0, eventTime=65685, downTime=65685, deviceId=1, source=0x301 }
07-28 00:54:43.744: W/ViewRootImpl(1248): Dropping event due to no window focus: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_ENTER, scanCode=28, metaState=0, flags=0x8, repeatCount=0, eventTime=65859, downTime=65859, deviceId=1, source=0x301 }
07-28 00:54:43.752: W/ViewRootImpl(1248): Dropping event due to no window focus: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_ENTER, scanCode=28, metaState=0, flags=0x8, repeatCount=0, eventTime=66028, downTime=66028, deviceId=1, source=0x301 }
07-28 00:54:43.760: W/ViewRootImpl(1248): Dropping event due to no window focus: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_ENTER, scanCode=28, metaState=0, flags=0x8, repeatCount=0, eventTime=66186, downTime=66186, deviceId=1, source=0x301 }
07-28 00:54:44.320: I/jdwp(1248): Ignoring second debugger -- accepting and dropping
You are declaring two Activities in your File: ProfileCreation
and LoadImg
. Only the latter has itsonCreate()
method defined. But Android
searches for the ProfileCreation
onCreate()
method and does not find it. So, it does not draw your layout. Remove one of the Activities declaration. I also noticed that LoadImg Activity is not defined at your manifest.xml file.
Edit: You are starting your ACTION_PICK Intent
with startActivityForResult()
. For receiving the result of that Intent
, you must override onActivityResult()
method, so you can handle the picked Image info from the Gallery.
这篇关于留白的布局设计 - eglSurfaceAttrib未实现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!