Juan Pedro Martinez
Juan Pedro Martinez

Reputation: 1974

Double border/frame in some holo components

I have a problem settings the holo style using holoeverywhere.Using some of the components I can see a double frame that look horrible. I've tried different settings but I can not find the solution. I think I am using badly this library.

I am going to attach some image to be clear:

enter image description here

I am going to describe a bit how I am working with them:

In my manifest, I am not ussing any style from this library. Actually I am using this style:

android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"

For the progress bar I am not ussing any xml, only a object

private ProgressDialog mPD;

which is imported from

import org.holoeverywhere.app.ProgressDialog;

and I call it using:

mPD =  ProgressDialog.show(context, null, progressMessage, true, true);

That's all.

For the TimePicker, I am creating this in runtime creating this object

new TimePickerDialog(getActivity(),android.R.style.Theme_Holo_Dialog_NoActionBar, timePickerListener,calendar.get(Calendar.HOUR), calendar.get(Calendar.MINUTE), true).show();

I have no idea about what I am doing bad...how I could delete this frame under my holo objects. Any subjections? Thanks

Upvotes: 0

Views: 315

Answers (2)

Budimir Grom
Budimir Grom

Reputation: 766

Had the same problem with time picker dialogs... Class TimePickerDialog inherits its own theme constants from AlertDialog. Same goes for other dialogs we've got from AlertDialog. You must use those in order to get predictable results. Try this code:

new TimePickerDialog(getActivity(), TimePickerDialog.THEME_HOLO_LIGHT, timePickerListener, calendar.get(Calendar.HOUR), calendar.get(Calendar.MINUTE), true).show();

Or maybe use TimePickerDialog.THEME_DEVICE_DEFAULT_LIGHT, if you prefer to stay with what user expects. Since images show dark theme, maybe you'd like that... Well, documentation says you may use the following constants:

  • TimePickerDialog.THEME_DEVICE_DEFAULT_DARK
  • TimePickerDialog.THEME_DEVICE_DEFAULT_LIGHT
  • TimePickerDialog.THEME_HOLO_DARK
  • TimePickerDialog.THEME_HOLO_LIGHT
  • TimePickerDialog.THEME_TRADITIONAL

Upvotes: 0

Prototik
Prototik

Reputation: 945

If. You. Not use. Styles from library... For what are you use library?
it's most stupid and horrible use-case for library. Really.
Not mix native/compat styles with compat/native classes. Never.

Upvotes: 1

Related Questions