android
verkery6
这个作者很懒,什么都没留下…
展开
-
android对于键盘的操作
方法一:在OnCreate()函数中,加上下面的代码getWindow().setSoftInputMode( WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);方法二:在AndroidManifest.xml中,在所要设置的activity中设置以下属性就行了activity android:windowSoftInputMode = "st...原创 2018-06-29 16:26:08 · 1923 阅读 · 0 评论 -
android alterdialog的使用归纳整理
最简单的退出程序时候的dialog对话框一 项目中遇到的,title和message都没法设置,只能addview来设置message的信息了。AlertDialog.Builder builder = new AlertDialog.Builder(this);AlertDialog dialog;TextView textView = new TextView(...原创 2018-06-29 16:28:47 · 1290 阅读 · 0 评论 -
sharedPerferences封装的类
package com.lsh.app.common.miaody.util;import android.content.Context;import android.content.SharedPreferences;import org.json.JSONArray;import java.lang.reflect.InvocationTargetException;impo...原创 2018-07-05 13:25:34 · 131 阅读 · 0 评论 -
android应用跳转百度地图和高德地图
//跳转到高德地图private void checkGaodeMap(double latitude,double longtitude,String address){ if (isInstallApk(BaiduMapActivity.this, "com.autonavi.minimap")) {// 是否安装了高德地图 try { I...原创 2018-08-17 11:26:12 · 2434 阅读 · 0 评论 -
android拨号
package com.example.mydemo.phone;import android.Manifest;import android.annotation.SuppressLint;import android.annotation.TargetApi;import android.content.Intent;import android.content.pm.Packa...原创 2018-08-17 13:39:32 · 693 阅读 · 0 评论 -
viewpage配合fragment和tablayout的使用
一 主页面上<android.support.design.widget.TabLayout android:id="@+id/tabs" android:layout_width="match_parent" android:layout_height="wrap_content" app:tabIndicatorColor="@color/...原创 2018-08-30 17:07:05 · 468 阅读 · 0 评论 -
实现tablayout的新样式系统自带的tabitem
Tablayout添加新的样式。有图标和文字说明,并且和viewpage联动 布局文件:3个TabItem<RelativeLayout android:id="@+id/main_content_frame_parent" android:layout_width="match_parent" android:layout_height="match...原创 2018-08-30 17:08:11 · 5058 阅读 · 0 评论 -
android侧滑菜单实现
layout_toolbar<?xml version="1.0" encoding="utf-8"?><android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.a...原创 2018-08-30 14:22:24 · 3917 阅读 · 0 评论