1

I am a newbie to android development and started playing with caldroid few days ago. However I have a problem on setting the height of my caldroid. I would like to display all the days in each month, and below the caldroid will have something else to display. However sometimes there are 4 rows, and sometimes there are 5 rows in a month. So I release it's impossible for me to set the height with a fixed amount.

How can I set the height of it so it will change the height dynamically???

Currently I have done:

    params = new LayoutParams(LayoutParams.WRAP_CONTENT,430);
//  params.addRule(RelativeLayout.ALIGN_PARENT_LEFT);
    params.addRule(RelativeLayout.BELOW, base.getId());

And the result isn't what I want =[

bencmh
  • 11
  • 2
  • By the way I have tried to set the para to wrap_content, however the caldroid will automatically fill the whole page and items below caldroid will be pushed out of the screen and disappear – bencmh Jul 11 '15 at 06:33

1 Answers1

2

I have same problem too. You can try to add this code after initializing of Bundle.

Bundle args = new Bundle();
args.putBoolean(CaldroidFragment.SQUARE_TEXT_VIEW_CELL, false);

it fits you cells. But be carefull if you use drawables inside cells.