android 弹出全局加载等待动画
2016-01-28 16:41
531 查看
/** * 弹出loading动画 */ public static void showLoading(Activity activity) { View popView = activity.getLayoutInflater().inflate(R.layout.pop_loading_layout, null, false); //运行动画 ((AnimationDrawable) (popView.findViewById(R.id.carAnim)).getBackground()).start(); loading = new PopupWindow(popView, ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT); loading.setTouchable(true); loading.setOutsideTouchable(false); loading.setBackgroundDrawable(null); //获取Activity的内容页 loading.showAtLocation(activity.getWindow().getDecorView().findViewById(android.R.id.content), Gravity.START | Gravity.TOP, 0, 0); loading.update(); }
相关文章推荐
- Android Studio中的Project和Module是个什么鬼?
- android 时间戳相关
- Android中如何解析JSON数据
- Android中如何解析XML数据
- android studio设置内存
- Android开发之启动页面Splash Screen
- android utf8转换
- Android Studio上的几个插件
- android 友盟社会化分享
- 获取新浪微博开发时的MD5签名
- Android Studio导入github下载的工程
- Android中设置ListView内容刷新问题
- Android-PullToRefresh onRefreshComplete()失效问题
- android 关于Location of the Android SDK has not been setup in the preferences的解决方法
- android插值器简单使用
- 对android:configChanges属性,一般认为有以下几点:
- Android Studio导入项目的几种方法
- Android组件(一)-Calendar、DataPickerDialog、PreferenceActivity、CoordinatorLayout
- Android开发使用的常见第三方框架
- 使用Json数据进行服务器与android端交互