android-3.0-honeycomb

Which theme attribute changes the text color of an EditText's error message

て烟熏妆下的殇ゞ 提交于 2019-12-01 02:14:29
In my form I use setError("") on an EditText field. My Application-Theme extends android:Theme.Holo . I have manually set an image with a dark background for android:errorMessageBackground and android:errorMessageBackgroundAbove . And now here's the problem: The text color of the error message is also very dark and not readable. I tried changing different textColor attributes in my Theme, but I wasn't able to find the correct one. May anyone could help me, please? Thank you! Chris Pradeep You can change the text color by using HTML Font Tag. But for customizing background color, you should

Fragments onClick method in fragment element

ぃ、小莉子 提交于 2019-12-01 01:09:46
问题 I read quite some articles about fragments, but I am still confused about how to do what. I have a MainActivity, which displays two fragments side by side. In one of the fragments I have a button and defined in the fragments layout XML for the button android:onClick="buttonClicked" Now I want to implement that method public void buttonClicked(View view) I would have assumed that this has to be implemented in FragmentA.java and not in MainActivity.java. But it only works if that method is

Which theme attribute changes the text color of an EditText's error message

放肆的年华 提交于 2019-11-30 21:42:47
问题 In my form I use setError("") on an EditText field. My Application-Theme extends android:Theme.Holo . I have manually set an image with a dark background for android:errorMessageBackground and android:errorMessageBackgroundAbove . And now here's the problem: The text color of the error message is also very dark and not readable. I tried changing different textColor attributes in my Theme, but I wasn't able to find the correct one. May anyone could help me, please? Thank you! Chris 回答1: You

How to remove the margin between the app icon and the edge of the screen on the ActionBar?

人走茶凉 提交于 2019-11-30 19:47:13
I have a custom home icon for my app and I want it to align all the way to the left of the actionbar, so that it's touching the edge of the screen. Is this possible, and if so, how can it be done? I don't see anything that sets the padding or margin to make it align all the way to the left. I finally managed to get this. You need to use a custom actionbar view. It's actually quite easy: (This is using ActionbarSherlock, it should work with the stock compat library also...) First in your res/values/themes.xml, set the actionbar display options to "custom": <item name="android:displayOptions"

Why android:layout_width=”0px” for fragments?

让人想犯罪 __ 提交于 2019-11-30 19:19:42
The layout width is always zero in fragment examples. What is behind this value? To hopefully explain, take a look at the Design Philosophy for Fragments in the Dev Guide. If you look at the image, to the left it shows how a phone would show an intial Activity A which would then start Activity B when an item in a list is selected. To the right, however, it is showing how those two Activities can be shown as Fragments at the same time. Notice Fragment A is taking 1/3 of the screen and Fragment B is filling 2/3 of the screen. Now look at the XML for that layout from Adding a fragment to an

Application does not show up in Android Market for Motorola XOOM tablet

纵然是瞬间 提交于 2019-11-30 18:46:23
We have an android application, manifest of which sets the following configurations: minsdkVersion = "4" <supports-screens android:normalScreens="true" android:largeScreens="true" android:anyDensity="false" /> However, when a user with Motorola XOOM device browses Android Market he is not displayed our application. Why is this so? I had the same issue. Along with including android:xlargeScreens="true" I found this to be the fix. The Android Market treats as though requesting a permission like CALL_PHONE also requests: <uses-feature android:name="android.hardware.telephony" /> The XOOM does not

How do I write to the internal storage file system with NativeActivity?

家住魔仙堡 提交于 2019-11-30 16:20:05
I'm porting a pure C++ game over to Android, and since my target is Android 3.0+ tablets, I opted to use NativeActivity in order to avoid Java completely. However, I am not able to see any functionality that lets me write to the device's internal storage. Calls to fopen() will fail as I have no idea which directory I am supposed to write and the internal storage filesystem is not accessible This code usually does the trick on Java, giving me the path to the internal writable data directory for my app: mContext.getFilesDir(); Does anybody know an alternative for C++? Otherwise I'll have to call

Canvas antialiasing with hardware acceleration (Android API 11 and Later)

妖精的绣舞 提交于 2019-11-30 15:54:28
问题 I have a simple bitmap that I draw within a canvas & that I rotate using a matrix. The problem I bump into is that using hardware acceleration the edges are not anti-aliased when rotated (this is working perfectly with Hardware acceleration turning off). And of course things like “setDrawFilter” are useless as they are ignored when hardware acceleration is turned on! canvas.setDrawFilter(new PaintFlagsDrawFilter(1, Paint.ANTI_ALIAS_FLAG)); Am I missing something or is it just a limitation of

Flash in WebView not working on Android 3.2

孤者浪人 提交于 2019-11-30 15:17:05
问题 I am having a problem that only happens on my Motorola Xoom which I have updated to 3.2 through OTA. I have a simple application that uses a WebView to load a small html that has flash content in it. Here is the code snippet. mWebView = (WebView) findViewById(R.id.webview); mWebView.getSettings().setJavaScriptEnabled(true); mWebView.getSettings().setPluginsEnabled(true); I know it is correct because it can run fine on my Samsung Galaxy S running Android 2.2. Anybody else seen this problem?

Android 3.0 CalendarView

别说谁变了你拦得住时间么 提交于 2019-11-30 15:07:31
问题 I'm trying to implement a CalendarView, it takes an absurd amount of time (about 10 seconds) to appear on screen and it only loads the month and weekday headers, it does not display any calendar content. Using the same code from this video but not seeing the same result. I'm trying to launch it in a dialog: CalendarView calendarView = new CalendarView(this); dialog.setContentView(calendarView); but when I tried to embed it in an activity it took the screen the same amount of time to load and