建设电商网站需要什么硬件,全国企业网查询信息官网,100个科技小制作,wordpress更换主题内容无法显示android-satellite-menu实现点击主按钮#xff0c;会弹出多个围绕着主按钮排列的子按钮#xff0c;从而形成一个卫星弹出式菜单。子按钮弹出和消失的动画效果都很棒。这种弹出式菜单按钮应用在Path2.0中。用法在你的view xml中添加组件定义#xff0c;如下示例#xff1a;x…android-satellite-menu实现点击主按钮会弹出多个围绕着主按钮排列的子按钮从而形成一个卫星弹出式菜单。子按钮弹出和消失的动画效果都很棒。这种弹出式菜单按钮应用在Path2.0中。用法在你的view xml中添加组件定义如下示例xmlns:androidhttp://schemas.android.com/apk/res/androidxmlns:sathttp://schemas.android.com/apk/res/android.view.extandroid:layout_widthfill_parentandroid:layout_heightfill_parentandroid:orientationvertical android:idid/menuandroid:layout_widthwrap_contentandroid:layout_heightwrap_contentandroid:layout_gravitybottom|leftandroid:layout_margin8dpsat:satelliteDistance170dpsat:mainImagedrawable/ic_launchersat:totalSpacingDegree90sat:closeOnClicktruesat:expandDuration500/属性有satelliteDistance The distance of items from the center buttontotalSpacingDegree The degree between the first and the last item.closeOnClick Defines if the menu shall collapse after clicking on a menu item.expandDuration The duration of expand and collapse operations in milliseconds.当在你的View XML定义之后可按以下代码添加子菜单SatelliteMenu menu (SatelliteMenu) findViewById(R.id.menu);List items new ArrayList();items.add(new SatelliteMenuItem(4, R.drawable.ic_1));items.add(new SatelliteMenuItem(4, R.drawable.ic_3));items.add(new SatelliteMenuItem(4, R.drawable.ic_4));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));Each menu item takes the ID of the item and the drawable resource for the item.In order to listen clicks on items:menu.setOnItemClickedListener(new SateliteClickedListener() {public void eventOccured(int id) {Log.i(sat, Clicked on id);}});项目主页http://www.open-open.com/lib/view/home/1390737573132