I need a arc menu like above image but it is not scrolling. I need that i can add more menus and it should come from bottom while scrolling.And these menu will come after a tap on center button. Please help me.
I have a SemiCircularRadialMenu and there are individual fragments for every menu. I am opening fragments on clicking different menu but when I click on fragment, it also covers that SemiCircularRadialMenu. I want that when I click on the fragment, there should be no effect on SemiCircularRadialMenu.
My XML Code is given below (XML)
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<FrameLayout
android:id="#+id/frame"
android:layout_width="match_parent"
android:layout_height="match_parent" >
</FrameLayout>
<com.touchmenotapps.widget.radialmenu.semicircularmenu.SemiCircularRadialMenu
android:id="#+id/radial_menu"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom|center"
android:padding="5dp" />
Code link for Semi Circular menu http://hasmukhbhadani.blogspot.in/2014/04/radial-menu-semi-circular-radial-menu.html (CIRCULAR OUTPUT SCREEN: is Semi Circular menu )
Related
I'm working on an android app and am using a toolbar at the top of the screen and a navigation bar at the bottom of the screen. I'm using a single activity to create the top and bottom toolbars and fragments to change the content between the toolbars. However, when the contents in the fragment go beyond the size of the screen, the bottom bar disappears.
Here is my home activity xml:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="#+id/activity_home"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.rentables.testcenter.HomeActivity">
<include
android:id="#+id/toolbar_main"
layout="#layout/toolbar_main"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<fragment android:name="com.rentables.testcenter.HomeFragment"
android:id="#+id/fragment_place"
android:layout_weight="0"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:layout="#layout/fragment_home" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:gravity="bottom">
<include
android:id="#+id/toolbar_navigate"
layout="#layout/toolbar_navigate"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center|bottom"/>
</LinearLayout>
</LinearLayout>
Im guessing it's because of the inner linear layout I have, but I wasn't sure how else to get the nav bar to stay static at the bottom. Any help would be awesome. Thanks
Figured it out. I just changed the whole thing to a relative layout, got rid of the inner linear layout, and instead of gravity I used alignParentBottom="true".
Sorry I couldn't figure out a better title.
I have an XML with a DrawerLayout like this:
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- Frame layout for fragment -->
<FrameLayout
android:layout_height="match_parent"
android:layout_width="match_parent"
android:id="#+id/Fragment_Container" />
<!-- Need a button visible here that moves left and right with the drawer -->
<!-- This is a right side drawer-->
<LinearLayout
android:orientation="vertical"
android:layout_gravity="right"
android:gravity="center_vertical"
android:layout_width="101dp"
android:layout_height="match_parent">
</LinearLayout>
</android.support.v4.widget.DrawerLayout>
I'd like to have a button that's visible at all times on the screen, that when clicked opens/closes the DrawerLayout, so it should move in sync with the drawer.
I've tried putting it inside the drawer and offsetting it to the left, but it just stays a part of it's content.
The only other options I'm considering now is making it detect drawer movement and make it manually slide accordingly.
Bonus issue: It should be shown on top of the fragment i.e it should have higher z-index than the fragment loaded.
Thanks
I am planning to use Sliding Panel Layout for one of my App. In master pane there is an image and in detail pane a list view is used. Issue is when detail pane (Listview) is opened (left to right) master pane (image) is also moved towards left. I need master pane should not be moved when sliding panel is opened. You my refer attached screen to understand this.
<android.support.v4.widget.SlidingPaneLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="#+id/SlidingPanel"
android:layout_width="match_parent"
android:layoutDirection="rtl"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="240dp"
android:layout_height="match_parent"
android:layout_gravity="right">
<ListView
android:id="#+id/MenuList"
android:layout_width="match_parent"
android:layout_height="match_parent" >
</ListView>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="left"
android:background="#101010"
android:orientation="vertical" >
<ImageView
android:id="#+id/image_robot"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#drawable/android_robot" />
</LinearLayout>
</android.support.v4.widget.SlidingPaneLayout>
Firstly sliding of a menu is not depend on XML file. You should check your Class of Main activity. As reference visit here http://www.androidhive.info/2013/11/android-sliding-menu-using-navigation-drawer/
I want to implement an Android app which measures someone's performances in sport activities.
The problem which I have is that I must implement a sliding menu from the left side of the screen, where one can change the account on which the performances must be registered.
I don't know how to make the part which is show in this picture.
One can add a new user by clicking on add new user button, can edit the account by clicking on the pen, and switch to other account by clicking on it when it is inactive.
I've searched for info about how to do this but I didn't find anything related to this.
This is how my app must look:
Does anyone have an idea about how to do this or something similar to my issue?
You have to Go for Sliding menu lib.
you can use android DrawerLayout.
Please take look.
There is Suggestion of design for NavigationDrawer..............
This could help you to Create Layout like that...
First Create Navigation Drawer form Here : Creating a Navigation Drawer
and then change some code in Drawelayout.xml(which contains nav. drawer)
navDrawer.xml
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res/com.equest.cwely.act"
android:id="#+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<!-- The main content view -->
<FrameLayout
android:id="#+id/content_frame"
android:layout_width="match_parent"
android:layout_height="match_parent" >
</FrameLayout>
<!-- The navigation drawer -->
<LinearLayout
android:id="#+id/drawer"
android:layout_width="300dp"
android:layout_height="match_parent"
android:layout_gravity="start"
android:background="#color/actionbar_bg"
android:orientation="vertical" >
<include
android:id="#+id/nav_list_header"
layout="#layout/nav_profile" />
<ListView
android:id="#+id/drawer_list"
android:layout_width="300dp"
android:layout_height="match_parent"
android:layout_gravity="start"
android:layout_marginTop="10dp"
android:choiceMode="singleChoice"
android:divider="#55ffffff"
android:dividerHeight="0.5dp"
android:listSelector="#drawable/list_selector" />
</LinearLayout>
</android.support.v4.widget.DrawerLayout>
Here,
<include/> : I have created one layout and added it into navDrawerLayout file...
<ListView/> : second Layout...........
I have full screen RelativeLayout that contains the following:
1. FrameLayout, full screen, displaying content.
2. LinearLayout, act as a control menu, stay on top of the content #1, must be able to slide or fade in/out on request(I actually have two of these. One at the top of the screen, another at the bottom).
I have the view display correctly, the menu controller slide/fade in and out when menu button pressed. But when I slide and fade the view out, the click action remain. How do I remove this action?
I tried to call menuLayout.setVisibility(View.GONE); but the action remains.
I read some issue with TranslateAnimation but I cannot get it to work.
Can someone tell me how do I fix this? Example would be appreciated.
XML:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#99000000"
android:layout_alignParentLeft="true"
android:gravity="center_vertical"
android:id="#+id/contentFrame"
>
<ViewSwitcher
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="#+id/viewSwitch">
<include layout="#layout/main_car" />
</ViewSwitcher>
</FrameLayout>
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="43dp"
android:background="#drawable/um_top_bar"
android:layout_alignParentTop="true"
android:id="#+id/topMenu"
android:gravity="top"
>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/um_btn_home"
android:id="#+id/homeMainBtn" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/exp_menu_btn"
android:id="#+id/menuMainBtn" />
</LinearLayout>
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#FF000000"
android:layout_alignParentBottom="true"
android:id="#+id/bottomMenu"
android:gravity="top"
>
<include layout="#layout/menu_bottom" />
</LinearLayout>
Ok, I got it to work at last. For anyone who may face the same problem, here's what I did.
I place empty layer and separate all menu content into separate XML file.
Here's the code:
/** Resetting bottom menu content */
private void resetBottomMenu(boolean isOpen){
bottomMenu.removeAllViews();
bottomMenu.addView(loadBottomMenu(isOpen));
// Control event handler goes here.
}
/** Load bottom menu content from XML */
private LinearLayout loadBottomMenu(boolean isOpen){
LinearLayout result = null;
if(isOpen){
result = (LinearLayout)View.inflate(this.getApplicationContext(), R.layout.menu_bottom_open, null);
}else{
result = (LinearLayout)View.inflate(this.getApplicationContext(), R.layout.menu_bottom, null);
}
return result;
}
Every time I want to slide menu in, I called resetBottomMenu then start animation on bottomMenu. If I want to close the menu, I start animation then resetBottomMenu.
It's important to remove child view in that Layout since that will remove the click action.
P.S. I'm not sure if this is the best way of doing it but I can confirm that it works. I have three menu that need to be fade/slide and they work perfectly now :)