Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calendar not show. What i am doing wrong? #34

Open
sweetie opened this issue Nov 5, 2015 · 3 comments
Open

Calendar not show. What i am doing wrong? #34

sweetie opened this issue Nov 5, 2015 · 3 comments

Comments

@sweetie
Copy link

sweetie commented Nov 5, 2015

/Layout:

<com.andexert.calendarlistview.library.DayPickerView
    android:id="@+id/pickerView"
    android:layout_width="match_parent"
    android:layout_height="match_parent"

    calendar:drawRoundRect="true" />

Activity Class:

package com.example.enny.agendando.ui.activities;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;

import com.andexert.calendarlistview.library.DayPickerView;
import com.andexert.calendarlistview.library.SimpleMonthAdapter;
import com.example.enny.agendando.R;

public class SelectDateActivity extends Activity implements com.andexert.calendarlistview.library.DatePickerController {

private DayPickerView dayPickerView;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_select_date);
    dayPickerView = (DayPickerView) findViewById(R.id.pickerView);
    dayPickerView.setController(this);
}

@Override
public int getMaxYear() {
    return 2015;
}

@Override
public void onDayOfMonthSelected(int year, int month, int day) {
    Log.e("Day Selected", day + " / " + month + " / " + year);
}

@Override
public void onDateRangeSelected(SimpleMonthAdapter.SelectedDays<SimpleMonthAdapter.CalendarDay> selectedDays) {

    Log.e("Date range selected", selectedDays.getFirst().toString() + " --> " + selectedDays.getLast().toString());
}

}

@RiccardoFabozzi
Copy link

Try setting 2016 in getMaxYear() method. It should work

@uzumyam
Copy link

uzumyam commented Nov 27, 2015

RiccardoFabozzi 's method are correctly

@yaoxin2017
Copy link

Modify the following location code:SimpleMonthAdapter > getItemCount > return Math.abs(itemCount);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants