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

Menu items unavailable? #4

Closed
Farzadpro opened this issue Jul 16, 2015 · 8 comments
Closed

Menu items unavailable? #4

Farzadpro opened this issue Jul 16, 2015 · 8 comments

Comments

@Farzadpro
Copy link

Hey, and thanks for this,
How to add menu items like ResideMenu?

@kyze8439690
Copy link
Owner

Add a layout (e.g. LinearLayout) as the first item of ResideLayout, like the ImageView in https://github.com/kyze8439690/ResideLayout/blob/master/app%2Fsrc%2Fmain%2Fres%2Flayout%2Factivity_main.xml

@Farzadpro
Copy link
Author

many thanks,
And How to make it RTL ? (Right menu opening with right swipe)
Is there any function for opening and closing the menu?

@Farzadpro
Copy link
Author

and a bad problem is that , if i wanna use a menu item, for example i write :
ImageView.setOnClickListener
then the new position of that object is not recognized, the position is at the top left, not the changed new position of menu item. So menu cant be used!

Can u please check & solve it please?

@kyze8439690 kyze8439690 reopened this Jul 17, 2015
@kyze8439690
Copy link
Owner

RTL haven't been supported yet, issue has created. #5

@kyze8439690
Copy link
Owner

I will update the demo to try to make a menu there.

kyze8439690 added a commit that referenced this issue Jul 17, 2015
@Farzadpro
Copy link
Author

Thanks for solving this bro, perfect.

And the last question that is Hurting me, How can i put for example a linearlayout in my main relativelayout?
for example when i put a textview or linearlayout under it, it doesn't work and i see this error in logcat:

Unable to start activity ComponentInfo{pro.farzad.resider/me.yugy.github.residelayout.MainActivity}: java.lang.RuntimeException: Binary XML file line #28: You must supply a layout_width attribute.

I want to delete balloons photo and pager and use a button, textview and else ...
but i can't (eclipse doesn't show them when i put any ting under the relativelayout! it hides them!)

it will be so good if u tell me what to do now.
thanks again.
regards.

@kyze8439690
Copy link
Owner

Here is my tested layout, run with no problem.

<me.yugy.github.residelayout.ResideLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:id="@+id/reside_layout"
    >

    <FrameLayout android:layout_width="match_parent"
                 android:layout_height="match_parent">

        <ImageView
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:src="@drawable/stars"
            android:scaleType="centerCrop"/>

        <ListView
            android:id="@+id/menu"
            android:layout_width="match_parent"
            android:layout_height="match_parent"/>

    </FrameLayout>

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <TextView
            android:id="@+id/text"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:text="1234567890"
            android:gravity="center"
            android:background="@android:color/white"
            />

    </RelativeLayout>

</me.yugy.github.residelayout.ResideLayout>

@Farzadpro
Copy link
Author

tnx, nice,

now a simple problem is that if clicking the top of the window, the menus getting clicked and showing toast! :D

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