亚洲精品久久久中文字幕-亚洲精品久久片久久-亚洲精品久久青草-亚洲精品久久婷婷爱久久婷婷-亚洲精品久久午夜香蕉

更多QQ空间微信QQ好友腾讯朋友复制链接
您的位置:首頁/技術文章
文章詳情頁

Android 實現抖音頭像底部彈框效果的實例代碼

【字号: 作者:豬豬瀏覽:130日期:2022-06-07 14:29:46

布局文件

activity_test.xml

<?xml version='1.0' encoding='utf-8'?><androidx.constraintlayout.widget.ConstraintLayout xmlns:android='http://schemas.android.com/apk/res/android' android:layout_width='match_parent' android:layout_height='match_parent' xmlns:app='http://schemas.android.com/apk/res-auto'> <LinearLayout android: android:orientation='vertical' app:layout_constraintStart_toStartOf='parent' app:layout_constraintBottom_toBottomOf='parent' android:background='@color/colorAccent' android:layout_width='match_parent' android:layout_height='300dp'> </LinearLayout> <View android:layout_width='match_parent' android:layout_height='100dp' app:layout_constraintTop_toTopOf='@+id/linearLayout' app:layout_constraintBottom_toTopOf='@+id/linearLayout' app:layout_constraintStart_toStartOf='parent' app:layout_constraintEnd_toEndOf='parent' android:alpha='0' android:background='@android:color/white' /> <ImageView android: android:src='http://www.aoyou183.cn/bcjs/@mipmap/ic_launcher' app:layout_constraintTop_toTopOf='@+id/linearLayout' app:layout_constraintBottom_toTopOf='@+id/linearLayout' app:layout_constraintStart_toStartOf='parent' app:layout_constraintEnd_toEndOf='parent' android:layout_marginTop='100dp' android:layout_width='100dp' android:layout_height='100dp'/></androidx.constraintlayout.widget.ConstraintLayout>

MainActivity.java

點擊事件

View contentView = LayoutInflater.from(MainActivity.this).inflate(R.layout.activity_test, null);PopupWindow popWnd = new PopupWindow(MainActivity.this);popWnd.setContentView(contentView);popWnd.setWidth(ViewGroup.LayoutParams.MATCH_PARENT);popWnd.setHeight(ViewGroup.LayoutParams.WRAP_CONTENT);popWnd.setBackgroundDrawable(new ColorDrawable(0x00000000));popWnd.setOutsideTouchable(false);popWnd.setFocusable(true);//相對于父控件的底部顯示 無任何偏移popWnd.showAtLocation(v, Gravity.BOTTOM, 0, 0);

Android 實現抖音頭像底部彈框效果的實例代碼

到此這篇關于Android 實現抖音頭像底部彈框效果的文章就介紹到這了,更多相關android 抖音彈框內容請搜索好吧啦網以前的文章或繼續瀏覽下面的相關文章希望大家以后多多支持好吧啦網!

標簽: 抖音
相關文章:
主站蜘蛛池模板: 国产自精品在线 | 一级黄色片大全 | 成人夜色 | 91视频最新网站 | 亚洲美女福利视频在线 | 久草免费网站 | 国产精品三级国语在线看 | 偷亚洲偷国产欧美高清 | 91视频聊天网 | 女人毛片a级大学毛片免费 女人毛片在线 | 国产视频手机在线 | 久久青草免费91线频观看不卡 | 特级毛片aaaa免费观看 | 国产三级高清 | 日韩成人免费视频播放 | 日本久久久久亚洲中字幕 | 韩国r级福利视频在线观看网站 | 亚洲第一a亚洲 | 国产日产久久 | 久久精品国产精品青草 | 欧美一级毛片日本 | 一级女性黄色生活片免费的 | 女的被到爽的视频在线观看 | 五月天婷婷在线视频 | 国产在线精品美女观看 | 成人网免费观看 | 青草悠悠视频在线观看 | 爱爱成人 | 人做人爱视频欧美在线观看 | 亚洲精品免费在线 | 妖精视频在线观看18 | 最新永久一路线二路线三路线 | 欧美一级大片免费看 | 欧美日韩一品道 | 亚洲一区二区三区国产精品 | 青青青国产观看免费视频 | 操一操 | 一级黄色免费 | 日韩性黄色一级 | 欧美一区精品 | 日韩免费三级 |