登录
首页 » Java » android 异步加载资源示例源码下载

android 异步加载资源示例源码下载

于 2014-02-09 发布
0 134
下载积分: 1 下载次数: 0

代码说明:

android 异步加载资源示例源码下载

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • android 实现类似新闻app的导航栏 例子源码下载
    android 实现类似新闻app的导航栏 例子源码下载
    2015-04-22下载
    积分:1
  • phonegap 登录注册实例源码下载(android版)
    登录注册模块代码
    2015-01-19下载
    积分:1
  • android 解锁例子源码
    package com.codeshogun.android.swipesample;import android.app.Activity;import android.os.Bundle;import android.view.GestureDetector;import android.view.MotionEvent;import android.view.View;import android.view.GestureDetector.SimpleOnGestureListener;import android.view.animation.Animation;import android.view.animation.AnimationUtils;import android.widget.ViewFlipper;public class Main extends Activity { private static final int SWIPE_MIN_DISTANCE = 120; private static final int SWIPE_MAX_OFF_PATH = 250; private static final int SWIPE_THRESHOLD_VELOCITY = 200; private GestureDetector gestureDetector; View.OnTouchListener gestureListener; private Animation slideLeftIn; private Animation slideLeftOut; private Animation slideRightIn; private Animation slideRightOut; private ViewFlipper viewFlipper; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); viewFlipper = (ViewFlipper)findViewById(R.id.flipper); slideLeftIn = AnimationUtils.loadAnimation(this, R.anim.slide_left_in); slideLeftOut = AnimationUtils.loadAnimation(this, R.anim.slide_left_out); slideRightIn = AnimationUtils.loadAnimation(this, R.anim.slide_right_in); slideRightOut = AnimationUtils.loadAnimation(this, R.anim.slide_right_out); gestureDetector = new GestureDetector(new MyGestureDetector()); gestureListener = new View.OnTouchListener() { public boolean onTouch(View v, MotionEvent event) { if (gestureDetector.onTouchEvent(event)) { return true; } return false; } }; } class MyGestureDetector extends SimpleOnGestureListener { @Override public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) { try { if (Math.abs(e1.getY() - e2.getY()) > SWIPE_MAX_OFF_PATH) return false; // right to left swipe if(e1.getX() - e2.getX() > SWIPE_MIN_DISTANCE && Math.abs(velocityX) > SWIPE_THRESHOLD_VELOCITY) { viewFlipper.setInAnimation(slideLeftIn); viewFlipper.setOutAnimation(slideLeftOut); viewFlipper.showNext(); } else if (e2.getX() - e1.getX() > SWIPE_MIN_DISTANCE && Math.abs(velocityX) > SWIPE_THRESHOLD_VELOCITY) { viewFlipper.setInAnimation(slideRightIn); viewFlipper.setOutAnimation(slideRightOut); viewFlipper.showPrevious(); } } catch (Exception e) { // nothing } return false; } } @Override public boolean onTouchEvent(MotionEvent event) { if (gestureDetector.onTouchEvent(event)) return true; else return false; }}
    2014-04-16下载
    积分:1
  • android天天写日志 应用源码
    android天天写日志 应用源码
    2015-12-01下载
    积分:1
  • DATCOM GUI
    DATCOM GUI版进行飞行器气动计算
    2021-05-06下载
    积分:1
  • AndroidQQ源项目代码 实例下载
    Android开发QQ开源项目代码 实例下载
    2014-09-28下载
    积分:1
  • Zxing二维码扫描android app源码
    Zxing二维码扫描实例可使用于安卓手机或安卓PDA,扫描速度超快
    2021-05-06下载
    积分:1
  • Android ExpandableList 例子下载 列表
    Android ExpandableList 例子下载 列表
    2013-08-14下载
    积分:1
  • android sqlite数据库操作 增、删、改、查询 已实现 【附源码】
    实现了基本的 增删改查功能,并包含了基本的sqlite操作类
    2013-03-01下载
    积分:1
  • android selector例子(normal/pressed/focused/disabled状态)
    android selector例子(normal/pressed/focused/disabled状态)
    2015-06-12下载
    积分:1
  • 696518资源总数
  • 104269会员总数
  • 42今日下载