- 博客(5)
- 收藏
- 关注
原创 自定义View的方式给Button或者ImageView添加按键音
通过自定义View的方式,给按钮添加点击音效应该是比较简单的一种方式了public class MainSoundImageView extends ImageView{ private SoundPool mSoundPool; private int soundId; public MainSoundImageView(Context context) { ...
2018-08-21 16:37:51 613
原创 Android源码修改 替换安装apk时,出现的android小机器人图标。
首先我们要知道android的apk安装界面是一个单独的app。所以我们在源码中找到该app。该app在源码下的路径为 packages\apps\PackageInstaller,没错PackageInstaller就是我们要找的apk安装程序。 接下来就好办了: 1.将替换图标a.png放入 packages\apps\PackageInstaller\res\dra...
2018-06-27 18:35:16 2235 6
原创 Android拥有系统权限,设置允许安装未知来源的应用。
关于系统设置的代码,基本都在android.provider.Settings类中。仔细查看Settings类,可以找到如下的常量值: /** * Whether applications can be installed for this user via the system's * {@link Intent#ACTION_INSTALL...
2018-06-26 17:53:49 18567 5
原创 Android 代码打开系统自带的文件管理器(不是单纯的获取文件路径)
网上搜索的办法基本上都是下面这种: public void openFileExplorer(){ Intent intent=new Intent(Intent.ACTION_GET_CONTENT); //系统调用Action属性 intent.setType("*/*"); //设置文件类型 intent.a...
2018-06-20 18:34:56 9693 3
原创 自定义页码显示控件PageNumberView
实现效果上述效果使用了ViewPager+自制的PageNumberView实现的。下面来介绍一下具体实现:首先是布局<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_
2017-04-24 16:26:58 1796 1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人