roomorama / Caldroid

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

Over the current month there is a piece from the previous #456

Open OM-3kChcBjgFR2COfP opened 7 years ago

OM-3kChcBjgFR2COfP commented 7 years ago

Hi Thanks for the calendar! I have a question about the markup. The calendar is built in scrollview and its height takes all the markup. Look at the screenshot, over the current month there is a piece from the previous one and it will also be scrolled, how to leave only the current month in the markup?

Thank you

OM-3kChcBjgFR2COfP commented 7 years ago

My layout.xml:

xml version="1.0" encoding="utf-8"?>

ScrollView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent">

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="#FFF"
    android:orientation="vertical">

    <com.synnapps.carouselview.CarouselView
        android:id="@+id/carouselView"
        android:layout_width="match_parent"
        android:layout_height="200dp"/>

    <ImageView
        android:id="@+id/top_content"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="-35dp"
        android:scaleType="fitXY"
        android:src="@drawable/top_content_xml" />

    <LinearLayout
            android:id="@+id/calendar1"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:layout_marginTop="25dp"
            android:orientation="vertical"/>

    <Button
        android:id="@+id/load_button"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="" />

    <TextView
        android:id="@+id/textview"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"/>

/LinearLayout>

/ScrollView>