FlyBirds (2).zip

  • 王小飞66666
    了解作者
  • Java
    开发工具
  • 4.2MB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • 1 积分
    下载积分
  • 0
    下载次数
  • 2021-03-22 17:59
    上传日期
基于安卓的海报自动生成app,毕业设计,登录 海报生成
FlyBirds (2).zip
内容介绍
package com.example.traditionalchinesemedicine.utils.bar; import android.annotation.TargetApi; import android.app.Activity; import android.app.Dialog; import android.database.ContentObserver; import android.graphics.Color; import android.os.Build; import android.os.Handler; import android.provider.Settings; import android.view.Gravity; import android.view.View; import android.view.ViewGroup; import android.view.ViewTreeObserver; import android.view.Window; import android.view.WindowManager; import android.widget.FrameLayout; import androidx.annotation.ColorInt; import androidx.annotation.ColorRes; import androidx.annotation.FloatRange; import androidx.annotation.IdRes; import androidx.annotation.NonNull; import androidx.annotation.RequiresApi; import androidx.core.content.ContextCompat; import androidx.core.graphics.ColorUtils; import androidx.drawerlayout.widget.DrawerLayout; import androidx.fragment.app.DialogFragment; import androidx.fragment.app.Fragment; import java.lang.ref.WeakReference; import java.lang.reflect.Field; import java.lang.reflect.Method; import java.util.ArrayList; import java.util.HashMap; import java.util.Map; import java.util.Set; /** * android 4.4以上沉浸式以及bar的管理 */ @TargetApi(Build.VERSION_CODES.KITKAT) public class ImmersionBar { private static Map<String, BarParams> mMap = new HashMap<>(); private static Map<String, BarParams> mTagMap = new HashMap<>(); private static Map<String, ArrayList<String>> mTagKeyMap = new HashMap<>(); private Activity mActivity; private Window mWindow; private ViewGroup mDecorView; private ViewGroup mContentView; private Dialog mDialog; private BarParams mBarParams; private BarConfig mConfig; private String mActivityName; private String mFragmentName; private String mImmersionBarName; private static final String NAVIGATIONBAR_IS_MIN = "navigationbar_is_min"; /** * 在Activit里初始化 * Instantiates a new Immersion bar. * * @param activity the activity */ private ImmersionBar(Activity activity) { WeakReference<activity rel='nofollow' onclick='return false;'> activityWeakReference = new WeakReference<>(activity); mActivity = activityWeakReference.get(); mWindow = mActivity.getWindow(); mActivityName = activity.getClass().getName(); mImmersionBarName = mActivityName; initParams(); } /** * 在Fragment里初始化 * Instantiates a new Immersion bar. * * @param fragment the fragment */ private ImmersionBar(Fragment fragment) { this(fragment.getActivity(), fragment); } private ImmersionBar(Activity activity, Fragment fragment) { if (activity == null) { throw new IllegalArgumentException("Activity不能为空!!!"); } WeakReference<activity rel='nofollow' onclick='return false;'> activityWeakReference = new WeakReference<>(activity); WeakReference<Fragment> fragmentWeakReference = new WeakReference<>(fragment); mActivity = activityWeakReference.get(); mWindow = mActivity.getWindow(); mActivityName = mActivity.getClass().getName(); mFragmentName = mActivityName + "_AND_" + fragmentWeakReference.get().getClass().getName(); mImmersionBarName = mFragmentName; initParams(); } private ImmersionBar(DialogFragment dialogFragment, Dialog dialog) { WeakReference<DialogFragment> dialogFragmentWeakReference = new WeakReference<>(dialogFragment); WeakReference<Dialog> dialogWeakReference = new WeakReference<>(dialog); mActivity = dialogFragmentWeakReference.get().getActivity(); mDialog = dialogWeakReference.get(); mWindow = mDialog.getWindow(); mActivityName = mActivity.getClass().getName(); mImmersionBarName = mActivityName + "_AND_" + dialogFragmentWeakReference.get().getClass().getName(); initParams(); } /** * 在Dialog里初始化 * Instantiates a new Immersion bar. * * @param activity the activity * @param dialog the dialog * @param dialogTag the dialog tag dialog标识,不能为空 */ private ImmersionBar(Activity activity, Dialog dialog, String dialogTag) { WeakReference<activity rel='nofollow' onclick='return false;'> activityWeakReference = new WeakReference<>(activity); WeakReference<Dialog> dialogWeakReference = new WeakReference<>(dialog); mActivity = activityWeakReference.get(); mDialog = dialogWeakReference.get(); mWindow = mDialog.getWindow(); mActivityName = mActivity.getClass().getName(); mImmersionBarName = mActivityName + "_AND_" + dialogTag; initParams(); } /** * 初始化沉浸式默认参数 * Init params. */ private void initParams() { mDecorView = (ViewGroup) mWindow.getDecorView(); mContentView = (ViewGroup) mDecorView.findViewById(android.R.id.content); mConfig = new BarConfig(mActivity); if (mMap.get(mImmersionBarName) == null) { mBarParams = new BarParams(); if (!isEmpty(mFragmentName)) { //保证一个activity页面有同一个状态栏view和导航栏view if (mMap.get(mActivityName) == null) throw new IllegalArgumentException("在Fragment里使用时,请先在加载Fragment的Activity里初始化!!!"); if (Build.VERSION.SDK_INT == Build.VERSION_CODES.KITKAT || OSUtils.isEMUI3_1()) { mBarParams.statusBarView = mMap.get(mActivityName).statusBarView; mBarParams.navigationBarView = mMap.get(mActivityName).navigationBarView; } mBarParams.keyboardPatch = mMap.get(mActivityName).keyboardPatch; } mMap.put(mImmersionBarName, mBarParams); } else { mBarParams = mMap.get(mImmersionBarName); } } /** * 初始化Activity * With immersion bar. * * @param activity the activity * @return the immersion bar */ public static ImmersionBar with(@NonNull Activity activity) { if (activity == null) throw new IllegalArgumentException("Activity不能为null"); return new ImmersionBar(activity); } /** * 调用该方法必须保证加载Fragment的Activity先初始化,已过时,使用with(Activity activity, Fragment fragment)方法 * With immersion bar. * * @param fragment the fragment * @return the immersion bar */ public static ImmersionBar with(@NonNull Fragment fragment) { if (fragment == null) throw new IllegalArgumentException("Fragment不能为null"); return new ImmersionBar(fragment); } public static ImmersionBar with(@NonNull Activity activity, @NonNull Fragment fragment) { if (activity == null) throw new IllegalArgumentException("Activity不能为null"); if (fragment == null) throw new IllegalArgumentException("Fragment不能为null"); return new ImmersionBar(activity, fragment); } public static ImmersionBar with(@NonNull DialogFragment dialogFragment, @NonNull Dialog dialog) { if (dialogFragment == null) throw new IllegalArgumentException("DialogFragment不能为null"); if (dialog == null) throw new IllegalArgumentException("Dialog不能为null"); return new ImmersionBar(dialogFragment, dialog); } /** * 在dialog里使用 * With immersion bar. * * @param activity the activity * @param dialog the dialog * @param dialogTag the dialog tag * @return the immersion bar */ public static ImmersionBar with(@NonNull Activity activity, @NonNull Dialog dialog, @NonNull String dialogTag) { if (activity == null) throw new IllegalArgumentException("Activity不能为null"); if (dialog == null) throw new
评论
    相关推荐
    • 生成图片.rar
      H5代码生成海报图并下载,澎湃新闻APP生成海报
    • uni-app微信小程序生成海报.rar
      uni-app微信小程序生成海报
    • 小程序canvas生成海报保存到相册
      通过canvas绘制的海报,获取用户授权的处理,对拒绝授权的处理,然后保存到相册
    • 小程序插件生成二维码海报
      小程序插件-生成二维码海报
    • sqx-app.zip
      APP检测升级、配置动态化、分享海报、会员授权、获取剪切板、精选商品、签到、积分兑换、免单、商品分类 、分类详情、多平台比价、海报生成、超级搜索、热门搜索、搜索历史、搜索、提现、积分明细、消息中心、反馈...
    • postr:生成有趣的源代码海报
      海报 是一个非常简单的凤凰应用程序,基于的信息。 多亏了Pete Corey的辛勤工作,他在确定比例和缩放比例方面做得很辛苦。 Postr在后台使用Imagineer,但我避免使用xml_builder... 生成SVG后,将下载文件postr.svg 。
    • 活动APP for ThinkSAAS v0.9
      ThinkSAAS活动APP基于ThinkSAAS社会化网络平台运行,ThinkSAAS社会化网络平台实现本地化扩展和搭建,将为用户提供从web应用平台和手机端应用平台,提供手机android客户端支持和微博信息同步功能。ThinkSAAS活动APP ...
    • java生成海报实例源码-ecore-typescript:用于TypeScript和JavaScript的Ecore和OCL运
      java生成海报实例源码 生态打字稿 CrossEcore 是一个面向多个平台的基于模型的软件工程框架。 从独立于平台的类模型(即 Ecore 模型),生成 C#、TypeScript、JavaScript 和 Swift 等多个平台的源代码。 派生属性、...
    • App上线提交详细过程
      2. 填写的海报信息 3. 填写产品描述 4. 填写审核信息 5. 填写价格信息 6. 可选价格区间 四、 构建版本 1. 在mac mini上打开程序源码 2. 插上设备,进行真机调试编译 3. 上线环境配置一:boundle id配置,版本,build...
    • GaussDB_100_1.0.1-DATABASE-REDHAT-64bit.tar.gz
      guassdb100在redhat上安装包,单机部署的包,安装步骤请看我的文中介绍,经过大量实验搭建总结出来的文档