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

Swipe card going over the buttons at the buttons #193

Open
pasaden1 opened this issue May 16, 2017 · 2 comments
Open

Swipe card going over the buttons at the buttons #193

pasaden1 opened this issue May 16, 2017 · 2 comments

Comments

@pasaden1
Copy link

I saw a simular question #112 , but whatever I tried when start swinging , card always goes under the button layout. I tried many variants with layouts, merge, but it doesn`t matter how I place the views, when start swinging , the card is alway behind the other views in activity_main.xml.
There are some screens https://ibb.co/eBgGfk and https://ibb.co/euU2Lk

Any solution to fix this?
Thanks in advance.
Great library

@pasaden1
Copy link
Author

UPDATE

Fixed it. The frame in activity_main has to cover the whole screen and the button to be inside this area.

@ryanilles
Copy link

He @pasaden1, can you please show me your activity_main? Cause I am trying to get the card item hover over the buttons but everytime it goes under the layout.

This is how my XML looks like,
`

            <LinearLayout
                android:layout_marginBottom="20dp"
                android:layout_width="match_parent"
                android:layout_height="50dp"
                android:background="#ffffff">

                <TextView
                    android:id="@+id/textBreakfast"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:gravity="center"
                    android:text="Breakfast"
                    android:textSize="40sp" />
            </LinearLayout>

            <LinearLayout
                android:layout_marginBottom="5dp"
                android:layout_gravity="center_horizontal"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content">
                <TextView
                    android:textSize="25dp"
                    android:layout_marginEnd="20dp"
                    android:layout_gravity="center"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="For: "/>
                <LinearLayout
                    android:layout_gravity="center"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:orientation="vertical">
                    <TextView
                        android:layout_marginTop="5dp"
                        android:id="@+id/forbreakfastdatum"
                        android:layout_marginBottom="5px"
                        android:layout_gravity="center"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="T"
                        android:textAlignment="center"
                        android:textSize="25px"/>
                    <ToggleButton
                        android:textColor="#ffffff"
                        style="?android:attr/borderlessButtonStyle"
                        android:clickable="false"
                        android:checked="true"
                        android:layout_marginStart="2dp"
                        android:layout_marginEnd="2dp"
                        android:layout_gravity="start"
                        android:id="@+id/forbreakfast"
                        android:layout_width="35dp"
                        android:layout_height="35dp"
                        android:background="@drawable/circlebackgroundblue"/>
                </LinearLayout>

            </LinearLayout>


            <LinearLayout
                android:layout_marginTop="20dp"
                android:id="@+id/framelayout"
                android:layout_width="match_parent"
                android:layout_height="390dp"
                android:gravity="center"
                android:orientation="vertical">

                <com.lorentzos.flingswipe.SwipeFlingAdapterView
                    android:id="@+id/frame"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    app:rotation_degrees="15.5">
                </com.lorentzos.flingswipe.SwipeFlingAdapterView>

            </LinearLayout>


            <LinearLayout
                android:id="@+id/Rel5"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/lay"
                android:layout_gravity="center_horizontal">
                <android.support.design.widget.FloatingActionButton
                    android:layout_margin="20dp"
                    app:fabSize="normal"
                    app:maxImageSize="45dp"
                    app:backgroundTint="#fafafa"
                    android:src="@drawable/ic_no"
                    android:id="@+id/right"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginEnd="10dp"/>
                <android.support.design.widget.FloatingActionButton
                    android:layout_margin="20dp"
                    app:fabSize="normal"
                    app:maxImageSize="45dp"
                    app:backgroundTint="#fafafa"
                    android:src="@drawable/ic_heart"
                    android:id="@+id/left"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"/>
            </LinearLayout>

        </LinearLayout>

`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants