Skip to content

Commit

Permalink
pull request #32 Merge branch 'nitin3210-master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
J-Jamet committed Feb 2, 2018
2 parents 87a4bdd + 12fb087 commit 5ec5c3e
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 6 deletions.
6 changes: 3 additions & 3 deletions ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@

Donations will be used to create free and open source applications.

[![Donation Paypal](https://4.bp.blogspot.com/-ncaIbUGaHOk/WfhaThYUPGI/AAAAAAAAAVQ/_HidNgdB1q4DaC24ujaKNzH64KUUJiQewCLcBGAs/s1600/pay-with-paypal.png "")](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=KM6QMDAXZM3UU "Kunzisoft Paypal Donation")
[![Donation Paypal](https://4.bp.blogspot.com/-ncaIbUGaHOk/WfhaThYUPGI/AAAAAAAAAVQ/_HidNgdB1q4DaC24ujaKNzH64KUUJiQewCLcBGAs/s1600/pay-with-paypal.png)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=KM6QMDAXZM3UU "Kunzisoft Paypal Donation")

[![Donation Streamlabs](https://lh3.googleusercontent.com/d1aTMwN6NMJmcMdsz24h_J4JmH5aZ9lhbJdZWQ3VFne3VZxiUVPrYZ41qm1Zig2ha4lU4Wg_BSAE_w=w1920-h1200-no "")](https://youtube.streamlabs.com/UC_U4icXPFfgKo4IDSTSzBEQ "Kunzisoft Streamlabs Donation")
<a href="bitcoin:1DSwXCk7Sob24sNsofywNoRQw2f5Qj5t2F"><img src="https://2.bp.blogspot.com/-K7-LKnSZd7c/WkvIKpLdmKI/AAAAAAAAAVs/-5LTimDq5IURMHwMmEP5VPTT53b2EUsswCLcBGAs/s1600/donate-with-bitcoin.png" alt="Kunzisoft Bitcoin" />Bitcoin wallet address : 1DSwXCk7Sob24sNsofywNoRQw2f5Qj5t2F</a>

[![Donation Liberapay](https://liberapay.com/assets/widgets/donate.svg "")](https://liberapay.com/Kunzisoft/donate "Kunzisoft Liberapay Donation")
[![Donation Liberapay](https://liberapay.com/assets/widgets/donate.svg)](https://liberapay.com/Kunzisoft/donate "Kunzisoft Liberapay Donation")

## Installation
Add the JitPack repository in your build.gradle at the end of repositories:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ public void onDateSelected(@NonNull MaterialCalendarView widget, @NonNull Calend
listPickerYearView.assignCurrentYear(calendarDay.getYear());
yearHeaderValues.setText(yearSimpleDate.format(dateTimeCalendar.getTime()));
monthAndDayHeaderValues.setText(dayAndMonthSimpleDate.format(currentDate));
timePicker.clickHour();
}
});
materialCalendarView.invalidate();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ public class SwitchTimePicker implements RadialPickerLayout.OnValueSelectedListe
// Enable/Disable Vibrations
private boolean mVibrate = true;

private boolean isSelected = false;


public SwitchTimePicker(Context context, OnTimeSelectedListener callback) {
mContext = context;
onTimeSelectedListener = callback;
Expand Down Expand Up @@ -236,7 +239,11 @@ public void onClick(View v) {
mMinuteView.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// TODO bug
//if user click minute first then we ask user to select the Hours first.
if(!isSelected){
clickHour();
return;
}
setCurrentItemShowing(MINUTE_INDEX, true, false, true);
mTimePicker.tryVibrate();
if(onClickTimeListener != null)
Expand Down Expand Up @@ -910,6 +917,14 @@ public void setFirstViewShow(int viewIndex) {
mCurrentViewShow = viewIndex;
}

public void clickHour() {
isSelected = true;
setCurrentItemShowing(HOUR_INDEX, true, false, true);
mTimePicker.tryVibrate();
if(onClickTimeListener != null)
onClickTimeListener.onClick(mHourView);
}

/**
* Simple node class to be used for traversal to check for legal times.
* mLegalKeys represents the keys that can be typed to get to the node.
Expand Down
4 changes: 2 additions & 2 deletions switchdatetime/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<dimen name="time_label_text">24sp</dimen>
<dimen name="time_label_AmPm">12sp</dimen>
<dimen name="time_label_height">32dip</dimen>
<dimen name="time_label_width">128dip</dimen>
<dimen name="time_label_min_width">170dp</dimen>
<dimen name="time_label_width">150dip</dimen>
<dimen name="time_label_min_width">180dp</dimen>
<dimen name="ampm_label_size">16sp</dimen>
<dimen name="ampm_left_padding">6dip</dimen>
<dimen name="extra_time_label_margin">-30dp</dimen>
Expand Down

0 comments on commit 5ec5c3e

Please sign in to comment.