What is the right way to use HoloEverywhere

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.

+2
source share
2 answers

Decided I need to use com.WazaBe.HoloEverywhere.app.AlertDialog instead of android.app.AlertDialog . Stupid me.

Answer added as recommended.

+6
source

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

or in style.xml

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

0
source

Source: https://habr.com/ru/post/1481206/


All Articles