android-4.0-ice-cream-sandwich

Android BlurMaskFilter has no effect in canvas.drawOval while text is blurred

倖福魔咒の 提交于 2019-11-26 13:04:31
问题 I\'ve been trying to create a custom view which has blurred shapes under text. The problem is that the BlurMaskFilter has no effect on any shape that I draw on the canvas. Here is how I\'m initialising the Paint objects in the constructor: paint = new Paint(0); paint.setColor(0xffffffff); paint.setMaskFilter(new BlurMaskFilter(8, BlurMaskFilter.Blur.NORMAL)); mShadowPaint = new Paint(0); mShadowPaint.setColor(0xff333333); mShadowPaint.setMaskFilter(new BlurMaskFilter(10, BlurMaskFilter.Blur

uninstall app silently with system privileges

二次信任 提交于 2019-11-26 12:55:25
问题 My app have system privileges. It will be inside firmware, now it\'s located at /system/app I was able to install apps silently with this post install / uninstall APKs programmatically (PackageManager vs Intents) example app that works http://paulononaka.wordpress.com/2011/07/02/how-to-install-a-application-in-background-on-android/ But I still can\'t uninstall apps the same way. I tried to use reflection like as in the installation example. public ApplicationManager(Context context) throws

What are the default color values for the Holo theme on Android 4.0?

余生颓废 提交于 2019-11-26 12:49:39
问题 Does anyone have access to a list of the default colours used in the Holo them (light and dark) on Android 4.0? I\'m looking for things like list backgrounds, primary and secondary text, ActionBar, etc. Google gives some examples at the Themes and Color style guidelines, but they don\'t really go into the actual color values being used. I can grab them from the images, but I’d rather use something a little more accurate. 回答1: perhaps this is what you're looking for: https://github.com/android

Broadcast receiver not working in ICS if the app is not started atleast once

拟墨画扇 提交于 2019-11-26 11:29:47
问题 This question has been asked few times in stack overflow, but no solution, yet. I have a broadcast receiver for for receiving USB connected action.The broadcast receiver responsibility is , if I get the intent start my application.In the manifest file I have added the receiver . I have the same logic working in GingerBread, but I ICS its not working. Many questions like , broadcast-not-invoking 1: Android Boot-Up BroadCast Not invoking and broadcastreciever-not-working If I start my app

Custom Translucent Android ActionBar

早过忘川 提交于 2019-11-26 10:07:35
问题 I\'ve been scouring the interwebs (e.g. Android documentation, answers here, etc.) for the answer to what I thought would be a fairly trivial question. How do you achieve a translucent action bar like the ones in Google Music and YouTube (links are image examples)? I want video content to be full screen and not constrained/pushed down by the action bar while still leveraging the benefits of a built in UI component. I can obviously use a completely custom view, but I\'d rather leverage the

Disable Home Button in Android ICS (4.0)

笑着哭i 提交于 2019-11-26 09:45:02
问题 I am making a proprietary app for a company which will never release it to the Android Market (or Play Store I guess now) in Ice Cream Sandwich (Android 4.0). I need to disable the Home so the users cannot maliciously uninstall software or delete the data that the app captures. This latest version is the first to be written in 4.0, the previous versions were written in 2.2 and 3.2. For disabling the Home button in 2.2, I associated the app as a home replacement, so the button just reopened

How to read and edit Android calendar events using the new Android 4.0 Ice Cream Sandwich API?

本秂侑毒 提交于 2019-11-26 09:17:54
问题 We are trying to show user the Ice cream Sandwich calendar view, when they want to add a new event. We can only test this in emulator. The other problem is that we can\'t find any examples how to use CalendarProvider. This is the right class when it comes to dealing with Sandwich calendar? Would this be easier to do with Google Gdata API? [EDIT] So what we got working was adding an event to calendar but it was not through the API, we open the calendar in the correct view. But now the problem

Easy way to hide system bar on Android ICS

倾然丶 夕夏残阳落幕 提交于 2019-11-26 08:19:33
问题 I will give my ICS tablets for users to complete a survey so I would like the user to work with my app only. They should not be able to switch to the home screen, press back buttons etc., so I would like to hide the system bar completely. My tablet is rooted and I know some application like this can help me, but I don\'t need all the extra functions of this app. I found this tutorial that could help me, but if I can add the code to do my own, it would be great. 回答1: HideBar has a kiosk mode

Disable keyboard on EditText

喜你入骨 提交于 2019-11-26 07:30:01
问题 I\'m doing a calculator. So I made my own Buttons with numbers and functions. The expression that has to be calculated, is in an EditText , because I want users can add numbers or functions also in the middle of the expression, so with the EditText I have the cursor . But I want to disable the Keyboard when users click on the EditText . I found this example that it\'s ok for Android 2.3 , but with ICS disable the Keyboard and also the cursor. public class NoImeEditText extends EditText {

How to use Holo.Light theme, and fall back to 'Light' on pre-honeycomb devices?

不想你离开。 提交于 2019-11-26 06:55:41
问题 I\'d like to use the Holo.Light theme on devices that support it, and fall back to the regular Light theme on other devices. At the moment, referencing Holo.Light works fine on 3.0+, but older APIs simply revert to the default \'dark\' theme. Can I achieve what I want with with style inheritance? 回答1: You have to create a custom theme and save it in some directories to finally set this theme as the default one for the app First, in values add a themes.xml like this: <?xml version="1.0"