![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
android
AiHH
Android搞机程序员
展开
-
android 下拉通知栏--通知的发送取消测试Demo
public class MainActivity extends Activity { NotificationManager manager; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); fin.原创 2022-05-19 15:39:30 · 395 阅读 · 0 评论 -
android:属性动画:实现类似MIUI人脸解锁失败时的人脸摇头动画效果
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:title="anim" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <RelativeLayout原创 2021-05-01 13:26:16 · 306 阅读 · 1 评论 -
Android:自定义静态注册广播,发送广播sendBroadcast()失效
原因:Android N之后对隐式广播进行了限制解决:使用显示广播,如下intent.setComponent(new ComponentName("包名","包名.指定接受广播的类名"));原创 2021-04-18 17:11:05 · 1219 阅读 · 0 评论 -
Android:去除Settings中Preference左边的icon占位
方法1:修改iconSpaceReserved为false这个也可以在自定义style里改<style name="Preference.Material"> <item name="android:layout">@layout/preference_material</item> <item name="allowDividerAbove">false</item> <item name="allowDivi原创 2021-03-24 22:56:49 · 1447 阅读 · 0 评论 -
Android:根据view对象获取该view在xml中的id名称
context.getResources().getResourceEntryName(view.getId())原创 2020-10-08 19:43:16 · 3760 阅读 · 0 评论 -
Android:获取当前的锁屏壁纸或桌面壁纸
使用WallpaperManager类FLAG_LOCK为锁屏壁纸FLAG_SYSTEM为桌面壁纸//使用WallpaperManager类 @TargetApi(Build.VERSION_CODES.N) private Bitmap getLockWallpaper(){ WallpaperManager wallpaperManager = WallpaperManager.getInstance(mContext);//获取WallpaperManager实例原创 2020-09-22 20:47:19 · 4400 阅读 · 2 评论 -
Android Q : 安卓源码、水滴屏适配状态栏图标(图标过多时显示一个点)
在没有下拉状态栏时,原生android将原创 2020-07-31 00:41:48 · 1954 阅读 · 2 评论 -
Android:Settings模块 --- 折叠菜单控制
adjustInitialExpandedChildCount函数会动态调整多少个菜单时才会折叠。settings:initialExpandedChildrenCount=“50” initialExpandedChildrenCount 定义了多少个菜单时才折叠,如这里是超过50个菜单项时折叠原文链接:https://blog.csdn.net/zyfzhangyafei/article/details/105572982...转载 2020-07-21 14:48:07 · 590 阅读 · 0 评论 -
Android:CheckBox方型选择框改为圆形选择框
style="@style/wifi_item_content"改成style="@style/Widget.AppCompat.CompoundButton.RadioButton"原创 2020-04-22 11:48:06 · 6420 阅读 · 6 评论 -
Android : 关于xml中的android、app、tools
转载自:https://www.jianshu.com/p/910685a8ea91转载 2020-04-13 21:54:25 · 874 阅读 · 0 评论