我以为这是在路上,有谁知道如何启用它?
似乎我无法GLES2.0在模拟器中获得上下文,但也许这只是我.IllegalArgumentException:没有配置与egl相匹配.
然而,GLES20 API Demo包括似乎运行.
无论如何,即便如此,它们似乎都没有像老模拟器那样加速或快速.不错的更新.
我正在创建一个具有Webview内联其他元素的应用程序,嵌套在ScrollView中.我注意到在ICS中,在Galaxy Nexus设备上进行测试时,当页面被抛出时,WebView似乎与其余显示的元素脱节,导致WebView看起来浮动,因为它有几毫秒的值落后于绘画.这不会发生在Android的2.x版本中(未在3.x上测试).这是一个浮动效果的视频http://www.youtube.com/watch?v=avfBoWmooM4(如果你设置为1080p全屏,你可以看清楚)
任何人都可以建议为什么会发生这种情况或修复?
我在下面设置了一个测试项目来演示:
package com.martynhaigh.floating_web_view;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebView;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.ScrollView;
import android.widget.TextView;
public class FloatingWebViewTestActivity extends FragmentActivity {
public final int viewId = 0x12345678;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
FrameLayout frame = new FrameLayout(this);
frame.setId(viewId);
setContentView(frame, lp);
FloatingWebViewICSFragment fragment = new FloatingWebViewICSFragment();
getSupportFragmentManager().beginTransaction().add(viewId, fragment).commit();
}
public static class FloatingWebViewICSFragment extends Fragment {
private final …Run Code Online (Sandbox Code Playgroud) 有没有人知道如何Ice Cream Sandwich使用WRITE_APN_SETTINGS权限为" " 编写应用程序?WRITE_APN_SETTINGS现在被忽略ICS,代码触摸APN失败.
我的AppWidget有问题.拥有Android 4.0的Galaxy Nexus和Nexus S上的一些用户报告了库存启动器中的破损字体.
我将手机连接到ADB以查看日志,我多次发现这些错误:
OpenGLRenderer is out of memory!
Run Code Online (Sandbox Code Playgroud)
有没有办法优化AppWidget以减少对OpenGL渲染器的内存要求?
是否足以降低视图树的级别?
最初发布于:https://groups.google.com/forum/?fromgroups#!topic / android-Developers/Aoxf_hWIQ24
我正在尝试为Android 4.0.3安装SDK,但是我收到错误,它没有下载也没有安装.
Unexpected Error installing 'SDK Platform Android 4.0.3, API 15, revision 2': org.eclipse.swt.SWTException: Widget is disposed
Run Code Online (Sandbox Code Playgroud)
这是错误.
谁知道怎么修它 ?:)
编辑:
问题修复,不知道为什么也不知道为什么问题甚至发生.
我为Android 4.0编写了1个应用程序,它是通过broadcastreceiver启动的.我的代码如下:
在AndroidManifest.xml中:
<uses-permission android:name="android.permission.INTERNET" />
<application android:icon="@drawable/icon" android:label="@string/app_name">
<receiver android:name="com.Android.Exercise.StartUpReceiver"
android:permission="android.permission.RECEIVE_BOOT_COMPLETED">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
<!--<action android:name="StartInstrument" />
<action android:name="PrintControlName" /> -->
</intent-filter>
</receiver>
<service android:enabled="true" android:name="StartAUT_Service">
<intent-filter>
<action android:name="com.Android.Exercise.StartAUT_Service" />
</intent-filter>
</service>
</application>
Run Code Online (Sandbox Code Playgroud)
在StartUpReceiver类中:
public class StartUpReceiver extends BroadcastReceiver{
@Override
public void onReceive(Context context, Intent intent) {
Log.i("Broadcast", "onReceive");
Intent i = null;
if(intent.getAction().equals(Intent.ACTION_BOOT_COMPLETED)){
i = new Intent(context, StartAUT_Service.class);
i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
}
context.startService(i);
}
}
Run Code Online (Sandbox Code Playgroud)
重新启动设备后,我无法接收广播.请帮帮我,非常感谢
android broadcastreceiver android-3.0-honeycomb android-4.0-ice-cream-sandwich
我们的想法是拥有一个项目列表,在单击项目后,ProgressBar将在任务完成时慢慢填充.例如,列出文件列表,每个文件都有一个"下载"按钮.单击下载按钮时,将在后台下载文件,并填写进度条,显示文件完成的接近程度.
为了实现这一点,我创建了一个AsyncTask,偶尔会在适配器上调用notifyDataSetChanged来重绘它.虽然单击一个按钮后可以正常工作,但在AsyncTask完成之前,我无法单击ListView中的其他按钮.有人可以告诉我我做错了什么吗?
我在冰淇淋三明治上的模拟器(x86)上运行它.
我有一个DownloadItem来表示下载的进度(为简洁起见,下面的代码是简化的):
class DownloadItem {
public String name; // Name of the file being downloaded
public Integer progress; // How much is downloaded so far
public Integer length; // Size of the file
}
Run Code Online (Sandbox Code Playgroud)
然后我有一个ArrayAdapter,它为ListView调整DownloadItem列表:
class DownloadArrayAdapter extends ArrayAdapter<DownloadItem> {
List<DownloadItem> mItems;
public DownloadArrayAdapter(List<DownloadItem> items) {
mItems = items;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
View row = convertView;
if(row == null) {
// Inflate
Log.d(TAG, "Starting XML inflation");
LayoutInflater inflater = (LayoutInflater) …Run Code Online (Sandbox Code Playgroud) 在Gingerbread中,我没有使用smoothScrollToPosition()一次滚动数十个项目的问题.在我的Nexus S升级为Ice Cream Sandwich之后,我注意到无论我在smoothScrollToPosition()中放置什么,它都只会在任一方向上滚动大约几百个像素,然后停止.
这是ICS的已知问题吗?我也注意到Galaxy Nexus.我已经看了几个其他的问题并尝试了一些不同的技巧,比如关闭对notifyDataSetChanged()的调用,并将smoothScrollToPosition()作为延迟的runnable发布,但不幸的是,它不想滚动多于一个停止前一百个像素左右.:(
我的问题是我必须解析HTML数据
84 101 <br>some text<br><table border='1'>Here comes a table definition</table>
Run Code Online (Sandbox Code Playgroud)
并且XmlPullParserException抛出以下内容:
while (eventType != XmlPullParser.END_DOCUMENT) {
if (eventType == XmlPullParser.START_TAG) {
// do something
} else if (eventType == XmlPullParser.END_TAG) {
// do something else
}
eventType = xpp.next(); // the XmlPullParserException is thrown here, on method next()
}
Run Code Online (Sandbox Code Playgroud)
非常有趣和奇怪的部分是这样的:仅在Nexus S(OS版本4.0.4)上抛出异常,在具有较低OS版本的设备上,此方法运行良好.
错误消息如下:
org.xmlpull.v1.XmlPullParserException: Unexpected token (position:TEXT 84 101 @1:8 in java.io.StringReader@414e3248)
Run Code Online (Sandbox Code Playgroud)
任何人都可以解释我为什么只在ICS上发生这种情况?谢谢.
android xmlpullparser xml-parsing android-4.0-ice-cream-sandwich
我试图通过启动一个意图以编程方式触发我的ICS设备的加密(Intent --> DevicePolicyManager.ACTION_START_ENCRYPTION).这非常有效.我想知道是否发送了广播或类似的广告来识别用户是否点击了"加密设备"或拒绝了请求.我需要注意用户的决定.
我的第二个问题涉及这个方法setStorageEncryption(admin, boolean),该方法是在DevicePolicyManager.setStorageEncryption(admin, false)如果我之后启动上面提到的加密意图,呼叫是否会对设备加密产生影响?
亲切的问候
security encryption android device-policy-manager android-4.0-ice-cream-sandwich
android ×10
android-4.0-ice-cream-sandwich ×10
apn ×1
emulation ×1
encryption ×1
permissions ×1
platform ×1
sdk ×1
security ×1
xml-parsing ×1