0

I want to add a caption to wheel picker. I can't find any methods for a caption. I have already have a wheel picker which is only written in java. I want to add caption only in java.Please help me.

Edit: Here is my code.

    final WheelView minute = new WheelView(Mcontex);
    minute.setMinimumHeight(300);
    layoutHome.addView(minute, new LayoutParams(
            android.view.ViewGroup.LayoutParams.WRAP_CONTENT,
            android.view.ViewGroup.LayoutParams.WRAP_CONTENT, 1.2f));
    layoutmain.addView(layoutHome);
    minute.setViewAdapter(new RotationArrayAdapter(context, minutesArray, 1));
    minute.setCurrentItem(0);
    minute.addChangingListener(listener);
Machavity
  • 30,841
  • 27
  • 92
  • 100
Halo
  • 729
  • 1
  • 8
  • 18
  • 1
    Which wheel picker r u talking about ? Please also show some code – Dev01 Jan 13 '14 at 09:57
  • You can get help from the link http://stackoverflow.com/questions/24833827/wheel-picker-on-dialog-box-android/24897583#24897583 – snj Dec 01 '14 at 08:43

1 Answers1

0

You can try it:

 String[] dayArray = {"2 JAN", "3 jan", "4 jan", "5 jan", "6 jan", "7 jan", "8 jan"};
    WheelView  day;

    day = (WheelView) findViewById(R.id.day);
            day.setViewAdapter(new DayArrayAdapter(MainActivity.this, dayArray, weekDay));


            day.addChangingListener(new OnWheelChangedListener() {

                @Override
                public void onChanged(WheelView wheel, int oldValue, int newValue) {

                    Log.e("onChanged hours", dayArray[newValue]);

                    mCustomDate = dayArray[newValue];
                    mFinalTime = mCustomDate+" "+mCustomHour+mCustomMinute+" "+mAMORPM;
                    mSeletedDateTextView.setText(mFinalTime);
                }
            });
Ravind Maurya
  • 977
  • 15
  • 24