自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(33)
  • 收藏
  • 关注

原创 Android动态定位权限

判断是否开启了定位权限if(ContextCompat.checkSelfPermission(MainActivity.this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED){//未开启定位权限 //开启定位权限,200是标...

2019-09-17 16:30:11 2984

原创 Android简单集成友盟统计

在清单文件添加所需<?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.myapplication"> <!--友盟统计所需权限--> ...

2019-04-27 20:40:06 272

原创 Android简单集成信鸽推送

添加项目的buid.gradlendk { //选择要添加的对应cpu类型的.so库 abiFilters 'armeabi', 'armeabi-v7a', 'arm64-v8a' // 还可以添加 'x86', 'x86_64', 'mips', 'mips64' } manifestPl...

2019-04-20 10:20:15 351

原创 Android简单知识

有时候

2019-04-09 16:16:34 111

原创 Android中fresco常用的失败图,占位图,重试图

<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http:/...

2019-04-09 14:00:41 1566

原创 Android简单实现Fragment

fragment切换页面<?xml version="1.0" encoding="utf-8"?><RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmln...

2019-04-07 08:17:23 291

原创 Android简单实现ViewPager

切换Xml<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="...

2019-04-07 08:13:56 178

原创 Android ViewpPager简单实现懒加载

base类的fragmentpublic abstract class BaseFragment extends Fragment { //是否可见 protected boolean isVisible; // 标志位,标志Fragment已经初始化完成。 public boolean isPrepared = false; /** * 实现F...

2019-04-07 08:11:50 130

原创 Android相机相册上传

展示Dialog,并且调用相机相册 protected void showQQDialog() { //加载对话框布局 View view = getLayoutInflater().inflate(R.layout.dialog_qq_item, null); dialog = new Dialog(this); dialo...

2019-04-06 21:01:43 130

原创 Android recyclerview横向抢购

big_recyclerview.setLayoutManager(new GridLayoutManager(getActivity(),GridLayoutManager.HORIZONTAL,2,true));

2019-04-06 20:03:28 121

原创 android简单一级购物车

Activitymain。xml<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_hei...

2019-04-02 19:25:31 265 1

原创 Android简单集成MultiImageSelector图片多选

依赖compile 'com.github.lovetuzitong:MultiImageSelector:1.2'项目中加入maven { url "https://jitpack.io" }xml<?xml version="1.0" encoding="utf-8"?><android.support.constraint.ConstraintLayout ...

2019-04-01 20:52:43 353

原创 android动态请求权限

加在定义常量中String[] permiss={Manifest.permission.CAMERA,Manifest.permission.WRITE_EXTERNAL_STORAGE,Manifest.permission.READ_EXTERNAL_STORAGE};加在需要用在点击事件上//动态权限 Cameraperssion(); private void C...

2019-03-26 20:32:18 1496

原创 android简单toolbar

<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_widt...

2019-03-23 12:04:46 97

转载 andorid全局捕获异常

添加到ApplicationCrashHandler.getInstance().init(this);//初始化全局异常管理Appmasterpublic class AppManager { // Activity栈 private static Stack&lt;Activity&gt; activityStack; // 单例模式 private s...

2019-03-13 14:08:41 109

原创 android集成百度地图简单

public class MainActivity extends AppCompatActivity implements View.OnClickListener { private MapView mMapView; private BaiduMap mBaiduMap; public LocationClient mLocationClient; publi...

2019-03-07 11:28:45 464

原创 android简单极光推送

android { compileSdkVersion 28 defaultConfig { applicationId "com.example.lenovo.myapplication" minSdkVersion 15 targetSdkVersion 28 versionCode 1 versi...

2019-03-07 09:24:07 304

原创 android购物车简单不使用自定义View

project的maven仓库maven { url 'https://jitpack.io' }左滑删除的依赖implementation 'com.github.mcxtzhang:SwipeDelMenuLayout:V1.2.1'购物车的fragmnetpublic class frag_03 extends BaseFrament implements XRecyclerV...

2019-03-03 19:53:18 123

转载 android判断网络工具类简单

public class NetUtil { /* 网络状态 */ public static boolean isNet = true; public static enum netType { wifi, CMNET, CMWAP, noneNet } /** * @方法说明:判断WIFI网络是否可用 * @...

2019-02-27 18:59:37 344

原创 popwindow以及alertdialog简单使用

View view=View.inflate(this,R.layout.item_pop,null); popupWindow=new PopupWindow(view,ViewGroup.LayoutParams.WRAP_CONTENT,ViewGroup.LayoutParams.WRAP_CONTENT,true); popupWindow.setFocu...

2019-02-26 18:55:58 182

原创 android简单实现判断WiFi网络,或者移动数据是否连接

//判断WiFi是否连接isWifi(MainActivity.this);//判断Wifi是否连接 private static boolean isWifi(Context mContext) { ConnectivityManager connectivityManager = (ConnectivityManager) mContext ...

2019-02-26 17:06:26 2745

转载 android简单加载网络视频并播放

依赖implementation 'com.dou361.ijkplayer:jjdxm-ijkplayer:1.0.5'必须要申请的权限&lt;uses-permission android:name="android.permission.INTERNET"/&gt; &lt;uses-permission android:name="android.permission.RE...

2019-01-20 10:42:37 4453 3

原创 android简单购物车,自定义view加减按钮

依赖 implementation 'com.google.code.gson:gson:2.8.5' implementation 'com.github.bumptech.glide:glide:4.8.0' implementation 'com.android.support:recyclerview-v7:28.0.0' implementation('...

2019-01-18 14:40:34 1703

原创 android腾讯bugly简单集成

先实现依赖implementation 'com.tencent.bugly:crashreport:latest.release'这个写到全局工具类中,也就是继承ApplicationCrashReport.initCrashReport(getApplicationContext(), "注册时申请的APPID", false); 建议在测试阶段建议设置成true,发布时设置为fal...

2019-01-18 11:58:30 186

原创 android超简单友盟分渠道打包

项目 的清单文件中中配置&lt;application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round...

2019-01-18 11:55:19 180

原创 Android集成greendao框架

依赖 implementation 'org.greenrobot:greendao:3.2.2' implementation 'org.greenrobot:greendao-generator:3.2.2'工具类@Entitypublic class UserInfo { @Id(autoincrement = true) private long i...

2018-12-29 15:40:35 529

原创 android集成高德定位

权限&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&amp;lt;manifest xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot; package=&quot;com.example.demo1_scott&quot;

2018-12-19 20:50:19 181

原创 android线性加载recyclerview列表

依赖implementation 'com.android.support:recyclerview-v7:25.3.1' implementation('com.jcodecraeer:xrecyclerview:1.5.9') { exclude group: 'com.android.support' } implementation 'com.g...

2018-12-17 19:59:08 246

原创 Android集成友盟第三方登录

button点击事件if (v.getId()==R.id.login_QQ) { if(Build.VERSION.SDK_INT&gt;=23){//QQ需要申请写入权限 String[] mPermissionList = new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE,...

2018-12-08 10:12:16 168

原创 Android简单生成二维码

依赖implementation 'cn.bingoogolapple:bga-qrcode-zxing:1.2.5'xml代码&lt;ImageView android:id="@+id/zxing_image" android:layout_width="match_parent" android:layout_height="match...

2018-12-07 15:27:26 227

原创 Android集成Zxing扫码

&lt;uses-permission android:name="android.permission.CAMERA"/&gt; &lt;uses-permission android:name="android.permission.VIBRATE"/&gt;代码&lt;cn.bingoogolapple.qrcode.zxing.ZXingView androi...

2018-12-03 20:59:54 607

原创 Android简单各大传感器

第一项xml&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&amp;lt;TextView android:layout_width=&quot;match_parent&quot; android:layout_height=&quot;wrap_content&quot; a

2018-11-02 15:23:48 176

原创 Android简单侧边栏

main xml主界面&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&amp;lt;android.support.v4.widget.DrawerLayout xmlns:android=“http://schemas.android.com/apk/res/android”xmlns:app=“http://schemas.android

2018-10-20 11:07:02 1011

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除