2

I'm trying to use dev branch of HoloEverywhere library to in my app. I understood that this is still during development but the demo seems to work okay so I give it a try.

I put android:theme="@style/Holo.Theme.Sherlock.Light" in the activity in my manifest. The structure of the activity is that it's using Fragment, one is a list and another is just Fragment. The ActionBar looks Holo just fine.

I turned my SherlockFragmentActivity into SActivity and Fragment into SFragment. Just as I checked in the accompanied demo app. I open dialog using this block of code in my SFragment.

    AlertDialog.Builder builder = new AlertDialog.Builder(context);
    builder.setTitle("Work in Progress")
            .setView(inflater.inflate(R.layout.extra_input))
            .setIcon(R.drawable.icon);
    builder.setPositiveButton("Positive", null);
    builder.setNegativeButton("Negative", null);
    builder.setNeutralButton("Neutral", null);
    builder.show();

The dialog popped up looking like the OS's AlertDialog where EditText inside extra_input layout shown as Holo. ProgressDialog also display with OS's theme as well.

I believed this is me incorrectly implemented the library. The question is how to do it right?

Edit: Solved it, I need to use com.WazaBe.HoloEverywhere.app.AlertDialog instead of android.app.AlertDialog. Silly me.

peetsnack
  • 91
  • 10
RobGThai
  • 5,937
  • 8
  • 41
  • 59
  • 4
    Add your solution as an answer and accept it after the correct amount of time has elapsed. This allows the question to still be valid in a Q&A format. – cjk Sep 19 '12 at 08:01

2 Answers2

6

Solved it, I need to use com.WazaBe.HoloEverywhere.app.AlertDialog instead of android.app.AlertDialog. Silly me.

Answer added as recommended.

RobGThai
  • 5,937
  • 8
  • 41
  • 59
0

android:theme="@style/Holo.Theme.Light"

or in style.xml

<style name="MyTheme" parent="Holo.Theme.Light"> </style>

jjalonso
  • 691
  • 5
  • 17