【android – Retrofit RxJava – 如果我使用了Disposable.dispose(),那么当片段恢复时不会发光】教程文章相关的互联网学习教程文章

android intent-filter 注册网页链接打开app

如下实现注册m.hao123.com的链接:<intent-filter><category android:name="android.intent.category.BROWSABLE"/> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <data android:scheme="https" android:host="m.hao123.com" /> </intent-filter>原文:https://www.cnblogs.com/lzh-Linux/p/8979239.html

Android Studio - How to Change Android SDK Path

File->project Structure into Project Structure Left > SDKs Press +, add another sdk原文:http://blog.csdn.net/fnzsjt/article/details/40797043

移植 iperf 网络性能测试工具到 Android-P【代码】

.....新开发板使用了 Android-P 的方案,WiFi 刚刚调通,为了测试 WiFi 稳定性,需要使用 iperf 工具。但 Android 并没有提供这个工具,只能自己移植一份了。首先下载源代码,下载地址:https://storage.googleapis.com/google-code-archive-source/v2/code.google.com/iperf/source-archive.zip解压后删除 Makefile 等不相关的文件,并建立 Android.mk,内容如下: 1LOCAL_PATH := $(call my-dir)2 3# Device executable.4# =====...

Android开发之ProgressDialog在独立Thread线程中更新进度【代码】

简单的需求:在一个工作Thread中更新进度对话框ProgressDialog遇到的问题:1,创建需要Context,这个需要传进来2,Thread中不能创建ProgressDialog,否则需要创建Looper3,直接在Thread中更新ProgressDialog不行,扔例外,不是创建Thread的View不允许更新4,Thread外创建Handler,然后现成里Post,更本不会更新。解决方案:1,创建ProgressDialog,同时创建Handler,用Callback handleMessage更新对话框2,Thread中调用sendMessage...

58同城加载动画的实现( Android属性动画)【代码】【图】

最近看了58同城新版 app ,里面还是做了很多动画特效,其中我看到加载数据时的一个加载动画比较好玩,就试着做了一下,先一起来看看效果 很多人看了这个效果图,第一个疑问就是底下的阴影部分是如何实现的?其实如果真要自己动手实现的话,这个问题反而不是问题,而真正有困难的是,如何控制这个图片上升的时候速度减慢,而下降的时候速度加快,当然这个问题只有在动手做的过程中才会发现。 这里还是按步骤来实现 1、实现整个 L...

Android ActionBar使用方法

对于这ActionBar我想很多人都想了解一下到底是怎么一个使用方法,以及它都存在哪些可操作的和使用的地方。如下图所示:<ignore_js_op>这便是ActionBar的基本内容。获得ActionBar的方法很简单actionBar = this.getActionBar();1.Home图标区域:这里的图标当然可以在清单文件中定义,也可以在代码中定义,但是在代码中定义需要请求设置的"资格",即需要添加以下代码requestWindowFeature(Window.FEATURE_LEFT_ICON);setFeatureDrawab...

一起学android之设置资源图片为圆角图片 (28)【图】

效果图:参看以下代码:public class MainActivity extends Activity {private ImageView imageView1;private ImageView imageView2;Bitmap mBitmap;@Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.image);initView();}private void initView(){imageView1=(ImageView)findViewById(R.id.imageView1);imageView2=(ImageView)findViewById(R.id.imageVi...

(转)Android利用canvas画各种图形(点、直线、弧、圆、椭圆、文字、矩形、多边形、曲线、圆角矩形)【代码】【图】

来自:http://blog.csdn.net/rhljiayou/article/details/72126201、首先说一下canvas类:Class OverviewThe Canvas class holds the "draw" calls. To draw something, you need 4 basic components: A Bitmap to hold the pixels, a Canvas to host the draw calls (writing into the bitmap), a drawing primitive (e.g. Rect, Path, text, Bitmap), and a paint (to describe the colors and styles for the drawing). 这个类相当...

Android 源码

一个在线阅读android 源码的网站http://androidxref.com/6.0.1_r10/xref/frameworks/av/media/libstagefright/wifi-display/MediaSender.cpp原文:http://lindt.blog.51cto.com/9699125/1744981

【原创】Android多个xml文件的使用【代码】

Android中经常会使用多个xml文件,但在Mainactivity中使用的setContentView(R.layout.main)只加载main.xml文件,其他xml文件不加载进当前视图,当我们要用到其他xml文件中的控件是发现直接使用findViewById()方法时不报错但控件的值找不到为null,而一旦为该控件添加相应事件就会出现空指针异常。原因就在于控件并未加载进当前视图。解决方法:两种1、使用在main.xml中使用include语句 <include layout="@layout/x"/>2、使...

解决 Android SDK下载和更新失败“Connection to https://dl-ssl.google.com refused."

缘由:更新sdk,遇到了更新下载失败问题:Fetching https://dl-ssl.google.com/android/repository/addons_list-2.xmlFetched Add-ons List successfullyFetching URL: https://dl-ssl.google.com/android/repository/repository-8.xmlDone loading packages.Fetching https://dl-ssl.google.com/android/repository/addons_list-2.xmlFailed to fetch URL https://dl-ssl.google.com/android/repository/addons_list-2.xml, reaso...

android Camera 录像时旋转角度【代码】

录像保存时,旋转角度要与所拍录像时的角度保持一致,否则,看起来就会出现角度不度,巅倒等问题。一般在开始录像之前会先去初始化录像initializeRecorder 中会去读取当前的录像或拍照的旋转角度,并跟据当前的角度来选择一个角度写到所拍照片或者视频的 exif 信息中去。 1// See android.hardware.Camera.Parameters.setRotation for 2// documentation. 3// Note that mOrientation here is the device orientation, which is ...

50个Android开发技巧(12 为控件添加圆角边框)【图】

控件的圆角边框可以使你的App看起来更美观,其实实现起来也很简单。 (原文地址:http://blog.csdn.net/vector_yi/article/details/24463025)以创建一个灰色的带圆角边框的Button为例:一、创建一个ShapeDrawable作为背景在drawable目录下创建一个button_rounded_background.xml文件:<shape xmlns:android = "http://schemas.android.com/apk/res/android"android:shape= "rectangle" ><solid android:color= "#AAAAAA" /><corners...

企业微邮——Android客户端设置说明

企业微邮是由我司专业邮箱团队为企业用户打造的邮箱客户端,支持企业邮箱的imap设置、企业logo和签名个性化设置。除此之外还支持21CN免费邮,189邮箱,QQ邮箱,139邮箱,163邮箱及其他主流邮箱。闪电般的邮件收发速度,多帐号共同管理,随时随地收发邮件,自定义新邮件检查频率、载入数、载入内容,多种组合方式节省流量。1 如何安装(1)在安卓市场搜索“企业微邮”;(2)扫一扫以下二维码获取apk;2 登录安装成功后,直接输入企...

(原)android-as_video_player中的OpenGLES视频显示【代码】

android-as_video_player中的OpenGLES视频显示1,SurfaceView和OpenGLES先从java的上层代码入手:surfaceView = (SurfaceView) findViewById(R.id.gl_surface_view); surfaceView.getLayoutParams().height =screenWidth; SurfaceHolder mSurfaceHolder = surfaceView.getHolder(); mSurfaceHolder.addCallback(previewCallback);private Callback previewCallback = new Callback() {publicvoid surfaceCreated(SurfaceHolder holde...