I am trying to use the dev branch of the HoloEverywhere library in my application. I realized that this is still during development, but the demo seems to be working fine, so I give it a try.
I put android: theme = "@ style / Holo.Theme.Sherlock.Light" in action in my manifest. The structure of the activity is that it uses a Fragment, one is a list, and the other is only a Fragment. ActionBar Holo looks very good.
I turned Sherlock> in SFragment . Just as I checked in the attached demo application. I open a dialog using this code block in my SFragment element.
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();
A dialog similar to OS AlertDialog has appeared, where the EditText inside the extra_input layout is displayed as Holo. ProgressDialog is also displayed with an OS theme.
I figured it was I who improperly implemented the library. The question is how to do it right?
Edit: Solved , I need to use com.WazaBe.HoloEverywhere.app.AlertDialog instead of android.app.AlertDialog . Stupid me.
source share