Android
文章平均质量分 67
不可不戒
这个作者很懒,什么都没留下…
展开
-
Android PopupWindow 实例
public PoiRangeWind(Context context, String POIKey, View view, MKSearch mkSearch) { mAppContext = AppContext.getInstance(); this.POIKey = POIKey; this.mkSearch = mkSearch; LayoutInflater in原创 2014-04-13 16:13:07 · 740 阅读 · 0 评论 -
Android HttpClient获取JSON数据并解析
/** * HTTP工具类 * Created by lezg on 2014/7/22. */public class HttpUtil { private static final int TIME_OUT = 1000; private static final int TIMEOUT_CONNECTION = 20000; private static f原创 2014-07-22 11:42:44 · 1127 阅读 · 0 评论 -
Android 带阻尼效果的ListView
/** * 带阻尼效果的ListView * Created by Lezg on 2014/6/11. */public class BounceListView extends ListView { private static final int MAX_Y_OVERSCROLL_DISTANCE = 200; private static final float原创 2014-06-11 09:45:59 · 1595 阅读 · 0 评论 -
Android 删除SDCard MP3
/** * 从SDCard删除MP3 * * @param url 歌曲路径 * @param id 歌曲id */ public static void deleteMusicFromSDCard(Context context, String url, long id) { File musicUrl = new Fi原创 2014-06-12 15:59:32 · 1078 阅读 · 0 评论 -
Android ListView异步加载图片
/** * 图片加载工具 * Created by lezg on 2014/7/24. */public class ImagesLoader { private static ImagesLoader mIamesLoader; private LruCache mMemoryCache; private ImagesLoader() {原创 2014-07-24 17:50:14 · 549 阅读 · 0 评论 -
Android ImageView仿win8 Metro效果
public class MyImageView extends ImageView { private static final int SCALE_REDUCE_INIT = 0; private static final int SCALING = 1; private static final int SCALE_ADD_INIT = 2; /**转载 2014-07-26 00:46:37 · 697 阅读 · 0 评论 -
Android ListView选中Item高亮
/** * Music列表 Adapter类 * Created by Lezg on 2014/6/7. */public class ListViewMusicAdapter extends BaseAdapter { private int selectedItem = -1; private Context mContext; private ArrayL原创 2014-07-09 19:58:39 · 768 阅读 · 0 评论 -
Android ViewPager实现相册
/** * ViewPager的适配器 * Created by lezg on 2014/7/30. */public class ViewPagerAdapter extends PagerAdapter { private Context mContext; private SparseArray imageViews = new SparseArray();原创 2014-07-30 13:48:54 · 1485 阅读 · 0 评论 -
Android Bitmap图片压缩,图片倒影
/** * 图片倒影 * * @param originalBitmap 原始图片 * @return 带倒影图片 */ public static Bitmap createReflectedImage(Bitmap originalBitmap, boolean isAppStart) { int refectionGa原创 2014-08-01 23:38:53 · 448 阅读 · 0 评论 -
Android 图片内存缓存
/** * 图片加载工具 * Created by lezg on 2014/7/24. */public class ImagesLoader { private static ImagesLoader mIamesLoader; private LruCache mMemoryCache; private ImagesLoader() {原创 2014-08-01 23:42:31 · 612 阅读 · 0 评论 -
Android Volley自定义Request(JSON)
/** * 自定义JsonRequest * Created by lezg on 2014/8/16. */public class MyJsonRequest extends JsonRequest> { public MyJsonRequest(String url,Response.Listener> listener,原创 2014-08-16 10:39:22 · 697 阅读 · 0 评论 -
Android ArrayListAdapter<T>泛型类
/** * ArrayList Adapter泛型类 * Created by lezg on 2014/8/14. */public abstract class ArrayListAdapter extends BaseAdapter { protected ArrayList listItems; protected Context mContext; p原创 2014-08-14 01:21:49 · 3156 阅读 · 0 评论 -
Android Service播放音乐
public class PlayService extends Service{ private MediaPlayer mediaPlayer; @Override public void onCreate(){ super.onCreate(); initMedia(); } @Override publi原创 2014-06-06 11:45:12 · 692 阅读 · 0 评论 -
Android GridView
/** * 附近POI page Adapter类 * Created by Lezg on 2014/5/14. */public class GridViewPoiAdapter extends BaseAdapter{ private Resources mResources; private LayoutInflater inflater; private原创 2014-05-14 21:14:28 · 729 阅读 · 0 评论 -
Android Activity切换动画 左右滑进滑出
slide_in_left:原创 2014-05-02 16:20:30 · 1588 阅读 · 0 评论 -
Android 子线程操作更新UI方法
new Thread(new Runnable() { @Override public void run() { /** * */ SearchActivity.this.runOnUiThread(setList); } }).start();原创 2014-04-16 22:30:25 · 831 阅读 · 0 评论 -
Android 通过HttpClient访问服务器获取XML
public static InputStream getInputStreamHttp(){ InputStream is = null; String responseBody = ""; HttpClient httpClient = new DefaultHttpClient(); HttpGet request = new HttpGet(PATH); try {原创 2014-04-17 15:55:00 · 769 阅读 · 0 评论 -
Android百度地图放大缩小按钮状态更新
/** * 应用程序Acitivity基础类 * 实现地图UI及其功能 * Created by Lezg on 2014/5/3. */public class BaseActivity extends Activity { AppContext mApp; MapView mMapView; MyLocationOverlay mLocationOverla原创 2014-05-05 16:43:27 · 1395 阅读 · 0 评论 -
Android自定义进度条ProgressDialog
进度条布局xml:<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="wrap_content" android原创 2014-05-05 16:34:00 · 720 阅读 · 0 评论 -
Android进度条Dialog
//圆形进度条 public static Dialog createDialog(Context context){ LayoutInflater inflater = LayoutInflater.from(context); View view = inflater.inflate(R.layout.loading_dialog, null);原创 2014-05-05 16:38:24 · 853 阅读 · 0 评论 -
百度地图开发 画路径
//轨迹坐标 private int geoPoint[][] = {{118099893, 24444963}, {118099888, 24444757}, {118099830, 24444400}, {118099722, 24443947}, {118099641, 24443437}, {118099502原创 2014-04-20 19:48:06 · 1863 阅读 · 0 评论 -
Android 在非Activity调用getResources()方法
在非Activity调用getResources()方法原创 2014-04-05 20:51:54 · 3312 阅读 · 0 评论 -
Android 使用setContentView在一个Activity进行界面切换
/** * 使用setContentView在一个Activity * 进行界面的切换 */public class MyActivity extends Activity { private TextView tv; private View mainView; private View subView; @Override public vo原创 2014-05-08 22:56:40 · 2913 阅读 · 0 评论 -
安卓View隐藏动画 从下滑进滑出c
滑进:<set xmlns:android="http://schemas.android.com/apk/res/android" android:interpolator="@android:anim/accelerate_interpolator" > <translate android:duration="300" android:f原创 2014-04-13 12:43:39 · 2215 阅读 · 0 评论 -
Android自定义adapter
/** * 附近Poi Adapter类 * Created by Lezg on 2014/5/13. */public class ListViewPoiAdapter extends BaseAdapter{ private AppContext mAppContext; private LayoutInflater listContainer; priva原创 2014-05-14 09:14:41 · 580 阅读 · 0 评论 -
Android Gson解析Json
public static final String json = "{\n" + " \"error\": 0,\n" + " \"status\": \"success\",\n" + " \"date\": \"2014-05-10\",\n" + " \"results\转载 2014-08-16 23:22:25 · 510 阅读 · 0 评论