Code Monkey home page Code Monkey logo

Comments (9)

michaldrabik avatar michaldrabik commented on August 10, 2024

Have you set an OnClickListener on your tapBarMenu?

from tapbarmenu.

axsddlr avatar axsddlr commented on August 10, 2024

@michaldrabik

        // FAB/Menu item
        tapBarMenu = (TapBarMenu) v.findViewById(R.id.tapBarMenu);
        tapBarMenu.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
                tapBarMenu.open();
            }
        });

from tapbarmenu.

michaldrabik avatar michaldrabik commented on August 10, 2024

@Ayysir
Use toggle() instead of open()

from tapbarmenu.

axsddlr avatar axsddlr commented on August 10, 2024

Same result of i use toggle

On Wed, Dec 9, 2015, 6:26 PM Michal Drabik [email protected] wrote:

@Ayysir https://github.com/Ayysir
Use toggle() instead of open()


Reply to this email directly or view it on GitHub
#3 (comment)
.

from tapbarmenu.

axsddlr avatar axsddlr commented on August 10, 2024

same issue if i use conditional statements instead

from tapbarmenu.

michaldrabik avatar michaldrabik commented on August 10, 2024

@Ayysir Could you paste your XML layout file?

from tapbarmenu.

axsddlr avatar axsddlr commented on August 10, 2024
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout 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"
    xmlns:tools="http://schemas.android.com/tools"
    android:orientation="vertical">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        android:paddingTop="16dp">

        <de.hdodenhof.circleimageview.CircleImageView
            android:id="@+id/civ"
            android:layout_width="160dp"
            android:layout_height="120dp"
            android:layout_gravity="center_horizontal"
            android:src="@drawable/header"
            app:civ_border_width="2dp" />


        <android.support.v4.widget.NestedScrollView
            android:id="@+id/cv"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            app:layout_behavior="@string/appbar_scrolling_view_behavior">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:orientation="vertical"
                android:paddingTop="5dp">

                <android.support.v7.widget.CardView
                    android:id="@+id/cv1"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_margin="16dp">

                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:orientation="vertical"
                        android:paddingBottom="24dp"
                        android:paddingLeft="16dp"
                        android:paddingRight="16dp"
                        android:paddingTop="24dp">

                        <TextView
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:text="@string/info_title"
                            android:textAlignment="center"
                            android:textAppearance="@style/TextAppearance.AppCompat.Title"
                            android:textColor="@color/md_black_1000" />

                        <View
                            android:layout_width="match_parent"
                            android:layout_height="@dimen/card_separator_height"
                            android:layout_marginTop="@dimen/card_separator_padding"
                            android:background="@color/card_border" />

                        <TextView
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:layout_marginTop="@dimen/card_textview_paddingTop"
                            android:text="@string/my_name"
                            android:textAlignment="center"
                            android:textColor="@color/md_black_1000" />

                        <TextView
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:text="@string/area"
                            android:textAlignment="center"
                            android:textColor="@color/md_black_1000" />
                    </LinearLayout>

                </android.support.v7.widget.CardView>

                <android.support.v7.widget.CardView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginBottom="16dp"
                    android:layout_marginLeft="16dp"
                    android:layout_marginRight="16dp">

                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:orientation="vertical"
                        android:paddingBottom="24dp"
                        android:paddingLeft="16dp"
                        android:paddingRight="16dp"
                        android:paddingTop="24dp">

                        <TextView
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:text="@string/resume_summary_title"
                            android:textAlignment="center"
                            android:textAppearance="@style/TextAppearance.AppCompat.Title"
                            android:textColor="@color/md_black_1000" />

                        <View
                            android:layout_width="match_parent"
                            android:layout_height="@dimen/card_separator_height"
                            android:layout_marginTop="@dimen/card_separator_padding"
                            android:background="@color/card_border" />

                        <TextView
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:layout_marginBottom="@dimen/card_textview_paddingBtm"
                            android:layout_marginTop="@dimen/card_textview_paddingTop"
                            android:text="@string/resume_summary"
                            android:textAlignment="center"
                            android:textColor="@color/md_black_1000" />
                    </LinearLayout>

                </android.support.v7.widget.CardView>

            </LinearLayout>

        </android.support.v4.widget.NestedScrollView>
    </LinearLayout>

    <com.michaldrabik.tapbarmenulib.TapBarMenu
        android:id="@+id/tapBarMenu"
        android:layout_width="match_parent"
        android:layout_height="56dp"
        app:layout_anchor="@id/cv"
        app:layout_anchorGravity="right|end|bottom"
        android:layout_marginBottom="24dp"
        app:tbm_backgroundColor="@color/red"
        app:tbm_menuAnchor="bottom"
        >

        <ImageView
            android:id="@+id/menu_email"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="1"
            android:paddingTop="10dp"
            android:paddingBottom="10dp"
            tools:visibility="visible"
            />

        <ImageView
            android:id="@+id/menu_share"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:paddingTop="10dp"
            android:paddingBottom="10dp"
            />

    </com.michaldrabik.tapbarmenulib.TapBarMenu>
</android.support.design.widget.CoordinatorLayout>

from tapbarmenu.

michaldrabik avatar michaldrabik commented on August 10, 2024

@Ayysir I've managed to reproduce this bug and will be fixing it.
For now please add 'Space' between your items so they don't overlap with menu button. It should work just fine:

...
<ImageView
    android:id="@+id/menu_email"
    android:layout_width="0dp"
    android:layout_height="match_parent"
    android:layout_weight="1"
    android:paddingTop="10dp"
    android:paddingBottom="10dp"
    tools:visibility="visible"
    />

<Space
    android:layout_width="56dp"
    android:layout_height="match_parent"
    />

<ImageView
    android:id="@+id/menu_share"
    android:layout_width="0dp"
    android:layout_height="wrap_content"
    android:layout_weight="1"
    android:paddingTop="10dp"
    android:paddingBottom="10dp"
    />
...

from tapbarmenu.

axsddlr avatar axsddlr commented on August 10, 2024

i had to define Space in java class to add it switch case to just toggle close

adding space only in resource breaks close button

but after adding it to class, it works

from tapbarmenu.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.