Wesley13 Wesley13
2年前
android Notification 状态栏通知使用示例
ch7\_notification.xml:<?xmlversion"1.0"encoding"utf8"?<LinearLayoutxmlns:android"http://schemas.android.com/apk/res/android"android:layout_width"match_
Wesley13 Wesley13
2年前
android WebView 使用实例
主布局文件:<?xmlversion"1.0"encoding"utf8"?<LinearLayoutxmlns:android"http://schemas.android.com/apk/res/android"android:layout_width"match_parent"
Wesley13 Wesley13
2年前
java 多线程总结篇4——锁机制
在开发Java多线程应用程序中,各个线程之间由于要共享资源,必须用到锁机制。Java提供了多种多线程锁机制的实现方式,常见的有synchronized、ReentrantLock、Semaphore、AtomicInteger等。每种机制都有优缺点与各自的适用场景,必须熟练掌握他们的特点才能在Java多线程应用开发时得心应手。——《Java锁机制详解》(
Wesley13 Wesley13
2年前
java多线程的3种实现方式
多线程相关的问题1.什么是进程?​正在执行的程序2.什么是线程?​进程的子单位,一个能够完成独立功能的执行路径3.为什么需要开启多线程?当执行某些耗时操作的任务的时候需要开启多线程,防止线程阻塞能够让两个任务看起来像是在同时执行
Stella981 Stella981
2年前
Android添加横线和竖线分割界面
竖线<View    android:layout\_width"1dip"    android:layout\_height"match\_parent"   android:background"66CCFF"   android:layout\_gravity"center\_horizontal"
Stella981 Stella981
2年前
Android 控件抖动效果
利用Android自带的动画效果,实现控件的抖动效果,效果资源文件shark.xml<?xmlversion"1.0"encoding"utf8"?<translatexmlns:android"http://schemas.android.com/apk/res/android"android:fr
Stella981 Stella981
2年前
Gallery实现流畅的新闻滚动 方法复写
package com.ename.views;import android.content.Context;import android.util.AttributeSet;import android.view.KeyEvent;import android.view.MotionEvent;
Stella981 Stella981
2年前
Android GridView 添加 HeadView
package com.example.test;import android.content.Context;import android.util.AttributeSet;import android.util.Log;import android.view.MotionEvent;i
Wesley13 Wesley13
2年前
Java面试问题——线程全面详解总结
一、多线程是什么?为什么要用多线程?介绍多线程之前要介绍线程,介绍线程则离不开进程。首先进程 :是一个正在执行中的程序,每一个进程执行都有一个执行顺序,该顺序是一个执行路径,或者叫一个控制单元;线程:就是进程中的一个独立控制单元,线程在控制着进程的执行。一个进程中至少有一个进程。多线程:一个进程中不只有一
Stella981 Stella981
2年前
Android从相机或相册获取图片裁剪
package com.only.android.app; import java.io.File; import android.app.Activity;import android.app.AlertDialog;import android.content.DialogInterfa