Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9150541
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T11:37:29+00:00 2026-06-17T11:37:29+00:00

This kind of bug is like a black magic : I am trying to

  • 0

This kind of bug is like a black magic :

I am trying to port https://github.com/SimonVT/android-timepicker to complete Holo style (by default it has got only ICS timepicker widget, dialog remains pre-Honeycomb).

I have extended Theme.Sherlock with timepicker’s special attributes , then applied it to whole application. Dialog looks the same as in default ( mentioned above). After that I just added HoloEverywhere lib to project … BLACK magic appears! Timepicker widget somehow lost some of it’s views like blue lines and changed position within dialog. I am still wondering about reason of this glitch.

Note : in my project(code) as well as in TimePicker lib I have got absolutely nothing concerning HoloEverywhere

Note: I also changed some attributes in timepicker because they are conflicting with HoloEverywhere’s attributes (because of “… attribute has already been declared” error)

Code:

public class DialogSample extends SherlockFragmentActivity implements OnTimeSetListener {

    private TextView mTimeDisplay;

    private int mHour;
    private int mMinute;

    static final int TIME_DIALOG_ID = 0;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_dialog);

        final Calendar c = Calendar.getInstance();
        mHour = c.get(Calendar.HOUR_OF_DAY);
        mMinute = c.get(Calendar.MINUTE);

        mTimeDisplay = (TextView) findViewById(R.id.timeDisplay);

        findViewById(R.id.btnDialog).setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
                DialogFragment newFragment = new TimePickerFragment();
                newFragment.show(getSupportFragmentManager(), "timePicker");    
            }
        });

        updateDisplay();
    }

    // updates the time we display in the TextView
    private void updateDisplay() {
        mTimeDisplay.setText(
                new StringBuilder()
                        .append(pad(mHour)).append(":")
                        .append(pad(mMinute)));
    }

    private static String pad(int c) {
        if (c >= 10) {
            return String.valueOf(c);
        } else {
            return "0" + String.valueOf(c);
        }
    }






    static public class TimePickerFragment extends SherlockDialogFragment {

        @Override
        public TimePickerDialog onCreateDialog(Bundle savedInstanceState) {
            // Use the current date as the default date in the picker
            final Calendar c = Calendar.getInstance();
            int hour = c.get(Calendar.HOUR_OF_DAY);
            int minute = c.get(Calendar.MINUTE);


            return new TimePickerDialog(getSherlockActivity(), (DialogSample)getSherlockActivity(), hour, minute, true);
        }

        public TimePickerFragment() {

        }

    }


    @Override
    public void onTimeSet(TimePicker view, int hourOfDay, int minute) {
         mHour = hourOfDay;
         mMinute = minute;
         updateDisplay();

    }
}

https://github.com/SimonVT/android-timepicker

https://github.com/SimonVT/android-numberpicker

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T11:37:30+00:00Added an answer on June 17, 2026 at 11:37 am

    Solution is tricky : I added HoloEverywhere to

    1) NumberPicker lib
    2) TimePicker lib
    3) TimePicker dialog lib
    4) to my project

    but I am still not satisfied with this because solution is the same way unclear as an issue

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am going crazy now. Googled this, thought some kind of IDE bug. Maybe
My pages contain this kind of url: http://fashion.piliapp.com/author/http%3A%2F%2Fwww.wretch.cc%2Fblog%2Fwiwinnie/ which created by http://fashion.piliapp.com/author/ . rawurlencode(http://www.wretch.cc/blog/wiwinnie)
This looks like a bug to me. But, maybe you folks can help me
This kind of code would normally work in PHP, but since the scope is
this kind of emergency, so please, can someone help me... I'm using movingboxes plugin
This was the first time I encountered this kind of error after dealing with
I perform this kind of query in my Python code to conn = rdbms.connect(instance=_INSTANCE_NAME,
How to do this kind of events when I pressed the Preferences Button I
I have this kind of question. In my form, i got this as a
I'm getting this kind of errors while compiling any of the Win 8 Metro

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.