android-4.0-ice-cream-sandwich

Exception when I run my application from Eclipse

主宰稳场 提交于 2019-11-29 22:06:13
I've been having this problem for almost 2 months now and can't figure it out. The problem is that if my application is running and I run (reinstall) my application from Eclipse, I get an error message indicating that my application has crashed 'Unfortunately, has stopped.'. I notice that it also occurs when I run it away from my PC/Eclipse, I think that it happens only after I don't run it for a while. It only occurs if the app is active in the 3rd activity ( BaseDiagramActivity ) and then I run the app again from Eclipse. I've stripped out basically all the application except the 3

use holo theme on Android < 4.0

别说谁变了你拦得住时间么 提交于 2019-11-29 20:28:08
I'm developing an app for Android 2.2 and higher. I use the great ActionBarSherlock (thank you, Jake Wharton !!) to use the action bar on pre-ICS devices. While the actionbar looks great, all other gui elements have the look of the default theme of the device (in my case HTC Sense 3). Is there a possibility to style my (>= Android 2.2) app on all android devices with the Holo.Dark.Theme? I compile my app with Android 4.0.3, the minSDK version is 8. Enjoy HoloEverywhere, that's the whole purpose of the project! (Edit) new adress: https://github.com/Prototik/HoloEverywhere No. That would require

Change ListView choiceMode from singleChoice to multipleChoiceModal

泄露秘密 提交于 2019-11-29 18:27:31
问题 I have a ListView that normally is the singleChoice choiceMode . When the user long presses on an item, I want to enter an action mode that allows selecting multiple items so they can perform an action on any selected items. I am able to configure the ListView so that it is in singleChoice mode and the user is able to select list items to display a details fragment next to it and have the list item itself shown in its activated state. I am also able to configure the ListView so that it is in

Scrollable App widgets

∥☆過路亽.° 提交于 2019-11-29 18:09:20
Scrollable App widgets are included in ICS and honeycomb ...for example the mail widget and bookmark widget I want to code a custom scrollable widget for me for ICS ... But I am unable to find any source and references..please suggest App Widgets can be used with collections: http://developer.android.com/guide/topics/appwidgets/index.html#collections For example android.widget.ListView and android.widget.GridView 来源: https://stackoverflow.com/questions/8815572/scrollable-app-widgets

Get the real screen resolution on Ice Cream Sandwich

半世苍凉 提交于 2019-11-29 18:04:40
问题 Devices with Ice Cream Sandwich can use on-screen soft keys, and this means that some of the screen estate is taken by these keys. I need to get the real screen resolution, and not the resolution minus the space taken up by the soft keys. I've tried the following, but neither works: Display display = getWindowManager().getDefaultDisplay(); int width = display.getWidth(); int height = display.getHeight(); Log.d("SCREEN RES", "Width: " + width + ". Height: " + height); DisplayMetrics metrics =

Android app doesn't work on Android 4

不羁的心 提交于 2019-11-29 17:57:16
I created an Android project on 2.3.3 and tried it on mobile 2.3.3, everything works OK. It didn't work on mobile 4, so I re-built for Android 4, but I have the same problem. This is the code: public void FTP_Download(){ String server = "192.168.1.135"; int port = 21; String user = "pc1"; String pass = "1551"; FTPClient ftpClient = new FTPClient(); try { ftpClient.connect(server, port); ftpClient.login(user, pass); ftpClient.enterLocalPassiveMode(); ftpClient.setFileType(FTP.BINARY_FILE_TYPE); Toast.makeText(getBaseContext(), "download starting.",Toast.LENGTH_LONG).show(); // APPROACH #1:

How to record the video using camera preview on TextureView

别说谁变了你拦得住时间么 提交于 2019-11-29 17:24:30
问题 I have been playing with TextureView on some Android 4.0 devices. For example, I tried to develop a simple app, which can record the video and uses TextureView for its preview. However, as far as I read the Android API documents, standard MediaRecorder requires certain surface in order to perform video recording, but on the other hand, TextureView does not have its own surface anymore, so an incompatibility between TextureView and MediaRecorder seems exist. MediaRecorder.setPreviewDisplay

Parsing data from hdp device for android (API 15)

会有一股神秘感。 提交于 2019-11-29 16:32:55
问题 I am using the HDP Sample and I have a Blood pressure sensor (http://www.andonline.com/medical/products/details.php?catname=&product_num=UA-767PBT-C). I get the data from it, but I don't know how to parse it into something human readable. this is what I tried until now with something like: while(fis.read(data) > -1) { String value = null; BigInteger bi = new BigInteger(data); // for(byte b:data){ // value+=b; // } Log.d("read data binary", "the data "+bi.toString(2)); Log.d("read data decimal

flash player crashes when trying to enter fullscreen mode android 4.0

这一生的挚爱 提交于 2019-11-29 15:41:46
So I've created an android app that plays video from blip.tv and various other flash-enabled websites. I use a Webview to display the video. Here is my code: try{ requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow().addFlags(LayoutParams.FLAG_KEEP_SCREEN_ON); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); view = new WebView(this); view.getSettings().setPluginsEnabled(true); view.getSettings().setPluginState(WebSettings.PluginState.ON); view.getSettings().setJavaScriptEnabled(true); view.getSettings().setLoadWithOverviewMode

Android AVD not recognizing device but ADB does

拥有回忆 提交于 2019-11-29 15:18:17
I'm trying to get my device to debug my software but it won't show up in the AVD list. The ADB can see it and so does the Eclipse device manager. I can get an interactive shell using adb etc. C:\Program Files (x86)\Android\android-sdk\platform-tools>adb devices List of devices attached BX9038ZRUV device Does anyone understand what's going on and how I should fix it? I'm running Windows 7 and my phone is a Sony Ericson Xperia S running Android 4.0.4. avd is only for virtual Device. What you have to do is: Run Configs> change to "Ask everytime you run app" , or your real device. AVD stands for