Code Monkey home page Code Monkey logo

Comments (8)

michaldrabik avatar michaldrabik commented on August 10, 2024

@Ayysir With 3 elements it might be a better idea to move the button to the right and use the menu like this:
alt text

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.

axsddlr avatar axsddlr commented on August 10, 2024

@michaldrabik

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.

michaldrabik avatar michaldrabik commented on August 10, 2024

@Ayysir I've recently made some changes with intercepting onTouch. Let me know if you are using newest 1.0.4 version.

from tapbarmenu.

axsddlr avatar axsddlr commented on August 10, 2024

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.

michaldrabik avatar michaldrabik commented on August 10, 2024

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.

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"
    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.

michaldrabik avatar michaldrabik commented on August 10, 2024

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.

axsddlr avatar axsddlr commented on August 10, 2024

worked, thanks

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.