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 7548221
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T09:38:38+00:00 2026-05-30T09:38:38+00:00

I am trying to make a custom Calendar view and for that I use

  • 0

I am trying to make a custom Calendar view and for that I use MonthDisplayHelper to get the days of the month and a GridView to display them.

The problem is that MonthDisplayHelper is not giving me the right days order, for example if the current date is 02.20.2012, the MonthDisplayHelper gives me the following days in this order:

Sun — Mon — Tue — Wed — Thu — Fri — Sat

31 ——–1 —— 2 —— 3——- 4 —— 5 —— 6

7 —— 8 —— 9 —— 10 —— 11 —— 12 —- 13

14 —– 15 —– 16 —–17 —– 18 —– 19 —– 20 — <= the current day here is Sat but in reality is Mon

21 —– 22 —– 23 —– 24 —– 25 —– 26 —– 27

28 —— 29 ——1 —— 2 —— 3 —— 4 —— 5

So the previous month days should start from 29(on Sunday) and end with the next month days (3 on Sat)

I get the days from the MonthDisplayHelper like this:

calendarHelper = new MonthDisplayHelper(2012, 1, Calendar.SUNDAY);
int thisDay = calendarHelper.getDayAt(rowIndex, columnIndex);

and I am incrementing the rowIndex and columnIndex each time the getView() is called like this:

if (columnIndex >= 7) {
            rowIndex++;
            columnIndex = -1;
        }

columnIndex += 1;
  • 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-05-30T09:38:39+00:00Added an answer on May 30, 2026 at 9:38 am

    It seems that the problem was the gridview adapter, when it runs it gives me the same index for two or three time in a row and only after that the index gets incremented..
    I modified the increment method to do the incrementation of column and row index only if the grid index is not the same as the last given one..

    I’m still wondering why the adapter is doing this strange thing.. maybe someone could tell why..

    Thanks

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

Sidebar

Related Questions

Im trying to make a custom view that will have a dynamic number of
I'm trying to make a custom button, my only problem is that the background
I'm trying to make a custom text view that has the font set from
Trying to make a custom :confirm message for a rails form that returns data
I'm trying to make a custom view in Django admin. I'm reading from this
I'm trying to make a custom converter that inherits from DependencyObject , but it
I'm trying to make a custom Callout view for AnnotationView. I had seen this
I'm trying to make a custom Callout view for AnnotationView. I had seen this
I'm trying to make a custom dialog to show a view in this dialog.
I'm trying to make a custom swing control that is a meter. Swing Meter

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.