登录
首页 » Java » Android Launcher 桌面分页滑动例子代码

Android Launcher 桌面分页滑动例子代码

于 2014-10-10 发布
0 316
下载积分: 1 下载次数: 0

代码说明:

Android Launcher 桌面分页滑动例子代码

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

发表评论

0 个回复

  • Android录制视频源码
    Android录制视频源码
    2015-06-17下载
    积分:1
  • android 日历例子源码下载
    android 日历的实现
    2015-05-21下载
    积分:1
  • android Modbus Rtu 通讯例子
    ModbusRtuConnect例子
    2019-06-03下载
    积分:1
  • android open gl 示例代码下载
    [实例简介]Open GL 入门级示例 [实例截图] [核心代码]package com.china.gltry;import javax.microedition.khronos.egl.EGL10;import javax.microedition.khronos.egl.EGL11;import javax.microedition.khronos.egl.EGLConfig;import javax.microedition.khronos.egl.EGLContext;import javax.microedition.khronos.egl.EGLDisplay;import javax.microedition.khronos.egl.EGLSurface;import javax.microedition.khronos.opengles.GL;import android.view.SurfaceHolder;/** * An EGL helper class. */public class EGLHelper{ public EGLHelper() { } /** * Initialize EGL for a given configuration spec. * @param configSpec */ public void start(int[] configSpec){ /* * Get an EGL instance */ mEgl = (EGL10) EGLContext.getEGL(); /* * Get to the default display. */ mEglDisplay = mEgl.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY); /* * We can now initialize EGL for that display */ int[] version = new int[2]; mEgl.eglInitialize(mEglDisplay, version); EGLConfig[] configs = new EGLConfig[1]; int[] num_config = new int[1]; mEgl.eglChooseConfig(mEglDisplay, configSpec, configs, 1, num_config); mEglConfig = configs[0]; /* * Create an OpenGL ES context. This must be done only once, an * OpenGL context is a somewhat heavy object. */ mEglContext = mEgl.eglCreateContext(mEglDisplay, mEglConfig, EGL10.EGL_NO_CONTEXT, null); mEglSurface = null; } /* * Create and return an OpenGL surface */ public GL createSurface(SurfaceHolder holder) { /* * The window size has changed, so we need to create a new * surface. */ if (mEglSurface != null) { /* * Unbind and destroy the old EGL surface, if * there is one. */ mEgl.eglMakeCurrent(mEglDisplay, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_CONTEXT); mEgl.eglDestroySurface(mEglDisplay, mEglSurface); } /* * Create an EGL surface we can render into. */ mEglSurface = mEgl.eglCreateWindowSurface(mEglDisplay, mEglConfig, holder, null); /* * Before we can issue GL commands, we need to make sure * the context is current and bound to a surface. */ mEgl.eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface, mEglContext); GL gl = mEglContext.getGL(); return gl; } /** * Display the current render surface. * @return false if the context has been lost. */ public boolean swap() { mEgl.eglSwapBuffers(mEglDisplay, mEglSurface); /* * Always check for EGL_CONTEXT_LOST, which means the context * and all associated data were lost (For instance because * the device went to sleep). We need to sleep until we * get a new surface. */ return mEgl.eglGetError() != EGL11.EGL_CONTEXT_LOST; } public void finish() { if (mEglSurface != null) { mEgl.eglMakeCurrent(mEglDisplay, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_CONTEXT); mEgl.eglDestroySurface(mEglDisplay, mEglSurface); mEglSurface = null; } if (mEglContext != null) { mEgl.eglDestroyContext(mEglDisplay, mEglContext); mEglContext = null; } if (mEglDisplay != null) { mEgl.eglTerminate(mEglDisplay); mEglDisplay = null; } } EGL10 mEgl; EGLDisplay mEglDisplay; EGLSurface mEglSurface; EGLConfig mEglConfig; EGLContext mEglContext;}
    2015-04-06下载
    积分:1
  • android 测身高标准体重 示例源码
    android 测身高标准体重 示例源码
    2014-04-16下载
    积分:1
  • android app应用首次启动界面的图片切换效果实例源码下载
    焦点图的切换效果有了
    2015-03-12下载
    积分:1
  • android 实现调用系统相机拍照,并且存到sd卡 实例 附完整源码
    一个demo,实现调用系统相机拍照,将其显示在屏幕上,并且存到sd卡。     Android中实现拍照有两种方法,一种是调用系统自带的相机,然后使用其返回的照片数据。 还有一种是自己用Camera类和其他相关类实现相机功能,这种方法定制度比较高,洗染也比较复杂,一般平常的应用只需使用第一种即可。 用Intent启动相机的代码:Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);startActivityForResult(intent, 1); 拍完照后就可以在onActivityResult(int requestCode, int resultCode, Intent data)中获取到Bitmap对象了。Bitmap bitmap = (Bitmap) data.getExtras().get("data"); 要将图像存储到sd卡之前最好先检查一下sd卡是否可用     String sdStatus = Environment.getExternalStorageState();            if (!sdStatus.equals(Environment.MEDIA_MOUNTED)) { // 检测sd是否可用                Log.v("TestFile",                        "SD card is not avaiable/writeable right now.");                return;            }   以下代码可以实现将图像文件存到“sdcard/myImage/”文件夹下,名称为“111.jpg”            File file = new File("/sdcard/myImage/");            file.mkdirs();// 创建文件夹            String fileName = "/sdcard/myImage/111.jpg";             try {                b = new FileOutputStream(fileName);                bitmap.compress(Bitmap.CompressFormat.JPEG, 100, b);// 把数据写入文件            } catch (FileNotFoundException e) {                e.printStackTrace();            } finally {                try {                    b.flush();                    b.close();                } catch (IOException e) {                    e.printStackTrace();                }            } 另外要注意的是读写sd卡文件必须首先要在Mainifest.xml文件中配置权限:           一个demo,实现调用系统相机拍照,将其显示在屏幕上,并且存到sd卡。    
    2013-06-13下载
    积分:1
  • android 下不错的 播放器实例 SeeJoPlayer 附源码 带截图
    android 下播放器实例 供学习和研究使用
    2013-02-20下载
    积分:1
  • android 侧滑菜单例子源码下载
    android 侧滑菜单例子源码下载
    2015-05-14下载
    积分:1
  • Android 查看时间日期的应用(Android高级控件的开发及应用-03_14).zip
    Android 查看时间日期的应用(Android高级控件的开发及应用-03_14).zip
    2019-10-06下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载