Question

Here My satellteMenu Xml code

<android.view.ext.SatelliteMenu
    android:id="@+id/menu"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentRight="true"

    sat:closeOnClick="true"
    sat:expandDuration="500"
    sat:mainImage="@drawable/ic_launcher"
    sat:satelliteDistance="170dp"
    sat:totalSpacingDegree="90" >
</android.view.ext.SatelliteMenu>

Here My java code

   SatelliteMenu menu = (SatelliteMenu) findViewById(R.id.menu);

     / /          Set from XML, possible to programmatically set        
        float distance = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 200, getResources().getDisplayMetrics());

   SatelliteMenuItem a1=new SatelliteMenuItem(4, R.drawable.ic_4);

    List<SatelliteMenuItem> items = new ArrayList<SatelliteMenuItem>();
  //  items.add(new SatelliteMenuItem(4, R.drawable.ic_1));
   // items.add(new SatelliteMenuItem(4, R.drawable.ic_3));
    items.add(a1);
    items.add(new SatelliteMenuItem(3, R.drawable.ic_5));
    items.add(new SatelliteMenuItem(2, R.drawable.ic_6));
   items.add(new SatelliteMenuItem(1, R.drawable.ic_2));
   //items.add(new SatelliteAnimationCreator());
    menu.addItems(items);        

MY output screen coming like this

enter image description here

Now I want to set Main button on the center of the screen and all Menu Item coming on the rounded of the Main button

How I can set rounded menu item at center ?

Was it helpful?

Solution

hey please try with android:layout_gravity="bottom|center_horizontal" in yours satellite Menu Xml code and also visit

https://github.com/ketanpatel25/android-satellite-menu-center

https://github.com/siyamed/android-satellite-menu hope these links will help you on this issue!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top