Comments (9)
Have you set an OnClickListener
on your tapBarMenu
?
from tapbarmenu.
// FAB/Menu item
tapBarMenu = (TapBarMenu) v.findViewById(R.id.tapBarMenu);
tapBarMenu.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
tapBarMenu.open();
}
});
from tapbarmenu.
@Ayysir
Use toggle()
instead of open()
from tapbarmenu.
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.
same issue if i use conditional statements instead
from tapbarmenu.
@Ayysir Could you paste your XML layout file?
from tapbarmenu.
<?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.
@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.
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)
- Can't add library 'Error:Error: error in parsing "g/"' HOT 4
- how to make the menu like in the demo 2 I mean that the close icon in the right ?? HOT 8
- sdk15 HOT 1
- Why can't the menu bar display completely HOT 2
- Listeners HOT 1
- Crash in fragment use - open another fragment and coming back to original with TapBarMenu HOT 1
- Selected Item HOT 1
- Manifest merger failed with multiple errors, see logs HOT 5
- Issue when i change relative layout params
- Unable to compile in my project. HOT 6
- ERROR: Failed to resolve: com.github.michaldrabik:TapBarMenu:1.0.6 HOT 6
- Can I make this menu vertical when screen is in landscape mode? HOT 3
- menubar
- I tried to use 1.0.5 as well as 1.0.6, both are showing errors
- iconClosedDrawable = ResourcesCompat.getDrawable(getContext(), R.drawable.icon_close_animated); HOT 2
- Increasing memory usage HOT 4
- Odd number of items breaks layout and function HOT 8
- Animation delay HOT 6
- Drawable for tbm_iconOpened and tbm_iconClosed HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tapbarmenu.