├── .gitignore ├── README.md ├── addpopmenu ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── lrq │ │ └── com │ │ └── addpopmenu │ │ └── ExampleInstrumentedTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── lrq │ │ │ └── com │ │ │ └── addpopmenu │ │ │ ├── PopMenu.java │ │ │ ├── PopMenuItem.java │ │ │ ├── PopMenuItemListener.java │ │ │ └── PopSubView.java │ └── res │ │ ├── drawable-xhdpi │ │ └── tabbar_compose_background_icon_close.png │ │ ├── drawable-xxhdpi │ │ └── tabbar_compose_background_icon_close.png │ │ └── values │ │ └── strings.xml │ └── test │ └── java │ └── lrq │ └── com │ └── addpopmenu │ └── ExampleUnitTest.java ├── app ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── example │ │ └── administrator │ │ └── weibopopupmenu │ │ └── ExampleInstrumentedTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── example │ │ │ └── administrator │ │ │ └── weibopopupmenu │ │ │ └── MainActivity.java │ └── res │ │ ├── drawable-xhdpi │ │ ├── tabbar_compose_background_icon_close.png │ │ ├── tabbar_compose_button.9.png │ │ ├── tabbar_compose_headlines.png │ │ ├── tabbar_compose_icon_add.png │ │ ├── tabbar_compose_idea.png │ │ ├── tabbar_compose_lbs.png │ │ ├── tabbar_compose_more.png │ │ ├── tabbar_compose_photo.png │ │ └── tabbar_compose_review.png │ │ ├── drawable-xxhdpi │ │ ├── tabbar_compose_background_icon_close.png │ │ ├── tabbar_compose_button.9.png │ │ ├── tabbar_compose_headlines.png │ │ ├── tabbar_compose_icon_add.png │ │ ├── tabbar_compose_idea.png │ │ ├── tabbar_compose_lbs.png │ │ ├── tabbar_compose_more.png │ │ ├── tabbar_compose_photo.png │ │ └── tabbar_compose_review.png │ │ ├── layout │ │ └── activity_main.xml │ │ ├── mipmap-hdpi │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxxhdpi │ │ └── ic_launcher.png │ │ ├── values-w820dp │ │ └── dimens.xml │ │ └── values │ │ ├── colors.xml │ │ ├── dimens.xml │ │ ├── strings.xml │ │ └── styles.xml │ └── test │ └── java │ └── com │ └── example │ └── administrator │ └── weibopopupmenu │ └── ExampleUnitTest.java ├── binary.gradle ├── build.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── screenshoot ├── Screenshot_2016-12-10-20-00-44-686_com.example.ad.png └── Screenshot_2016-12-10-20-00-50-299_com.example.ad.png └── settings.gradle /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | .externalNativeBuild 10 | /.idea 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 仿微博添加按钮弹出菜单 2 | [ ![Download](https://api.bintray.com/packages/joelan/maven/WeiboPopupMenu/images/download.svg) ](https://bintray.com/joelan/maven/WeiboPopupMenu/_latestVersion) 3 | 4 | ![image](https://github.com/joelan/WeiboPopupMenu/raw/master/screenshoot/Screenshot_2016-12-10-20-00-44-686_com.example.ad.png) 5 | ![image](https://github.com/joelan/WeiboPopupMenu/raw/master/screenshoot/Screenshot_2016-12-10-20-00-50-299_com.example.ad.png) 6 | 7 | ## 版本更新须知(1.0.5) 8 | 增加MenuItem的获取,预设的的个别几项属性设置settter和getter 9 | ## 版本更新(1.0.7) 10 | 增加菜单被关闭监听 11 | 12 | ## 1.依赖 13 | ### 依赖库分发在Jcenter。 14 | ```groovy 15 | 16 | dependencies { 17 | compile 'com.lrq.menu:addpopmenu:latestVersion' 18 | } 19 | 20 | ``` 21 | ## 2.使用 22 | 在对应要弹出的按钮事件上加上这段代码 23 | ```java 24 | 25 | mPopMenu = new PopMenu.Builder().attachToActivity(MainActivity.this) 26 | .addMenuItem(new PopMenuItem("广场", getResources().getDrawable(R.drawable.tabbar_compose_idea))) 27 | .addMenuItem(new PopMenuItem("私密", getResources().getDrawable(R.drawable.tabbar_compose_photo))) 28 | .addMenuItem(new PopMenuItem("家庭圈", getResources().getDrawable(R.drawable.tabbar_compose_headlines))) 29 | 30 | .setOnItemClickListener(new PopMenuItemListener() { 31 | @Override 32 | public void onItemClick(PopMenu popMenu, int position) { 33 | 34 | 35 | Toast.makeText(MainActivity.this, "你点击了第" + position + "个位置", Toast.LENGTH_SHORT).show(); 36 | 37 | 38 | } 39 | }) 40 | .build(); 41 | mPopMenu.show(); 42 | 43 | ``` 44 | ## 3.自定义 45 | 46 | ### (1)在PopMenu以下属性的set方法都可以自定义相对应的自定义功能(调用.build()后调用,show()调用之前) 47 | 48 | ```java 49 |   /** 50 | * 关闭按钮距离屏幕底部位置单位dp 51 | */ 52 | private int mCloseMenuMarginbottom=15; 53 | 54 | /** 55 | * 背景颜色 56 | */ 57 | private int mBackGroundColor=Color.parseColor("#f0f3f3f3"); 58 | 59 | /** 60 | * 关闭按钮的图片 61 | */ 62 | private int mCloseButtomResourceid=R.drawable.tabbar_compose_background_icon_close; 63 | 64 | /** 65 |     * Menu相对于屏幕顶部的距离的的倍数因子(屏幕高度减去菜单本身高度剩下部分除以这个倍数因子) 66 | */ 67 | 68 | private float mMarginTopRemainSpace=1.5f; 69 | 70 | /** 71 | * 是否错位弹出菜单 72 | */ 73 | private boolean mIsmalpositionAnimatOut=true; 74 | 75 | /** 76 | * 错位动画时间(毫秒)默认50 77 | */ 78 | private int malposition=50; 79 | 80 | ``` 81 | 82 | ### (2)在PopMenu以下属性的set方法都可以自定义相对应的自定义功能(调用.build()前调用) 83 | 84 | ```java 85 | /** 86 |     * 一行多少列,默认三列 87 |    * 88 | */ 89 | public Builder columnCount(int count) { 90 | this.columnCount = count; 91 | return this; 92 | } 93 | 94 | /** 95 |     *添加菜单项 96 |    * 97 |     */ 98 | public Builder addMenuItem(PopMenuItem menuItem) { 99 | this.itemList.add(menuItem); 100 | return this; 101 | } 102 | /** 103 |     * 动画执行时间,默认300毫秒 104 |    * 105 | */ 106 | public Builder duration(int duration) { 107 | this.duration = duration; 108 | return this; 109 | } 110 | /** 111 |     * 拉力系数,默认10 112 |     * 113 | */ 114 | public Builder tension(double tension) { 115 | this.tension = tension; 116 | return this; 117 | } 118 | 119 | /** 120 |     * 摩擦力系数默认5 121 |    * 122 | */ 123 | public Builder friction(double friction) { 124 | this.friction = friction; 125 | return this; 126 | } 127 | /** 128 | * item水平之间的间距 129 | */ 130 | public Builder horizontalPadding(int padding) { 131 | this.horizontalPadding = padding; 132 | return this; 133 | } 134 | /** 135 | * item竖直之间的间距 136 | */ 137 | public Builder verticalPadding(int padding) { 138 | this.verticalPadding = padding; 139 | return this; 140 | } 141 | /** 142 |     * item点击监听器 143 |     */ 144 | public Builder setOnItemClickListener(PopMenuItemListener listener) { 145 | this.popMenuItemListener = listener; 146 | return this; 147 | } 148 | 149 | ``` 150 | 151 | -------------------------------------------------------------------------------- /addpopmenu/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /addpopmenu/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | android { 4 | compileSdkVersion 23 5 | buildToolsVersion "23.0.2" 6 | 7 | defaultConfig { 8 | minSdkVersion 14 9 | targetSdkVersion 23 10 | versionCode 1 11 | versionName "1.0" 12 | 13 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 14 | 15 | } 16 | buildTypes { 17 | release { 18 | minifyEnabled false 19 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 20 | } 21 | } 22 | } 23 | 24 | 25 | version = "1.0.7" 26 | group='com.joe.animationtool' 27 | tasks.withType(JavaCompile) { 28 | options.encoding = "UTF-8" 29 | } 30 | 31 | dependencies { 32 | compile fileTree(dir: 'libs', include: ['*.jar']) 33 | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 34 | exclude group: 'com.android.support', module: 'support-annotations' 35 | }) 36 | compile 'com.android.support:appcompat-v7:23.2.1' 37 | compile 'com.android.support:design:23.+' 38 | compile 'com.facebook.rebound:rebound:0.3.8' 39 | compile 'com.android.support:gridlayout-v7:23.2.1' 40 | testCompile 'junit:junit:4.12' 41 | } 42 | apply from: '../binary.gradle' 43 | -------------------------------------------------------------------------------- /addpopmenu/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in D:\sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /addpopmenu/src/androidTest/java/lrq/com/addpopmenu/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package lrq.com.addpopmenu; 2 | 3 | import android.content.Context; 4 | import android.support.test.InstrumentationRegistry; 5 | import android.support.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumentation test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() throws Exception { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("lrq.com.addpopmenu.test", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /addpopmenu/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /addpopmenu/src/main/java/lrq/com/addpopmenu/PopMenu.java: -------------------------------------------------------------------------------- 1 | package lrq.com.addpopmenu; 2 | 3 | import android.animation.Animator; 4 | import android.animation.AnimatorListenerAdapter; 5 | import android.app.Activity; 6 | import android.content.Context; 7 | import android.content.res.Resources; 8 | import android.graphics.Color; 9 | import android.os.Build; 10 | import android.os.Handler; 11 | import android.util.DisplayMetrics; 12 | import android.util.TypedValue; 13 | import android.view.Display; 14 | import android.view.View; 15 | import android.view.ViewGroup; 16 | import android.view.WindowManager; 17 | import android.widget.GridLayout; 18 | import android.widget.ImageView; 19 | import android.widget.RelativeLayout; 20 | 21 | import com.facebook.rebound.SimpleSpringListener; 22 | import com.facebook.rebound.Spring; 23 | import com.facebook.rebound.SpringConfig; 24 | import com.facebook.rebound.SpringSystem; 25 | 26 | import java.lang.reflect.Method; 27 | import java.util.ArrayList; 28 | import java.util.List; 29 | 30 | /** 31 | * 弹出菜单 32 | * Created by Joe on 16/12/10 33 | */ 34 | public class PopMenu { 35 | 36 | 37 | /** 38 | * 默认的列数为4个 39 | */ 40 | private static final int DEFAULT_COLUMN_COUNT = 3; 41 | 42 | /** 43 | * 动画时间 44 | */ 45 | private static final int DEFAULT_DURATION = 300; 46 | 47 | /** 48 | * 拉力系数 49 | */ 50 | private static final int DEFAULT_TENSION = 10; 51 | /** 52 | * 摩擦力系数 53 | */ 54 | private static final int DEFAULT_FRICTION = 5; 55 | 56 | /** 57 | * item水平之间的间距 58 | */ 59 | private static final int DEFAULT_HORIZONTAL_PADDING = 40; 60 | /** 61 | * item竖直之间的间距 62 | */ 63 | private static final int DEFAULT_VERTICAL_PADDING = 15; 64 | 65 | 66 | /** 67 | * 文字大小 68 | */ 69 | private int textsize = -1; 70 | 71 | /** 72 | * 文字颜色 资源R.Color.颜色值 73 | */ 74 | private int textcolor = -1; 75 | 76 | public static int getDefaultColumnCount() { 77 | return DEFAULT_COLUMN_COUNT; 78 | } 79 | 80 | public int getTextsize() { 81 | return textsize; 82 | } 83 | 84 | public void setTextsize(int textsize) { 85 | this.textsize = textsize; 86 | } 87 | 88 | public int getTextcolor() { 89 | return textcolor; 90 | } 91 | 92 | public void setTextcolor(int textcolor) { 93 | this.textcolor = textcolor; 94 | } 95 | 96 | OnMenuCloseListener onMenuCloseListener; 97 | 98 | public void setOnMenuCloseListener(OnMenuCloseListener onMenuCloseListener) { 99 | this.onMenuCloseListener = onMenuCloseListener; 100 | } 101 | 102 | private Activity mActivity; 103 | private int mColumnCount; 104 | private List mMenuItems = new ArrayList<>(); 105 | private RelativeLayout mAnimateLayout; 106 | private GridLayout mGridLayout; 107 | private ImageView mCloseIv; 108 | private int mDuration; 109 | private double mTension; 110 | private double mFriction; 111 | private int mHorizontalPadding; 112 | private int mVerticalPadding; 113 | private PopMenuItemListener mPopMenuItemListener; 114 | private boolean isclosevisible = true; 115 | 116 | public boolean isclosevisible() { 117 | return isclosevisible; 118 | } 119 | 120 | public void setIsclosevisible(boolean isclosevisible) { 121 | this.isclosevisible = isclosevisible; 122 | } 123 | 124 | private int mScreenWidth; 125 | private int mScreenHeight; 126 | 127 | 128 | /** 129 | * 返回相应的menuitem 130 | * @param i 131 | * @return 132 | */ 133 | public PopSubView getMenuItem(int i) { 134 | PopSubView subView = null; 135 | try { 136 | subView = (PopSubView) mGridLayout.getChildAt(i); 137 | } catch (Throwable e) { 138 | 139 | 140 | } 141 | 142 | if (subView != null) 143 | return subView; 144 | else 145 | return null; 146 | 147 | } 148 | 149 | 150 | public int getmBackGroundColor() { 151 | return mBackGroundColor; 152 | } 153 | 154 | public void setmBackGroundColor(int mBackGroundColor) { 155 | this.mBackGroundColor = mBackGroundColor; 156 | } 157 | 158 | /** 159 | * 透明背景 160 | */ 161 | public void setmBackGroundTrasnparent() { 162 | 163 | this.mBackGroundColor = Color.parseColor("#00ffffff"); 164 | } 165 | 166 | 167 | public int getmCloseButtomResourceid() { 168 | return mCloseButtomResourceid; 169 | } 170 | 171 | public void setmCloseButtomResourceid(int mCloseButtomResourceid) { 172 | this.mCloseButtomResourceid = mCloseButtomResourceid; 173 | } 174 | 175 | public int getCloseMenuMarginbottom() { 176 | return mCloseMenuMarginbottom; 177 | } 178 | 179 | public void setCloseMenuMarginbottom(int mCloseMenuMarginbottom) { 180 | this.mCloseMenuMarginbottom = mCloseMenuMarginbottom; 181 | } 182 | 183 | /** 184 | * 关闭按钮距离屏幕底部位置单位dp 185 | */ 186 | private int mCloseMenuMarginbottom = 15; 187 | 188 | /** 189 | * 背景颜色 190 | */ 191 | private int mBackGroundColor = Color.parseColor("#f0f3f3f3"); 192 | 193 | /** 194 | * 关闭按钮的图片 195 | */ 196 | private int mCloseButtomResourceid = R.drawable.tabbar_compose_background_icon_close; 197 | 198 | /** 199 | * Menu相对于屏幕顶部的距离(去掉菜单本身高度剩下部分除以这个倍数因子) 200 | */ 201 | 202 | private float mMarginTopRemainSpace = 1.5f; 203 | 204 | /** 205 | * 是否错位弹出菜单 206 | */ 207 | private boolean mIsmalpositionAnimatOut = true; 208 | 209 | /** 210 | * 错位动画时间(毫秒)默认50 211 | */ 212 | private int malposition = 50; 213 | 214 | 215 | private boolean isShowing = false; 216 | 217 | public float getmMarginTopRemainSpace() { 218 | return mMarginTopRemainSpace; 219 | } 220 | 221 | public void setmMarginTopRemainSpace(float mMarginTopRemainSpace) { 222 | this.mMarginTopRemainSpace = mMarginTopRemainSpace; 223 | } 224 | 225 | public boolean ismIsmalpositionAnimatOut() { 226 | return mIsmalpositionAnimatOut; 227 | } 228 | 229 | public void setmIsmalpositionAnimatOut(boolean mIsmalpositionAnimatOut) { 230 | this.mIsmalpositionAnimatOut = mIsmalpositionAnimatOut; 231 | } 232 | 233 | 234 | public int getMalposition() { 235 | return malposition; 236 | } 237 | 238 | public void setMalposition(int malposition) { 239 | this.malposition = malposition; 240 | } 241 | 242 | private SpringSystem mSpringSystem; 243 | 244 | { 245 | mSpringSystem = SpringSystem.create(); 246 | } 247 | 248 | private PopMenu(Builder builder) { 249 | this.mActivity = builder.activity; 250 | this.mMenuItems.clear(); 251 | this.mMenuItems.addAll(builder.itemList); 252 | 253 | this.mColumnCount = builder.columnCount; 254 | this.mDuration = builder.duration; 255 | this.mTension = builder.tension; 256 | this.mFriction = builder.friction; 257 | this.mHorizontalPadding = builder.horizontalPadding; 258 | this.mVerticalPadding = builder.verticalPadding; 259 | this.mPopMenuItemListener = builder.popMenuItemListener; 260 | 261 | mScreenWidth = mActivity.getResources().getDisplayMetrics().widthPixels; 262 | mScreenHeight = mActivity.getResources().getDisplayMetrics().heightPixels; 263 | } 264 | 265 | /** 266 | * 显示菜单 267 | */ 268 | public void show() { 269 | buildAnimateGridLayout(); 270 | 271 | if (mAnimateLayout.getParent() != null) { 272 | ViewGroup viewGroup = (ViewGroup) mAnimateLayout.getParent(); 273 | viewGroup.removeView(mAnimateLayout); 274 | } 275 | 276 | ViewGroup decorView = (ViewGroup) mActivity.getWindow().getDecorView(); 277 | decorView.addView(mAnimateLayout); 278 | 279 | // decorView.setPadding(0,0,0,getNavigationBarHeight(mActivity)); 280 | ViewGroup.MarginLayoutParams lp = (ViewGroup.MarginLayoutParams) mAnimateLayout.getLayoutParams(); 281 | lp.setMargins(0, 0, 0, getNavigationBarHeight(mActivity)); 282 | mAnimateLayout.setLayoutParams(lp); 283 | 284 | //执行显示动画 285 | showSubMenus(mGridLayout); 286 | 287 | isShowing = true; 288 | } 289 | 290 | /** 291 | * 隐藏菜单 292 | */ 293 | public void hide() { 294 | //先执行消失的动画 295 | if (isShowing && mGridLayout != null) { 296 | hideSubMenus(mGridLayout, new AnimatorListenerAdapter() { 297 | @Override 298 | public void onAnimationEnd(Animator animation) { 299 | ViewGroup decorView = (ViewGroup) mActivity.getWindow().getDecorView(); 300 | decorView.removeView(mAnimateLayout); 301 | if(onMenuCloseListener!=null) 302 | { 303 | onMenuCloseListener.onClose(mGridLayout); 304 | } 305 | } 306 | }); 307 | isShowing = false; 308 | } 309 | } 310 | 311 | public boolean isShowing() { 312 | return isShowing; 313 | } 314 | 315 | /** 316 | * 构建动画布局 317 | */ 318 | private void buildAnimateGridLayout() { 319 | mAnimateLayout = new RelativeLayout(mActivity); 320 | 321 | 322 | mAnimateLayout.setOnClickListener(new View.OnClickListener() { 323 | @Override 324 | public void onClick(View v) { 325 | hide(); 326 | } 327 | }); 328 | 329 | mGridLayout = new GridLayout(mActivity); 330 | mGridLayout.setColumnCount(mColumnCount); 331 | mGridLayout.setBackgroundColor(mBackGroundColor); 332 | int hPadding = dp2px(mActivity, mHorizontalPadding); 333 | int vPadding = dp2px(mActivity, mVerticalPadding); 334 | int itemWidth = (mScreenWidth - (mColumnCount + 1) * hPadding) / mColumnCount; 335 | 336 | int rowCount = mMenuItems.size() % mColumnCount == 0 ? mMenuItems.size() / mColumnCount : 337 | mMenuItems.size() / mColumnCount + 1; 338 | 339 | int topMargin = (int) ((mScreenHeight - (itemWidth + vPadding) * rowCount + vPadding) / mMarginTopRemainSpace); 340 | 341 | for (int i = 0; i < mMenuItems.size(); i++) { 342 | final int position = i; 343 | PopSubView subView = new PopSubView(mActivity); 344 | if (textcolor != -1) { 345 | subView.getTextView().setTextColor(mActivity.getResources().getColor(textcolor)); 346 | 347 | } 348 | if (textsize != -1) { 349 | subView.getTextView().setTextSize(textsize); 350 | 351 | } 352 | PopMenuItem menuItem = mMenuItems.get(i); 353 | subView.setPopMenuItem(menuItem); 354 | subView.setOnClickListener(new View.OnClickListener() { 355 | @Override 356 | public void onClick(View v) { 357 | if (mPopMenuItemListener != null) { 358 | mPopMenuItemListener.onItemClick(PopMenu.this, position); 359 | } 360 | hide(); 361 | } 362 | }); 363 | 364 | GridLayout.LayoutParams lp = new GridLayout.LayoutParams(); 365 | lp.width = itemWidth; 366 | lp.leftMargin = hPadding; 367 | 368 | if (i / mColumnCount == 0) { 369 | lp.topMargin = topMargin; 370 | } else { 371 | lp.topMargin = vPadding; 372 | } 373 | mGridLayout.addView(subView, lp); 374 | } 375 | 376 | 377 | RelativeLayout.LayoutParams layoutParams2 = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, 378 | ViewGroup.LayoutParams.MATCH_PARENT); 379 | layoutParams2.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM); 380 | layoutParams2.addRule(RelativeLayout.CENTER_HORIZONTAL); 381 | 382 | mAnimateLayout.addView(mGridLayout, layoutParams2); 383 | 384 | 385 | mCloseIv = new ImageView(mActivity); 386 | mCloseIv.setScaleType(ImageView.ScaleType.CENTER_INSIDE); 387 | mCloseIv.setImageResource(mCloseButtomResourceid); 388 | mCloseIv.setOnClickListener(new View.OnClickListener() { 389 | @Override 390 | public void onClick(View v) { 391 | hide(); 392 | } 393 | }); 394 | if (isclosevisible) { 395 | mCloseIv.setVisibility(View.VISIBLE); 396 | } else { 397 | mCloseIv.setVisibility(View.GONE); 398 | } 399 | 400 | RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, 401 | ViewGroup.LayoutParams.WRAP_CONTENT); 402 | layoutParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM); 403 | layoutParams.addRule(RelativeLayout.CENTER_HORIZONTAL); 404 | layoutParams.bottomMargin = dp2px(mActivity, mCloseMenuMarginbottom); 405 | mAnimateLayout.addView(mCloseIv, layoutParams); 406 | } 407 | 408 | /** 409 | * show sub menus with animates 410 | * 411 | * @param viewGroup 412 | */ 413 | private void showSubMenus(ViewGroup viewGroup) { 414 | if (viewGroup == null) return; 415 | int childCount = viewGroup.getChildCount(); 416 | 417 | for (int i = 0; i < childCount; i++) { 418 | final View view = viewGroup.getChildAt(i); 419 | view.setVisibility(View.INVISIBLE); 420 | 421 | animationAction(i, view); 422 | 423 | } 424 | } 425 | 426 | /** 427 | * 动画动作 428 | * 429 | * @param i 430 | * @param view 431 | */ 432 | private void animationAction(int i, final View view) { 433 | 434 | if (mIsmalpositionAnimatOut) { 435 | new Handler().postDelayed(new Runnable() { 436 | @Override 437 | public void run() { 438 | 439 | view.setVisibility(View.VISIBLE); 440 | animateViewDirection(view, mScreenHeight, 0, mTension, mFriction); 441 | 442 | 443 | } 444 | }, i * malposition); 445 | } else { 446 | 447 | view.setVisibility(View.VISIBLE); 448 | animateViewDirection(view, mScreenHeight, 0, mTension, mFriction); 449 | 450 | } 451 | } 452 | 453 | /** 454 | * hide sub menus with animates 455 | * 456 | * @param viewGroup 457 | * @param listener 458 | */ 459 | private void hideSubMenus(ViewGroup viewGroup, final AnimatorListenerAdapter listener) { 460 | if (viewGroup == null) return; 461 | int childCount = viewGroup.getChildCount(); 462 | for (int i = 0; i < childCount; i++) { 463 | View view = viewGroup.getChildAt(i); 464 | view.animate().translationY(mScreenHeight).setDuration(mDuration).setListener(listener).start(); 465 | } 466 | } 467 | 468 | /** 469 | * 弹簧动画 470 | * 471 | * @param v 动画View 472 | * @param from 473 | * @param to 474 | * @param tension 拉力系数 475 | * @param friction 摩擦力系数 476 | */ 477 | private void animateViewDirection(final View v, float from, float to, double tension, double friction) { 478 | Spring spring = mSpringSystem.createSpring(); 479 | spring.setCurrentValue(from); 480 | spring.setSpringConfig(SpringConfig.fromOrigamiTensionAndFriction(tension, friction)); 481 | spring.addListener(new SimpleSpringListener() { 482 | @Override 483 | public void onSpringUpdate(Spring spring) { 484 | v.setTranslationY((float) spring.getCurrentValue()); 485 | } 486 | }); 487 | spring.setEndValue(to); 488 | } 489 | 490 | public static class Builder { 491 | 492 | private Activity activity; 493 | private int columnCount = DEFAULT_COLUMN_COUNT; 494 | private List itemList = new ArrayList<>(); 495 | private int duration = DEFAULT_DURATION; 496 | private double tension = DEFAULT_TENSION; 497 | private double friction = DEFAULT_FRICTION; 498 | private int horizontalPadding = DEFAULT_HORIZONTAL_PADDING; 499 | private int verticalPadding = DEFAULT_VERTICAL_PADDING; 500 | private PopMenuItemListener popMenuItemListener; 501 | 502 | public Builder attachToActivity(Activity activity) { 503 | this.activity = activity; 504 | return this; 505 | } 506 | 507 | public Builder columnCount(int count) { 508 | this.columnCount = count; 509 | return this; 510 | } 511 | 512 | public Builder addMenuItem(PopMenuItem menuItem) { 513 | this.itemList.add(menuItem); 514 | return this; 515 | } 516 | 517 | public Builder duration(int duration) { 518 | this.duration = duration; 519 | return this; 520 | } 521 | 522 | public Builder tension(double tension) { 523 | this.tension = tension; 524 | return this; 525 | } 526 | 527 | public Builder friction(double friction) { 528 | this.friction = friction; 529 | return this; 530 | } 531 | 532 | public Builder horizontalPadding(int padding) { 533 | this.horizontalPadding = padding; 534 | return this; 535 | } 536 | 537 | public Builder verticalPadding(int padding) { 538 | this.verticalPadding = padding; 539 | return this; 540 | } 541 | 542 | public Builder setOnItemClickListener(PopMenuItemListener listener) { 543 | this.popMenuItemListener = listener; 544 | return this; 545 | } 546 | 547 | public PopMenu build() { 548 | final PopMenu popMenu = new PopMenu(this); 549 | return popMenu; 550 | } 551 | } 552 | 553 | //获取是否存在NavigationBar 554 | /* public boolean checkDeviceHasNavigationBar(Context context) { 555 | boolean hasNavigationBar = false; 556 | Resources rs = context.getResources(); 557 | int id = rs.getIdentifier("config_showNavigationBar", "bool", "android"); 558 | if (id > 0) { 559 | hasNavigationBar = rs.getBoolean(id); 560 | } 561 | try { 562 | Class systemPropertiesClass = Class.forName("android.os.SystemProperties"); 563 | Method m = systemPropertiesClass.getMethod("get", String.class); 564 | String navBarOverride = (String) m.invoke(systemPropertiesClass, "qemu.hw.mainkeys"); 565 | if ("1".equals(navBarOverride)) { 566 | hasNavigationBar = false; 567 | } else if ("0".equals(navBarOverride)) { 568 | hasNavigationBar = true; 569 | } 570 | } catch (Exception e) { 571 | 572 | } 573 | return hasNavigationBar; 574 | 575 | }*/ 576 | 577 | public boolean checkDeviceHasNavigationBar(Context context) { 578 | WindowManager windowManager = ((Activity) context).getWindowManager(); 579 | 580 | DisplayMetrics dm = new DisplayMetrics(); 581 | Display display = windowManager.getDefaultDisplay(); 582 | display.getMetrics(dm); 583 | 584 | int screenHeight = dm.heightPixels; 585 | DisplayMetrics realDisplayMetrics = new DisplayMetrics(); 586 | 587 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) { 588 | display.getRealMetrics(realDisplayMetrics); 589 | } else { 590 | Class c; 591 | try { 592 | c = Class.forName("android.view.Display"); 593 | Method method = c.getMethod("getRealMetrics", DisplayMetrics.class); 594 | method.invoke(display, realDisplayMetrics); 595 | } catch (Exception e) { 596 | realDisplayMetrics.setToDefaults(); 597 | e.printStackTrace(); 598 | } 599 | } 600 | 601 | int screenRealHeight = realDisplayMetrics.heightPixels; 602 | 603 | 604 | return (screenRealHeight - screenHeight) > 0;//screenRealHeight上面方法中有计算 605 | } 606 | 607 | private int getNavigationBarHeight(Context context) { 608 | int navigationBarHeight = 0; 609 | Resources rs = context.getResources(); 610 | int id = rs.getIdentifier("navigation_bar_height", "dimen", "android"); 611 | if (id > 0 && checkDeviceHasNavigationBar(context)) { 612 | navigationBarHeight = rs.getDimensionPixelSize(id); 613 | } 614 | return navigationBarHeight; 615 | } 616 | 617 | 618 | /** 619 | * dp 2 px 620 | * 621 | * @param context 622 | * @param dpVal 623 | * @return 624 | */ 625 | protected int dp2px(Context context, int dpVal) { 626 | return (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 627 | dpVal, context.getResources().getDisplayMetrics()); 628 | } 629 | 630 | 631 | public interface OnMenuCloseListener 632 | { 633 | void onClose(View v); 634 | } 635 | } 636 | -------------------------------------------------------------------------------- /addpopmenu/src/main/java/lrq/com/addpopmenu/PopMenuItem.java: -------------------------------------------------------------------------------- 1 | package lrq.com.addpopmenu; 2 | 3 | import android.graphics.drawable.Drawable; 4 | 5 | /** 6 | * Created by Joe on 16/12/10 7 | */ 8 | public class PopMenuItem { 9 | 10 | private String title; 11 | private Drawable drawable; 12 | 13 | public PopMenuItem(String title, Drawable drawable) { 14 | this.title = title; 15 | this.drawable = drawable; 16 | } 17 | 18 | public String getTitle() { 19 | return title; 20 | } 21 | 22 | public void setTitle(String title) { 23 | this.title = title; 24 | } 25 | 26 | public Drawable getDrawable() { 27 | return drawable; 28 | } 29 | 30 | public void setDrawable(Drawable drawable) { 31 | this.drawable = drawable; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /addpopmenu/src/main/java/lrq/com/addpopmenu/PopMenuItemListener.java: -------------------------------------------------------------------------------- 1 | package lrq.com.addpopmenu; 2 | 3 | /** 4 | * Created by Joe on 16/12/10 5 | */ 6 | public interface PopMenuItemListener { 7 | /** 8 | * Item点击事件 9 | * 10 | * @param popMenu 11 | * @param position 12 | */ 13 | public void onItemClick(PopMenu popMenu, int position); 14 | } 15 | -------------------------------------------------------------------------------- /addpopmenu/src/main/java/lrq/com/addpopmenu/PopSubView.java: -------------------------------------------------------------------------------- 1 | package lrq.com.addpopmenu; 2 | 3 | import android.content.Context; 4 | import android.util.AttributeSet; 5 | import android.view.Gravity; 6 | import android.view.MotionEvent; 7 | import android.view.View; 8 | import android.view.ViewGroup; 9 | import android.widget.ImageView; 10 | import android.widget.LinearLayout; 11 | import android.widget.TextView; 12 | 13 | /** 14 | * 弹出菜单SubView 上部图片 底部文字 15 | * Created by Joe on 16/12/10 16 | */ 17 | public class PopSubView extends LinearLayout { 18 | 19 | private static final float factor = 1.2f; 20 | 21 | private ImageView icon; 22 | 23 | public ImageView getIcon() { 24 | return icon; 25 | } 26 | 27 | public void setIcon(ImageView icon) { 28 | this.icon = icon; 29 | } 30 | 31 | public TextView getTextView() { 32 | return textView; 33 | 34 | } 35 | 36 | public void setTextView(TextView textView) { 37 | this.textView = textView; 38 | } 39 | 40 | private TextView textView; 41 | 42 | public PopSubView(Context context) { 43 | this(context, null); 44 | } 45 | 46 | public PopSubView(Context context, AttributeSet attrs) { 47 | this(context, attrs, 0); 48 | } 49 | 50 | public PopSubView(Context context, AttributeSet attrs, int defStyleAttr) { 51 | super(context, attrs, defStyleAttr); 52 | init(context); 53 | } 54 | 55 | private void init(Context context) { 56 | setGravity(Gravity.CENTER); 57 | setOrientation(VERTICAL); 58 | icon = new ImageView(context); 59 | icon.setScaleType(ImageView.ScaleType.CENTER_INSIDE); 60 | addView(icon, new LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT)); 61 | 62 | textView = new TextView(context); 63 | LayoutParams tvLp = new LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT); 64 | tvLp.topMargin = 10; 65 | addView(textView, tvLp); 66 | 67 | setOnTouchListener(new OnTouchListener() { 68 | @Override 69 | public boolean onTouch(View v, MotionEvent event) { 70 | switch (event.getAction()) { 71 | case MotionEvent.ACTION_DOWN: 72 | scaleViewAnimation(PopSubView.this, factor); 73 | break; 74 | case MotionEvent.ACTION_UP: 75 | scaleViewAnimation(PopSubView.this, 1); 76 | break; 77 | } 78 | return false; 79 | } 80 | }); 81 | } 82 | 83 | /** 84 | * 赋值 85 | * 86 | * @param popMenuItem 87 | */ 88 | public void setPopMenuItem(PopMenuItem popMenuItem) { 89 | if (popMenuItem == null) return; 90 | icon.setImageDrawable(popMenuItem.getDrawable()); 91 | textView.setText(popMenuItem.getTitle()); 92 | } 93 | 94 | /** 95 | * 缩放动画 96 | * 97 | * @param value 98 | */ 99 | private void scaleViewAnimation(View view, float value) { 100 | view.animate().scaleX(value).scaleY(value).setDuration(80).start(); 101 | } 102 | } 103 | -------------------------------------------------------------------------------- /addpopmenu/src/main/res/drawable-xhdpi/tabbar_compose_background_icon_close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joelan/WeiboPopupMenu/d0464e9f4ed96ead5f1e9d8f032edbd58a5a9662/addpopmenu/src/main/res/drawable-xhdpi/tabbar_compose_background_icon_close.png -------------------------------------------------------------------------------- /addpopmenu/src/main/res/drawable-xxhdpi/tabbar_compose_background_icon_close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joelan/WeiboPopupMenu/d0464e9f4ed96ead5f1e9d8f032edbd58a5a9662/addpopmenu/src/main/res/drawable-xxhdpi/tabbar_compose_background_icon_close.png -------------------------------------------------------------------------------- /addpopmenu/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | AddPopmenu 3 | 4 | -------------------------------------------------------------------------------- /addpopmenu/src/test/java/lrq/com/addpopmenu/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package lrq.com.addpopmenu; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() throws Exception { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 23 5 | buildToolsVersion "24.0.2" 6 | defaultConfig { 7 | applicationId "com.example.administrator.weibopopupmenu" 8 | minSdkVersion 15 9 | targetSdkVersion 23 10 | versionCode 1 11 | versionName "1.0" 12 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 13 | } 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | } 21 | 22 | dependencies { 23 | compile fileTree(dir: 'libs', include: ['*.jar']) 24 | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 25 | exclude group: 'com.android.support', module: 'support-annotations' 26 | }) 27 | 28 | compile 'com.android.support:appcompat-v7:23.4.0' 29 | //compile project(':addpopmenu') 30 | compile 'com.lrq.menu:addpopmenu:1.0.4' 31 | 32 | testCompile 'junit:junit:4.12' 33 | } 34 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in D:\Software\adt-bundle-windows-x86_64-20140702new\adt-bundle-windows-x86_64-20140702new\sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /app/src/androidTest/java/com/example/administrator/weibopopupmenu/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.example.administrator.weibopopupmenu; 2 | 3 | import android.content.Context; 4 | import android.support.test.InstrumentationRegistry; 5 | import android.support.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumentation test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() throws Exception { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("com.example.administrator.weibopopupmenu", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/administrator/weibopopupmenu/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.example.administrator.weibopopupmenu; 2 | 3 | import android.content.Intent; 4 | import android.os.Bundle; 5 | import android.support.v7.app.AppCompatActivity; 6 | import android.view.View; 7 | import android.widget.Button; 8 | import android.widget.RelativeLayout; 9 | import android.widget.Toast; 10 | 11 | import lrq.com.addpopmenu.PopMenu; 12 | import lrq.com.addpopmenu.PopMenuItem; 13 | import lrq.com.addpopmenu.PopMenuItemListener; 14 | 15 | public class MainActivity extends AppCompatActivity { 16 | 17 | private Button button2; 18 | private RelativeLayout activitymain; 19 | private PopMenu mPopMenu; 20 | 21 | @Override 22 | protected void onCreate(Bundle savedInstanceState) { 23 | super.onCreate(savedInstanceState); 24 | setContentView(R.layout.activity_main); 25 | 26 | 27 | initialize(); 28 | } 29 | 30 | private void initialize() { 31 | 32 | 33 | 34 | mPopMenu = new PopMenu.Builder().attachToActivity(MainActivity.this) 35 | .addMenuItem(new PopMenuItem("广场", getResources().getDrawable(R.drawable.tabbar_compose_idea))) 36 | .addMenuItem(new PopMenuItem("私密", getResources().getDrawable(R.drawable.tabbar_compose_photo))) 37 | .addMenuItem(new PopMenuItem("家庭圈", getResources().getDrawable(R.drawable.tabbar_compose_headlines))) 38 | 39 | .setOnItemClickListener(new PopMenuItemListener() { 40 | @Override 41 | public void onItemClick(PopMenu popMenu, int position) { 42 | 43 | 44 | Toast.makeText(MainActivity.this, "你点击了第" + position + "个位置", Toast.LENGTH_SHORT).show(); 45 | 46 | 47 | } 48 | }) 49 | .build(); 50 | 51 | button2 = (Button) findViewById(R.id.button2); 52 | activitymain = (RelativeLayout) findViewById(R.id.activity_main); 53 | button2.setOnClickListener(new View.OnClickListener() { 54 | @Override 55 | public void onClick(View v) { 56 | 57 | 58 | if(mPopMenu!=null) 59 | mPopMenu.show(); 60 | 61 | 62 | } 63 | }); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/tabbar_compose_background_icon_close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joelan/WeiboPopupMenu/d0464e9f4ed96ead5f1e9d8f032edbd58a5a9662/app/src/main/res/drawable-xhdpi/tabbar_compose_background_icon_close.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/tabbar_compose_button.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joelan/WeiboPopupMenu/d0464e9f4ed96ead5f1e9d8f032edbd58a5a9662/app/src/main/res/drawable-xhdpi/tabbar_compose_button.9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/tabbar_compose_headlines.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joelan/WeiboPopupMenu/d0464e9f4ed96ead5f1e9d8f032edbd58a5a9662/app/src/main/res/drawable-xhdpi/tabbar_compose_headlines.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/tabbar_compose_icon_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joelan/WeiboPopupMenu/d0464e9f4ed96ead5f1e9d8f032edbd58a5a9662/app/src/main/res/drawable-xhdpi/tabbar_compose_icon_add.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/tabbar_compose_idea.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joelan/WeiboPopupMenu/d0464e9f4ed96ead5f1e9d8f032edbd58a5a9662/app/src/main/res/drawable-xhdpi/tabbar_compose_idea.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/tabbar_compose_lbs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joelan/WeiboPopupMenu/d0464e9f4ed96ead5f1e9d8f032edbd58a5a9662/app/src/main/res/drawable-xhdpi/tabbar_compose_lbs.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/tabbar_compose_more.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joelan/WeiboPopupMenu/d0464e9f4ed96ead5f1e9d8f032edbd58a5a9662/app/src/main/res/drawable-xhdpi/tabbar_compose_more.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/tabbar_compose_photo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joelan/WeiboPopupMenu/d0464e9f4ed96ead5f1e9d8f032edbd58a5a9662/app/src/main/res/drawable-xhdpi/tabbar_compose_photo.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/tabbar_compose_review.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joelan/WeiboPopupMenu/d0464e9f4ed96ead5f1e9d8f032edbd58a5a9662/app/src/main/res/drawable-xhdpi/tabbar_compose_review.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/tabbar_compose_background_icon_close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joelan/WeiboPopupMenu/d0464e9f4ed96ead5f1e9d8f032edbd58a5a9662/app/src/main/res/drawable-xxhdpi/tabbar_compose_background_icon_close.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/tabbar_compose_button.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joelan/WeiboPopupMenu/d0464e9f4ed96ead5f1e9d8f032edbd58a5a9662/app/src/main/res/drawable-xxhdpi/tabbar_compose_button.9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/tabbar_compose_headlines.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joelan/WeiboPopupMenu/d0464e9f4ed96ead5f1e9d8f032edbd58a5a9662/app/src/main/res/drawable-xxhdpi/tabbar_compose_headlines.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/tabbar_compose_icon_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joelan/WeiboPopupMenu/d0464e9f4ed96ead5f1e9d8f032edbd58a5a9662/app/src/main/res/drawable-xxhdpi/tabbar_compose_icon_add.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/tabbar_compose_idea.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joelan/WeiboPopupMenu/d0464e9f4ed96ead5f1e9d8f032edbd58a5a9662/app/src/main/res/drawable-xxhdpi/tabbar_compose_idea.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/tabbar_compose_lbs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joelan/WeiboPopupMenu/d0464e9f4ed96ead5f1e9d8f032edbd58a5a9662/app/src/main/res/drawable-xxhdpi/tabbar_compose_lbs.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/tabbar_compose_more.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joelan/WeiboPopupMenu/d0464e9f4ed96ead5f1e9d8f032edbd58a5a9662/app/src/main/res/drawable-xxhdpi/tabbar_compose_more.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/tabbar_compose_photo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joelan/WeiboPopupMenu/d0464e9f4ed96ead5f1e9d8f032edbd58a5a9662/app/src/main/res/drawable-xxhdpi/tabbar_compose_photo.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/tabbar_compose_review.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joelan/WeiboPopupMenu/d0464e9f4ed96ead5f1e9d8f032edbd58a5a9662/app/src/main/res/drawable-xxhdpi/tabbar_compose_review.png -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 |