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

Showing weekview in half part of the screen with showCompleteDay ==> true #293

Open
qadirsuh opened this issue Oct 26, 2022 · 0 comments
Open
Labels
bug Something isn't working

Comments

@qadirsuh
Copy link

qadirsuh commented Oct 26, 2022

Hello @thellmund Thank you for the amazing stuff.

I have a requirement. I need to show the weekview in half of the screen.

image

I have set the showCompleteDay ==> true but I can't scroll up/down the week-view now.
image

I am not sure what I have done wrong. Can anyone guide me please.

Here is the complete xml layout

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".ui.CalenderFragment">

    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <CalendarView
            android:id="@+id/calendar_view_full"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:layout_marginTop="-15dp"
            android:layout_marginBottom="10dp"
            android:background="#1D6A69"
            android:dateTextAppearance="@style/CalenderViewDateCustomText"
            android:firstDayOfWeek="2"
            android:padding="5dp"
            android:showWeekNumber="true"
            android:theme="@style/CalenderViewCustom"
            android:unfocusedMonthDateColor="#f00"
            android:weekDayTextAppearance="@style/CalenderViewWeekCustomText"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="-10dp"
            android:background="@drawable/bg_rounded_week_view"
            android:clipToOutline="true"
            android:orientation="vertical"
            android:padding="10dp"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/calendar_view_full">


            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:padding="10dp"
                android:text="Meetings"
                android:textColor="#2C3C51"
                android:textSize="13sp"
                android:textStyle="bold" />

            <androidx.recyclerview.widget.RecyclerView
                android:id="@+id/recyclerview_meetings"
                android:layout_width="match_parent"
                android:layout_height="wrap_content" />

            <com.alamkanak.weekview.WeekView
                android:id="@+id/weekView"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:clipToOutline="true"
                app:columnGap="8dp"
                app:dayBackgroundColor="@color/white"
                app:defaultEventColor="@color/green_color"
                app:eventCornerRadius="10dp"
                app:eventTextColor="@color/white"
                app:headerBackgroundColor="@color/white"
                app:headerPadding="12dp"
                app:hourHeight="60dp"
                app:showCompleteDay="true"
                app:numberOfVisibleDays="1"
                app:showTimeColumnHourSeparator="false"
                app:timeColumnBackgroundColor="@color/white"
                app:timeColumnPadding="8dp"
                app:timeColumnTextColor="@color/black"
                app:timeColumnTextSize="12sp"
                app:todayBackgroundColor="@color/grey_color" />


        </LinearLayout>

        <com.google.android.material.floatingactionbutton.FloatingActionButton
            android:id="@+id/fab"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_margin="16dp"
            android:clickable="true"
            android:focusable="true"
            android:src="@drawable/ic_action_add_dark"
            app:layout_anchorGravity="bottom|right|end"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent" />

    </androidx.constraintlayout.widget.ConstraintLayout>

</FrameLayout>
@qadirsuh qadirsuh added the bug Something isn't working label Oct 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant