Skip to content

Commit

Permalink
fixing month
Browse files Browse the repository at this point in the history
  • Loading branch information
kal72 committed Feb 25, 2017
1 parent 411e8c0 commit 91dd223
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ protected void onCreate(Bundle savedInstanceState) {
.setPositiveButton(new DateMonthDialogListener() {
@Override
public void onDateMonth(int month, int startDate, int endDate, int year, String monthLabel) {

System.out.println(month);
}
})
.setNegativeButton(new OnCancelMonthDialogListener() {
Expand All @@ -30,20 +30,19 @@ public void onCancel(AlertDialog dialog) {
dialog.dismiss();
}
});

new RackMonthPicker(this)
.setPositiveButton(new DateMonthDialogListener() {
@Override
public void onDateMonth(int month, int startDate, int endDate, int year, String monthLabel) {

}
})
.setNegativeButton(new OnCancelMonthDialogListener() {
@Override
public void onCancel(AlertDialog dialog) {

}
}).show();
// new RackMonthPicker(this)
// .setPositiveButton(new DateMonthDialogListener() {
// @Override
// public void onDateMonth(int month, int startDate, int endDate, int year, String monthLabel) {
//
// }
// })
// .setNegativeButton(new OnCancelMonthDialogListener() {
// @Override
// public void onCancel(AlertDialog dialog) {
//
// }
// }).show();

Button button = (Button)findViewById(R.id.btn_show);
button.setOnClickListener(new View.OnClickListener() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ private Builder() {
radioButton.setMonth(MonthOfYear.getMonth(i - 1));
radioButton.setButtonDrawable(MonthOfYear.getIcons(i - 1));
if (i == 1) {
monthRadioButton = radioButton;
radioButton.setChecked(true);
mTitleView.setText(MonthOfYear.getMonth(i - 1) + ", " + year);
}
Expand All @@ -124,7 +125,7 @@ private Builder() {
}

radioButton.setMonthListener(this, radioButton);
monthRadioButton = radioButton;
// monthRadioButton = radioButton;
monthRadioButtonList.add(radioButton);
gridLayout.addView(radioButton);
}
Expand Down Expand Up @@ -190,6 +191,7 @@ public void onClick(View view) {
@Override
public void monthClick(MonthRadioButton objectMonth) {
mTitleView.setText(objectMonth.getMonth() + ", " + year);
monthRadioButton = objectMonth;
for (MonthRadioButton radioButton : monthRadioButtonList) {
if (radioButton != objectMonth) {
radioButton.setChecked(false);
Expand Down
4 changes: 2 additions & 2 deletions rackmonthPicker/src/main/res/drawable/jan.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:viewportWidth="300"
android:viewportHeight="300"
android:width="60dp"
android:height="60dp">
android:width="48dp"
android:height="48dp">
<group
android:translateY="-752.3622">
<path
Expand Down
4 changes: 2 additions & 2 deletions rackmonthPicker/src/main/res/drawable/jan_circle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:viewportWidth="300"
android:viewportHeight="300"
android:width="60dp"
android:height="60dp">
android:width="48dp"
android:height="48dp">
<group
android:translateY="-752.3622">
<path
Expand Down

0 comments on commit 91dd223

Please sign in to comment.