roomorama / Caldroid

A better calendar for Android
Other
1.42k stars 531 forks source link

[Q] Display events when using customized cell #105

Closed DarkMagic closed 10 years ago

DarkMagic commented 10 years ago

@thomasdao Thank you for your very nice lib. I'm using it to display a calendar which has many events for one date. Like this: image

I already put all events inside a scrollview, but it seems the scrollbar not working.

    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:scrollbars="vertical">
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical">
                <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:gravity="bottom"
                        android:orientation="horizontal">
                        <ImageView
                            android:id="@+id/iv_duty_type_1"
                            android:layout_width="25dp"
                            android:layout_height="25dp"
                            android:layout_marginRight="5dp"
                            android:layout_marginBottom="2dp"
                            android:padding="3dp"/>
                        <TextView
                            android:id="@+id/tv_event_1"
                            android:textAllCaps="true"
                            android:layout_width="match_parent"
                            android:layout_height="match_parent"/>
                </LinearLayout>
                ....
        </LinearLayout>
    </ScrollView>

Could you please support me with this issue?

thomasdao commented 10 years ago

Android has issue with ScrollView within ScrollView. You can try work around http://stackoverflow.com/a/11554823/622510

DarkMagic commented 10 years ago

@thomasdao thanks, but what is the parentScrollView? I understand that childScrollView is a scrollview for each cell (I find that view in a class extends CaldroidGridAdapter), and guess that parentScrollView should be in CaldroidFragment, isn't it?

thomasdao commented 10 years ago

yes, that's the gridview. Your scrollview is a cell inside this gridview

DarkMagic commented 10 years ago

Actually, I would like to disable the scrolling of that gridview, how could I?

thomasdao commented 10 years ago

Sorry this issue is not specific for Caldroid, asking on StackOverflow helps you better

DarkMagic commented 10 years ago

Thanks.

UdaykiranGudepu commented 10 years ago

@DarkMagic Can you please guide me through how u designed week view and day view using caldroid library.

DarkMagic commented 10 years ago

Hi @UdaykiranGudepu Actually, I'm not using Caldroid lib for Week View. I followed this example: http://aleakymemory.blogspot.com/2012/09/android-room-manager.html The above example only supports you display one week each time and have no swipe. So you have to use ViewPager (or InfiniteViewPager) to wrap WeekViewFragment. I don't have Day View in my app, instead, I'm using a ExpandableListView wrapped in a ViewPager to display events.

UdaykiranGudepu commented 10 years ago

Thanks for your reply @DarkMagic . I will follow the tutorial .

ymerdrengene commented 10 years ago

Hey @DarkMagic ! Could you somehow share how you have created the events like the one on the picture? I have tried the link (http://aleakymemory.blogspot.com/2012/09/android-room-manager.html) but it is difficult to understand. Thx in advance :)

Virochana commented 9 years ago

Hi @DarkMagic, Could you share your code which display custom events in caldroid? My email address is unix2xinu@gmail.com, thanks.