Comments (8)
@Ayysir With 3 elements it might be a better idea to move the button to the right and use the menu like this:
The other possible solution would be to for me to add an option of hiding X button when opening the menu. However this would force user to choose an option after opening menu. What do you think?
from tapbarmenu.
issue is layout wise user may want to leave button centered i.e in my case UI wise
option to dispactOntouch would be great if user touches outside of field, the menu closes
EDIT:
move it to the right, 'x' is still broken
from tapbarmenu.
@Ayysir I've recently made some changes with intercepting onTouch. Let me know if you are using newest 1.0.4
version.
from tapbarmenu.
Yeap i am.
On Mon, Dec 14, 2015, 4:53 AM Michal Drabik [email protected]
wrote:
@Ayysir https://github.com/Ayysir I've recently made some changes with
intercepting onTouch. Let me know if you are using newest 1.0.4 version.—
Reply to this email directly or view it on GitHub
#7 (comment)
.
from tapbarmenu.
Trying some similair cases right now and everything seems to be working just fine. Could you post your XML and we will try to solve the problem :)
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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:id="@+id/profile_layout"
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|bottom"
android:layout_marginBottom="24dp"
app:tbm_backgroundColor="?attr/colorPrimary"
app:tbm_buttonPosition="right"
>
<ImageView
android:id="@+id/menu_email"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:paddingTop="10dp"
android:paddingBottom="10dp"
/>
<ImageView
android:id="@+id/menu_download"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:paddingTop="10dp"
android:paddingBottom="10dp"
/>
<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"
/>
<Space
android:id="@+id/space"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
/>
</com.michaldrabik.tapbarmenulib.TapBarMenu>
</android.support.design.widget.CoordinatorLayout>
btw bunch of space between last imageview and X
from tapbarmenu.
Created this simple example and everything works fine not sure why is it broken in your case. Take a look:
MainActivity class:
https://gist.github.com/michaldrabik/5d0fdcbd4fc7c0b04dda
MainActivity layout:
https://gist.github.com/michaldrabik/607ee62cd02b7c32eb84
from tapbarmenu.
worked, thanks
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
- A switch case implement issues HOT 9
- Increasing memory usage HOT 4
- 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.