Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Hughlander
May 11, 2005

Are there any 'tricks' for getting content onto the device/emulator faster? The time it takes to package/sign an apk and upload it is really cutting into a code=>test=>debug cycle. This is a fairly large app that uses the NDK but isn't a NativeActivity.

Adbot
ADBOT LOVES YOU

Glimm
Jul 27, 2005

Time is only gonna pass you by

Android developer survey is up:
http://bit.ly/AndroidDevSurveyJuly2013

Feel free to fill it out and let Google know how you feel about the current state of Android development!

Rescue Toaster
Mar 13, 2003
So I'm just getting started with some android development, building a little app that will get lots of data over a bluetooth serial port. The UI is very simple, and I'm fairly familiar with Java, so I'm not super worried about that end. But as far as how to handle IO without callbacks, I'm picturing something like this:

1) The main UI thread.
2) A thread that blocks against the InputStream of the BluetoothSocket. As the data stream is parsed and packets are received, it will build some kind of message object and pass them into a Concurrent queue.
3) A thread that consumes the queue, handles statistical analysis of packets received, and updates the UI's data structures (for populating a listview). I'm not sure really the best way to update android UI elements from background threads.

The best analogy to the program would be a network packet sniffer. (It's basically sniffing a moderate speed serial control network.)

So a couple questions:

1) Is this the right way to handle it? Is there a better abstraction for a background producer thread that spends most of its time blocked?

2) Blocking operations against an InputStream don't have timeout. What's the 'right' way to clean up a background thread that's blocked?

3) Any tips for UI updating? I'm more used to C# .NET where serial streams and the like all have callbacks, and automatic data binding of the UI to application objects eliminates about 90% of this stuff.

Tunga
May 7, 2004

Grimey Drawer

Thermopyle posted:

So, anyway, are there any libraries like that?
This reply is kind of late and I'm only just learning Android so I might be off here.

I think what you want is Index Scrolling as shown on the Android Developers site? Except you don't want alphabetical sections, you want section names. But actually that's just a less specific example of the same thing (note how the Contacts app has "Me" at the top.

As far as I can work out you need to set fastScrollEnabled to true on your ListView and then implement SectionIndexer .

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Tunga posted:

This reply is kind of late and I'm only just learning Android so I might be off here.

I think what you want is Index Scrolling as shown on the Android Developers site? Except you don't want alphabetical sections, you want section names. But actually that's just a less specific example of the same thing (note how the Contacts app has "Me" at the top.

As far as I can work out you need to set fastScrollEnabled to true on your ListView and then implement SectionIndexer .

Yes, this is it! Thanks.

admiraldennis
Jul 22, 2003

I am the stone that builder refused
I am the visual
The inspiration
That made lady sing the blues
Anyone know of a decent Android A/B testing service? Something on the lightweight/inexpensive side (i.e. not swerve) preferred...

edit: is the clutch.io base really awful or what?

admiraldennis fucked around with this message at 03:34 on Jul 22, 2013

kitten smoothie
Dec 29, 2001

http://android-developers.blogspot.com/2013/07/android-43-and-updated-developer-tools.html

quote:

Last, we’ve updated the Android Support Library (r18) with several key APIs to help you build great apps with broad compatibility. Most important, we've added an Action Bar API to let you build this essential Android design pattern into your app with compatibility back to Android 2.1.

So is there any reason to use ABS anymore? I have an app I want to overhaul and I'm curious if I should bother with ABS or if this should nail what I need.

Glimm
Jul 27, 2005

Time is only gonna pass you by

kitten smoothie posted:

http://android-developers.blogspot.com/2013/07/android-43-and-updated-developer-tools.html


So is there any reason to use ABS anymore? I have an app I want to overhaul and I'm curious if I should bother with ABS or if this should nail what I need.

I think using the support library version is a better idea. No need to pull in a separate library project when the support library is already going to be used in your project.

Tunga
May 7, 2004

Grimey Drawer
A couple of Android developer advocates were asked about this on G+ or something, I saw it recently. Their answer was that if you're already using ABS then there's no great requirement to recode your app, but for new apps you should probably use Google's version since you know it'll keep working in the future.

Sereri
Sep 30, 2008

awwwrigami

Tunga posted:

A couple of Android developer advocates were asked about this on G+ or something, I saw it recently. Their answer was that if you're already using ABS then there's no great requirement to recode your app, but for new apps you should probably use Google's version since you know it'll keep working in the future.

But isn't it just dropping the ABS, including the library and removing all the Sherlock prefixes?

Doctor w-rw-rw-
Jun 24, 2008

Sereri posted:

But isn't it just dropping the ABS, including the library and removing all the Sherlock prefixes?

It should be, but different code is different code and if you stick by "don't fix what ain't broke" (and conveniently ignore that Android itself is often broken), just stick with what you were already using.

I haven't taken a look at Android in a while, but one useful thing I could imagine remaining useful is VPI (ViewPagerIndicator).

Tunga
May 7, 2004

Grimey Drawer
I updated the SDK but Android Studio doesn't offer 4.3 as a targetable API level. Do I need to do something else before it'll show up? I'm new to all of this.

Hughlander
May 11, 2005

Tunga posted:

I updated the SDK but Android Studio doesn't offer 4.3 as a targetable API level. Do I need to do something else before it'll show up? I'm new to all of this.

Are you using 0.2.2 that came out two days ago? http://tools.android.com/recent/androidstudio022released

Tunga
May 7, 2004

Grimey Drawer
I wasn't, but now I am, and it doesn't seem to have made a difference.

I don't desperately need to target 4.3, it just seemed odd that I can't.

Glimm
Jul 27, 2005

Time is only gonna pass you by

Tunga posted:

I wasn't, but now I am, and it doesn't seem to have made a difference.

I don't desperately need to target 4.3, it just seemed odd that I can't.

Do you have multiple SDKs installed? Android Studio comes with its own SDK I think, maybe your pointing at the wrong one?

Fluue
Jan 2, 2008
I'm having a lot of trouble getting a ListView working. I've tried using two different adapters (LazyAdapter and then a custom SimpleAdapter)

My app takes JSON data and then parses it into a listview (simple enough). But I'm also using the ImageLoader library from nostra13 ( https://github.com/nostra13/Android-Universal-Image-Loader ) to take a dynamically generated URL and download an image.

I'm getting NullPointerExceptions, and just now got this when using the custom SimpleAdapter:

code:
07-27 18:56:22.321: ERROR/AndroidRuntime(28133): FATAL EXCEPTION: main
        java.lang.RuntimeException: Unable to start activity ComponentInfo{com.dsgunter.randompokemongenerator/
com.dsgunter.randompokemongenerator.Results}: 
java.lang.NullPointerException
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2100)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2132)
        at android.app.ActivityThread.access$600(ActivityThread.java:139)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1231)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:137)
        at android.app.ActivityThread.main(ActivityThread.java:5021)
        at java.lang.reflect.Method.invokeNative(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:511)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
        at dalvik.system.NativeStart.main(Native Method)
        Caused by: java.lang.NullPointerException
        at com.dsgunter.randompokemongenerator.Results.onCreate(Results.java:51)
        at android.app.Activity.performCreate(Activity.java:5058)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2064)
I'll attach the code that's giving me grief below:
https://gist.github.com/verkaufer/985a7f4e0f145a729e0b (Results.Java)
https://gist.github.com/verkaufer/28ae68336f8b698affec (MyAdapter.java - the new adapter that generated the above error)
https://gist.github.com/verkaufer/63d9764dc80c2fa09d10 (LazyAdapter.java - old adapter that I was using but pokeman on line 72 always remained null)

Should I keep using my LazyAdapter? I tried the other one because I was stumped on why pokeman wasn't populating (even using breakpoints, it stayed null the entire time).

zeekner
Jul 14, 2007

Fluue posted:

I'm having a lot of trouble getting a ListView working. I've tried using two different adapters (LazyAdapter and then a custom SimpleAdapter)

My app takes JSON data and then parses it into a listview (simple enough). But I'm also using the ImageLoader library from nostra13 ( https://github.com/nostra13/Android-Universal-Image-Loader ) to take a dynamically generated URL and download an image.

I'm getting NullPointerExceptions, and just now got this when using the custom SimpleAdapter:

code:
07-27 18:56:22.321: ERROR/AndroidRuntime(28133): FATAL EXCEPTION: main
        java.lang.RuntimeException: Unable to start activity ComponentInfo{com.dsgunter.randompokemongenerator/
com.dsgunter.randompokemongenerator.Results}: 
java.lang.NullPointerException
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2100)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2132)
        at android.app.ActivityThread.access$600(ActivityThread.java:139)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1231)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:137)
        at android.app.ActivityThread.main(ActivityThread.java:5021)
        at java.lang.reflect.Method.invokeNative(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:511)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
        at dalvik.system.NativeStart.main(Native Method)
        Caused by: java.lang.NullPointerException
        at com.dsgunter.randompokemongenerator.Results.onCreate(Results.java:51)
        at android.app.Activity.performCreate(Activity.java:5058)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2064)
I'll attach the code that's giving me grief below:
https://gist.github.com/verkaufer/985a7f4e0f145a729e0b (Results.Java)
https://gist.github.com/verkaufer/28ae68336f8b698affec (MyAdapter.java - the new adapter that generated the above error)
https://gist.github.com/verkaufer/63d9764dc80c2fa09d10 (LazyAdapter.java - old adapter that I was using but pokeman on line 72 always remained null)

Should I keep using my LazyAdapter? I tried the other one because I was stumped on why pokeman wasn't populating (even using breakpoints, it stayed null the entire time).

In results.java, you are referencing the listview but you never grab a reference with findViewById();

Specifically, somewhere before:
code:
list.setAdapter(adapter);
You need to add:
code:
list = (ListView) findViewById(R.id.listname);

Fluue
Jan 2, 2008
Whoops! I must have deleted that line when refactoring..

I'm still receiving the same error though. I tried a solution provided on StackOverflow (changing my activity name for Results.java to .Results in AndroidManifest.xml) but that still results in the same error and app crash. Is there a specific debug method I should look at to determine where things are going wrong?

Angryhead
Apr 4, 2009

Don't call my name
Don't call my name
Alejandro




Ugh, spent a while trying to figure out why my app was crashing on a friend's phone.
Apparently I was using methods that required an API that was newer than the minimum, which obviously gave no (explicit) warning from Eclipse. :suicide:

A question: is BitmapFactory.options.inSampleSize the best(only?) way to reduce memory size by images (that are being streamed from a web server) or is there a better way?

Thom Yorke raps
Nov 2, 2004


Fluue posted:

Whoops! I must have deleted that line when refactoring..

I'm still receiving the same error though. I tried a solution provided on StackOverflow (changing my activity name for Results.java to .Results in AndroidManifest.xml) but that still results in the same error and app crash. Is there a specific debug method I should look at to determine where things are going wrong?

Debug the code and look at why it is null. You need to find out where you assign it a value and why that code isn't executing, or where it is set to null. If you only set things using setter methods then this is relatively easy.

Also I would check out Volley for image loading and caching. It has a NetworkImageView that handles everything real nice for you including caching. If you (or anyone) has any Volley questions just ask because I've been looking at it quite extensively recently.

Glimm
Jul 27, 2005

Time is only gonna pass you by

Angryhead posted:

Ugh, spent a while trying to figure out why my app was crashing on a friend's phone.
Apparently I was using methods that required an API that was newer than the minimum, which obviously gave no (explicit) warning from Eclipse. :suicide:

I assume you've updated to the latest SDK? Lint should catch things like that - which APIs were they? This is probably a bug that should be reported.

quote:

A question: is BitmapFactory.options.inSampleSize the best(only?) way to reduce memory size by images (that are being streamed from a web server) or is there a better way?

I don't know of a better way :(

Google's guide for handling this seems to rely on inSampleSize:

http://developer.android.com/training/displaying-bitmaps/load-bitmap.html

Angryhead
Apr 4, 2009

Don't call my name
Don't call my name
Alejandro




Glimm posted:

I assume you've updated to the latest SDK? Lint should catch things like that - which APIs were they? This is probably a bug that should be reported.

My android:minSdkVersion was set to "8" (and that was what the device was using) and I was using the View.setScaleX method, which was added in API level 11. App crashes with an java.lang.NoSuchMethodError.

No warning from either Eclipse or Lint. Found somebody on Stackoverflow with the same problem... back in December of 2012. No solution.

Thought it does seem like I'm missing the latest version of the SDK so I'll try updating and maybe this'll keep this from happening.
e: No change.

Angryhead fucked around with this message at 17:08 on Jul 31, 2013

Glimm
Jul 27, 2005

Time is only gonna pass you by

Angryhead posted:

My android:minSdkVersion was set to "8" (and that was what the device was using) and I was using the View.setScaleX method, which was added in API level 11. App crashes with an java.lang.NoSuchMethodError.

No warning from either Eclipse or Lint. Found somebody on Stackoverflow with the same problem... back in December of 2012. No solution.

Thought it does seem like I'm missing the latest version of the SDK so I'll try updating and maybe this'll keep this from happening.

Yeah it's frustrating when the tools don't pick up issues like that :( I'll check later to see if Android Studio fixes it, I know they've been working at making sure API level issues are caught at the tooling level.

kwantam
Mar 25, 2008

-=kwantam

Angryhead posted:

My android:minSdkVersion was set to "8" (and that was what the device was using) and I was using the View.setScaleX method, which was added in API level 11. App crashes with an java.lang.NoSuchMethodError.

Looks like setScaleX is implemented in the support library, kind of. See, e.g., android.support.v4.view.viewPager.

Speaking of which, has anyone gotten the backported android.support.v7.widget.ShareActionProvider to work? After inflating the menu in onCreateOptionsMenu(), I try to get a reference to the ShareActionProvider and instead get null.

XML looks like this:

code:
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
    <item
        android:id="@+id/share_menu"
        android:orderInCategory="100"
        android:showAsAction="always"
        android:title="@string/share_workout"
        android:actionProviderClass="android.support.v7.widget.ShareActionProvider"
/>
</menu>
The failing code, somewhat simplified:

code:
    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.hiitrun, menu);
	final MenuItem mItem = (MenuItem) menu.findItem(R.id.share_menu);
	final ShareActionProvider sActPro = (ShareActionProvider) MenuItemCompat.getActionProvider(mItem);
        sActPro.setShareIntent(getHIITIntent());
        return true;
    }
I get a NullPointerException when I attempt to setShareIntent().

Running almost identical code using the ICS classes (android.widget.ShareActionProvider) works fine.

Sereri
Sep 30, 2008

awwwrigami


Where is MenuItemCompat coming from? Is that a static call?

kwantam
Mar 25, 2008

-=kwantam

Sereri posted:

Where is MenuItemCompat coming from? Is that a static call?

It's coming from android.support.v4.view.MenuItemCompat, and it is indeed a static function.

kwantam
Mar 25, 2008

-=kwantam
All right, I figured it out.

When using the support lib, you have to change the XML schema of the Action-related XML elements.

In addition, you need to be subclassing ActionBarActivity rather than Activity, and of course import android.support.v7.app.ActionBarActivity. You'll also need android.support.v4.app.MenuItemCompat. (While you're at it, you can go ahead and make the little action bar "back" button work through the support library on older devices)

So, here's the working XML:

code:
<menu xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:localNS="http://schemas.android.com/apk/res-auto" >
    <item
        android:id="@+id/share_menu"
        android:orderInCategory="100"
        android:title="@string/share_menu_text"
        localNS:showAsAction="always"
        localNS:actionProviderClass="android.support.v7.widget.ShareActionProvider"
     />
</menu>
And the accompanying code:

code:
    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // inflate the premade menu
        getMenuInflater().inflate(R.menu.myMenu, menu);
        // now connect the ShareActionProvider with our sharing intent
        final MenuItem mItem = (MenuItem) menu.findItem(R.id.share_menu);
        final ShareActionProvider sActPro = (ShareActionProvider) MenuItemCompat.getActionProvider(mItem);
        sActPro.setShareIntent(getMyIntent());
        return true;
    }
Another couple notes: if you're using ActionBarActivity, you need to call supportInvalidateOptionsMenu() rather than invalidateOptionsMenu(). If you want to dynamically insert the ShareActionProvider rather than using XML, you'll need to use some other compatibility functions:

code:
    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // inflate
        getMenuInflater().inflate(R.menu.myMenu, menu);
        // get the menu item
        final MenuItem mItem = (MenuItem) menu.findItem(R.id.share_menu);
        // make the ShareActionProvider
        final Context mCtx = getSupportActionBar().getThemedContext;
        final ShareActionProvider sActPro = new ShareActionProvider(mCtx);
        // hook stuff up
        MenuItemCompat.setActionProvider(mItem, sActPro);
        sActPro.setShareIntent(getMyIntent());
        return true;
    }
I hope this helps someone else in the future.

IAmKale
Jun 7, 2007

やらないか

Fun Shoe
Can I reference an existing string in strings.xml when I define another string? For example:
XML code:
<string name="foo">Foo</string>
<string name="bar">@string/foo + Bar</string>
I want the "bar" string to return "fooBar" right now or "ShittyBar" later if I change the value of the "foo" string to "lovely".

Sereri
Sep 30, 2008

awwwrigami

Karthe posted:

Can I reference an existing string in strings.xml when I define another string? For example:
XML code:
<string name="foo">Foo</string>
<string name="bar">@string/foo + Bar</string>
I want the "bar" string to return "fooBar" right now or "ShittyBar" later if I change the value of the "foo" string to "lovely".
I don't think that works. You could try this:
XML code:
<string name="foo">Foo</string>
<string name="bar">%s Bar</string>
Java code:
String foobar = String.format(context.getString(R.string.bar), context.getString(R.string.foo));
Or of course some good old string concatenation.

IAmKale
Jun 7, 2007

やらないか

Fun Shoe
Is there a good or common directory that apps can write files to? I'm planning on implementing a feature that will let users export vocabulary lists from my app. I want them to be able to easily find and copy them off the device afterwards.

zeekner
Jul 14, 2007

Karthe posted:

Is there a good or common directory that apps can write files to? I'm planning on implementing a feature that will let users export vocabulary lists from my app. I want them to be able to easily find and copy them off the device afterwards.

External storage typically fills that role, you can create a folder and save your files there. Most devices will offer a method to read from that storage via USB, so they don't even need to pull a card or use a separate app to get to it.

It's up to the device whether that storage will be an SD card or dedicated partition with USB access, so don't explicitly state that it's on the SD card or it might confuse the user.

Hughlander
May 11, 2005

Are there any real good resources for NDK development out there? It honestly feels like I'm on the bleeding edge of things with the hoops needed to go through to get things to run correctly.

IAmKale
Jun 7, 2007

やらないか

Fun Shoe
Do any of you guys have any experience with the Play Store's third-party translation services? I translated the UI of my Japanese dictionary app into Japanese but want someone native to proof-read it. I'm feeling bad asking friends to proof my stuff for free, so I'm considering shelling out a bit of cash up front to get a bona fide translation in place before launch.

Doctor w-rw-rw-
Jun 24, 2008

Karthe posted:

Do any of you guys have any experience with the Play Store's third-party translation services? I translated the UI of my Japanese dictionary app into Japanese but want someone native to proof-read it. I'm feeling bad asking friends to proof my stuff for free, so I'm considering shelling out a bit of cash up front to get a bona fide translation in place before launch.

PM tarepanda. He should be fluent and know a thing or two about apps, I think.

admiraldennis
Jul 22, 2003

I am the stone that builder refused
I am the visual
The inspiration
That made lady sing the blues

Angryhead posted:

Ugh, spent a while trying to figure out why my app was crashing on a friend's phone.
Apparently I was using methods that required an API that was newer than the minimum, which obviously gave no (explicit) warning from Eclipse. :suicide:

A question: is BitmapFactory.options.inSampleSize the best(only?) way to reduce memory size by images (that are being streamed from a web server) or is there a better way?

This has burned me more than once :(

Android Studio picks up on these issues though.

PicnicBasket
Mar 21, 2010
Any idea if there is a way for me to get my hands on a physical copy of the Android SDK documentation, short of just printing it out and putting it in a binder? I'm not in a location with regular access to the internet and am starting the dive into Android development. I have about 6 years in C++ (surprised it took me this long to go mobile) and have already purchased the O'Reilly book from Amazon. Looking for good offline resources that can keep me going long enough until I get back home.

Tunga
May 7, 2004

Grimey Drawer

PicnicBasket posted:

Any idea if there is a way for me to get my hands on a physical copy of the Android SDK documentation, short of just printing it out and putting it in a binder?
There should be a docs folder in your SDK root.

PicnicBasket
Mar 21, 2010

Tunga posted:

There should be a docs folder in your SDK root.

offline.html, well I'm mildly embarrassed. This will do, thank you!

Tunga
May 7, 2004

Grimey Drawer
I'm trying to create an action bar which looks something like the one in the AOSP Contacts app. The main bar is blue, the icons and text are white, and the overflow menu is white with dark text.

In my case I'm using purple rather than blue but the principle should be the same.

The problem is that if I use Theme.Holo.Light as my base theme then the overflow icon turns dark grey which looks rubbish on a solid colour, it should be white. If I use Theme.Holo.Light.DarkActionBar then the icon is white (good) but the overflow menu will have a black background (bad).

Which of these things is it easier for me to manually override and how do I go about it? I'm struggling to find any decent API documentation for the Widget.Holo.blabla stuff so I don't even know what it is that I should be overriding.

Here's my code right now:
code:
    <style name="AppTheme"
           parent="android:Theme.Holo.Light.DarkActionBar">
        <item name="android:actionBarStyle">@style/AppActionBar</item>
    </style>

    <style name="AppActionBar"
           parent="android:Widget.Holo.Light.ActionBar.Solid.Inverse">
        <item name="android:background">#AA66CC</item>
    </style>
While we're at it, what is the difference between Solid and Solid.Inverse?

Tunga fucked around with this message at 18:30 on Aug 18, 2013

Adbot
ADBOT LOVES YOU

zeekner
Jul 14, 2007

Tunga posted:

I'm trying to create an action bar which looks something like the one in the AOSP Contacts app. The main bar is blue, the icons and text are white, and the overflow menu is white with dark text.

In my case I'm using purple rather than blue but the principle should be the same.

The problem is that if I use Theme.Holo.Light as my base theme then the overflow icon turns dark grey which looks rubbish on a solid colour, it should be white. If I use Theme.Holo.Light.DarkActionBar then the icon is white (good) but the overflow menu will have a black background (bad).

Which of these things is it easier for me to manually override and how do I go about it? I'm struggling to find any decent API documentation for the Widget.Holo.blabla stuff so I don't even know what it is that I should be overriding.

Here's my code right now:

While we're at it, what is the difference between Solid and Solid.Inverse?

Give this a shot:
http://jgilfelt.github.io/android-actionbarstylegenerator/

It has an option to customize the overflow menu color (but it's flaky in ABS, I've been meaning to try it in ABC). I forget the exact method to customize that color, but you can set a unique color in that utility and look at the results. I think it might have involved a 9-patch image as well, so look at the resources.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply