手机gallery文件夹图片怎样移到另一部手机

本篇文章主要介绍如何使用自定义的Gallery控件,实现3D效果的图片浏览器的效果。
话不多说,先看效果。
是一个自定义的Gallery控件,实现倒影和仿3D的效果,下面是一个图片查看器,点击上面的小图片,可以在下面查看大图片。
下面重点说一下,实现图片查看器的思路。
1.手机中图片路径的获取
首先,先不管图片如何展示,如果我们想实现图片查看器的功能,我们首先需要做的是获取到所有的图片的路径信息,只有这样,我们才能实现对图片的查看。
我们可以使用下面的代码实现
private List&String& getImagesFromSD() {
List&String& imageList = new ArrayList&String&();
File f = Environment.getExternalStorageDirectory();
if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {
f = new File(Environment.getExternalStorageDirectory().toString());
Toast.makeText(MainActivity.this, R.string.sdcarderror, Toast.LENGTH_LONG).show();
return imageL
File[] files = f.listFiles();
if (files == null || files.length == 0)
return imageL
for (int i = 0; i & files. i++) {
File file = files[i];
if (isImageFile(file.getPath()))
imageList.add(file.getPath());
return imageL }
上面这个方法的作用,就是获取SD卡中,所有文件的后缀名满足图片后缀名的文件的路径,然后放到List容器中返回。
isImageFile方法是这样实现的
private boolean isImageFile(String fName) {
String end = fName.substring(fName.lastIndexOf(&.&) + 1, fName.length()).toLowerCase();
if (end.equals(&jpg&) || end.equals(&gif&) || end.equals(&png&) || end.equals(&jpeg&) || end.equals(&bmp&)) {
} 2.上方小图片3D效果展示的实现
在完成了图片路径的获取之后,我们下面要做的就是将图片展示在上面的有3D效果的自定义Gallery控件上面。现在版本中Gallery控件已经不再推荐使用,取而代之的ViewPager和HorizonalScrollView控件。
下面介绍具有自定义Gallery控件的实现
/** * 3D效果Gallery实现 ** @time 日 下午9:10:47 */@SuppressWarnings(&deprecation&)public class GalleryFlow extends Gallery { private Camera mCamera = new Camera(); // 两侧图片最大旋转角度 private int mMaxRotationAngle = 60; private int mMaxZoom = -120; private int mCoveflowC public GalleryFlow(Context context) {
super(context);
this.setStaticTransformationsEnabled(true); } public GalleryFlow(Context context, AttributeSet attrs) {
super(context, attrs);
this.setStaticTransformationsEnabled(true); } public GalleryFlow(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
this.setStaticTransformationsEnabled(true); } // 设置最大旋转角 public void setMaxRotationAngle(int maxRotationAngle) {
mMaxRotationAngle = maxRotationA } // 获取当前控件中心点x轴位置 private int getCenterOfCoverflow() {
return (getWidth() - getPaddingLeft() - getPaddingRight()) / 2 + getPaddingLeft(); } // 获取view控件的x轴位置 private static int getCenterOfView(View view) {
return view.getLeft() + view.getWidth() / 2; } // 默认返回值是false,若设置城true,则每次gallery生成子控件的时候,都会调用这个方法,所以我们可以将返回值设置为true,然后完成child的旋转等变形操作 protected boolean getChildStaticTransformation(View child, Transformation t) {
final int childCenter = getCenterOfView(child);
final int childWidth = child.getWidth();
int rotationAngle = 0;
t.clear();
t.setTransformationType(Transformation.TYPE_MATRIX);
// 如果child控件在中心位置,则不旋转
if (childCenter == mCoveflowCenter) {
transformImageBitmap((ImageView) child, t, 0);
// 否则,将当前child控件旋转一定角度
rotationAngle = (int) (((float) (mCoveflowCenter - childCenter) / childWidth) * mMaxRotationAngle);
if (Math.abs(rotationAngle) & mMaxRotationAngle) {
rotationAngle = (rotationAngle & 0) ? -mMaxRotationAngle : mMaxRotationA
transformImageBitmap((ImageView) child, t, rotationAngle);
} //重新计算控件的x轴位置 protected void onSizeChanged(int w, int h, int oldw, int oldh) {
mCoveflowCenter = getCenterOfCoverflow();
super.onSizeChanged(w, h, oldw, oldh); } // 将child控件旋转rotationAngle方法的实现 private void transformImageBitmap(ImageView child, Transformation t, int rotationAngle) {
mCamera.save();
final Matrix imageMatrix = t.getMatrix();
final int imageHeight = child.getLayoutParams().
final int imageWidth = child.getLayoutParams().
final int rotation = Math.abs(rotationAngle);
// 在Z轴上正向移动camera的视角,实际效果为放大图片。 如果在Y轴上移动,则图片上下移动;X轴上对应图片左右移动。
mCamera.translate(0.0f, 0.0f, 100.0f);
if (rotation & mMaxRotationAngle) {
float zoomAmount = (float) (mMaxZoom + (rotation * 1.5));
mCamera.translate(0.0f, 0.0f, zoomAmount);
// 在Y轴上旋转,对应图片竖向向里翻转。如果在X轴上旋转,则对应图片横向向里翻转。
mCamera.rotateY(rotationAngle);
mCamera.getMatrix(imageMatrix);
imageMatrix.preTranslate(-(imageWidth / 2), -(imageHeight / 2));
imageMatrix.postTranslate((imageWidth / 2), (imageHeight / 2));
// 恢复相机原状态
mCamera.restore(); }}
通 过 自定义gallery控件,现在我们已经实现了当滑动Gallery里面的图片时,两侧的图片会发生一定角度的旋转,也就是完成了3D效果的第一部,下一步,就需要我们在Gallery的Adapter里面,对getView方法,进行改造,从而完成预览小图片的倒影效果
3.实现Adapter,完成倒影效果
要完成倒映效果,我们需要在getView方法中,对穿进来的图片进行处理,具体代码如下
@SuppressWarnings({ &deprecation&, &unused& })public class ImageAdapter extends BaseAdapter { private Context mC //用于存放图片的路径 private List&String& imageFileL //原始图片 private Bitmap originalI //反射的倒影图片,高度为原始图片一半 private Bitmap reflectionI //用于存放处理后的整个图片,高度为原始图片的1.5倍 private Bitmap bitmapWithR //图片的宽高
//矩阵 private M //画布 private C //原始图像与反射的倒影图像之间的间隔高度 final int reflectionGap = 4; //用于getView返回 private ImageView imageV //倒影的阴影模糊效果 private LinearG
public ImageAdapter(Context c, List&String& _imageFileList) {
mContext =
imageFileList = _imageFileL
matrix = new Matrix();
//设置为x轴翻转
matrix.preScale(1, -1);
@Override public int getCount() {
return imageFileList.size(); } @Override public Object getItem(int position) {
} @Override public long getItemId(int position) {
} //返回经过处理的ImageView对象 @Override public View getView(int position, View convertView, ViewGroup parent) {
return createReflectedImages(imageFileList.get(position)); }
//这是最主要的方法,完成了对图片的倒映效果处理 public ImageView createReflectedImages(String filePath) {
//获取原始图片
originalImage = BitmapFactory.decodeFile(filePath);
width = originalImage.getWidth();
height = originalImage.getHeight();
//创建倒影图像,高度是原始图像的一半,并且使用矩阵进行了x轴反转,也就是倒影效果
reflectionImage = Bitmap.createBitmap(originalImage, 0, height / 2, width, height / 2, matrix, false);
//初始化Bitmap对象,用于存放处理后的图片,高度为原始图片的1.5倍
bitmapWithReflection = Bitmap.createBitmap(width, (height + height / 2), Config.ARGB_8888);
//根据bitmapWithReflection对象,创建一个画布
canvas = new Canvas(bitmapWithReflection);
//先把原始图像画上
canvas.drawBitmap(originalImage, 0, 0, null);
Paint paint = new Paint();
//画出原始图像与反射图像之间的小空隙,高度为reflectionGap
canvas.drawRect(0, height, width, height + reflectionGap, paint);
//画出倒影
canvas.drawBitmap(reflectionImage, 0, height + reflectionGap, null);
//设置画笔的阴影效果
shader = new LinearGradient(0, originalImage.getHeight(), 0, bitmapWithReflection.getHeight() + reflectionGap, 0x70ffffff, 0x00ffffff,
TileMode.CLAMP);
paint.setShader(shader);
paint.setXfermode(new PorterDuffXfermode(Mode.DST_IN));
//在倒影图上用带阴影的画笔绘制矩形
canvas.drawRect(0, height, width, bitmapWithReflection.getHeight() + reflectionGap, paint);
//初始化一个ImageView对象
imageView = new ImageView(mContext);
//将处理后的图像设置为图片资源
imageView.setImageBitmap(bitmapWithReflection);
imageView.setLayoutParams(new Gallery.LayoutParams(120, 160));
imageView.setScaleType(ScaleType.CENTER_INSIDE);
return imageV } } 最主要的还是理解如何实现的倒影效果。注释应该是很详细了,不过多解释。 4.如何使用自定义的Gallery控件实现最终的图片查看器
下面,我们看一下,如何使用这个控件,实现我们最终的效果。
&?xml version=&1.0& encoding=&utf-8&?&&LinearLayout xmlns:android=&/apk/res/android& android:layout_width=&fill_parent& android:layout_height=&fill_parent& android:background=&#F9F900& android:gravity=&center_horizontal& android:orientation=&vertical& & &com.examole.gallery.GalleryFlow
android:id=&@+id/mygallery&
android:layout_width=&match_parent&
android:layout_height=&100dp&
android:layout_marginTop=&20dp&
android:gravity=&center_vertical& /& &ImageSwitcher
android:id=&@+id/switcher&
android:layout_width=&wrap_content&
android:layout_height=&match_parent&
android:layout_gravity=&center_horizontal& /&&/LinearLayout&
我们在这里使用了一个很陌生的类,那就是ImageSwicher,我们看一下,在Activity如何使用
public class MainActivity extends Activity implements AdapterView.OnItemSelectedListener, ViewSwitcher.ViewFactory { private List&String& ImageL private ImageSwitcher mS private G @Override public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
// 获取图片路径
ImageList = getImagesFromSD();
mSwitcher = (ImageSwitcher) findViewById(R.id.switcher);
gallery = (Gallery) findViewById(R.id.mygallery);
// ImageSwitcher控件必须实现ViewSwitcher.ViewFactory接口,然后在makeView方法中,返回我们需要显示的控件即可
mSwitcher.setFactory(this);
// 设置图片的进入和离开的动画效果
mSwitcher.setInAnimation(AnimationUtils.loadAnimation(this, android.R.anim.slide_in_left));
mSwitcher.setOutAnimation(AnimationUtils.loadAnimation(this, android.R.anim.slide_out_right));
// 给gallery设置适配器
gallery.setAdapter(new ImageAdapter(this, ImageList));
gallery.setOnItemSelectedListener(this); } private List&String& getImagesFromSD() {
List&String& imageList = new ArrayList&String&();
File f = Environment.getExternalStorageDirectory();
if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {
f = new File(Environment.getExternalStorageDirectory().toString());
Toast.makeText(MainActivity.this, R.string.sdcarderror, Toast.LENGTH_LONG).show();
return imageL
File[] files = f.listFiles();
if (files == null || files.length == 0)
return imageL
for (int i = 0; i & files. i++) {
File file = files[i];
if (isImageFile(file.getPath()))
imageList.add(file.getPath());
return imageL } @SuppressLint(&DefaultLocale&) private boolean isImageFile(String fName) {
String end = fName.substring(fName.lastIndexOf(&.&) + 1, fName.length()).toLowerCase();
if (end.equals(&jpg&) || end.equals(&gif&) || end.equals(&png&) || end.equals(&jpeg&) || end.equals(&bmp&)) {
} @Override public void onItemSelected(AdapterView&?& parent, View view, int position, long id) {
// 当点击上面的小图片的时候,获取图片的绝对路径,然后设置给mSwitcher
String photoURL = ImageList.get(position);
mSwitcher.setImageURI(Uri.parse(photoURL)); } @Override public void onNothingSelected(AdapterView&?& parent) { } @Override public View makeView() {
ImageView i = new ImageView(this);
i.setBackgroundColor(0x);
i.setScaleType(ImageView.ScaleType.CENTER_INSIDE);
i.setLayoutParams(new ImageSwitcher.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
}} 除了ImageSwitcher这个控件,其他的应该都很熟悉了,经过这几个步骤,我们终于实现了一个简单的仿3D效果的图片查看器。Gallery Doctor:将多余照片清出你的手机 - 推酷
Gallery Doctor:将多余照片清出你的手机
以色列图片管理初创企业MyRoll今天推出了一个全新的独立应用,这个图片管理应用能够将手机中所有不良图片清除掉,从而解放手机越来越捉襟见肘的储存空间。
目前这个应用仅支持安卓系统,但是iOS版本将会在不久后发布。GAllery Doctor会扫描你的手机相册,找出其中模糊、曝光不好以及重复的照片。它有点像iPhone的Cleen或是Flic应用,只不过Gallery Doctor是通过移除所有无用图片来节省此过程的人力。
喜欢用手机拍照或是没事就自拍一张的人肯定会有这样的麻烦:手机里图片越来越多,明知需要清理,但是又懒得一张一张查看,进而手机储存空间越来越少。而Gallery Doctor可以代替你完成手动查看,将其中“重复”和“不良”图片归纳出来。
如果你想省事,就直接按下删除按钮,将所有Gallery Doctor挑选出来的图片删掉。如果你无法完全信任Gallery Doctor,你也可以手动查看它所挑选出来的图片,然后进行手动删除。
MyRoll此前的名称为Flayvr,去年他们完成了200万美元的融资,并且转型成为了一家智能图片管理应用企业。
在图片分析和管理方面,MyRoll有着丰富的经验,他们的技术能够很准确找到那些模糊或是曝光没有控制好的照片。他们会根据锐度、颜色、光源等指标对照片进行分析。而且该公司表示Gallery Doctor还会越来越智能,随着你使用时间的增加,它会学习你对照片质量的判断标准。
值得一提的是,该公司CEO Ron Levy表示,他们还发布了一个Android Wear应用,让用户在智能手表上管理他们的相册。
大多数应用的发展理念都是这样的:开发出一个优秀的应用,获得大量用户,然后再考虑挣钱。MyRoll最初的想法也是这样,但是现在他们的想法是尽快获得足够多的现金流。
Levy并没有具体透露他们的盈利方式,但是他透露,该公司计划将他们的技术带到云端,用云应用代替本地应用。将应用带到云端将会为MyRoll带来许多盈利的机会,例如与一些著名云存储企业达成合作。但在我看来,他们最有可能获得盈利的方式,就是与智能手机生产商合作,让他们用户MyRoll的产品作为手机上的默认相册应用。
另外,他们还有另一种策略:保持现有本地应用的免费性,但是将一些高级功能添加到云应用中,并且鼓励用户付费试用云应用。Levy表示,他们目前也在考虑这种方式。
我还有另一个想法,那就是会有一个科技巨头直接将MyRoll收购。最近我们看到了太多的以色列科技初创企业被收购,例如Onavo被Facebook收购、Waze和SlickLogin被谷歌收购,以及CloudOn被Dropbox收购等。如果有一天某个大型科技企业想要收购MyRoll,我一点都不会奇怪。
,译|快鲤鱼,转载请注明出处)
寻求快鲤鱼免费报道,点此申请!
已发表评论数()
&&登&&&陆&&
已收藏到推刊!
请填写推刊名
描述不能大于100个字符!
权限设置: 公开
仅自己可见当前访客身份:游客 [
/堆着一堆的博客没写,又出差了,哎。。。无偿奔赴着一个又一个战场。
:一直很牛的样子,学习ing
:引用来自“_liusl”的评论 工资的积累是为了安稳...
:工资的积累是为了安稳当下的生活。在积累的同时,...
:我有个app是iFieldBorad.apk,请问为什么在静默安...
:快找工作了,感觉自己还差很多
:引用来自“zhoulc”的评论 引用来自“冲浪的水手...
:引用来自“Ryman”的评论为什么我注册了observe...
:为什么我注册了observer在成功安装后没有调用 pa...
:引用来自“lian_duan”的评论您好,请问您在移植...
:您好,请问您在移植libcurl到android时,碰到的找...
今日访问:7
昨日访问:85
本周访问:1115
本月访问:2692
所有访问:67190
android幻灯片效果实现-Gallery
发表于2年前( 15:21)&&
阅读(4580)&|&评论()
0人收藏此文章,
& & 最近下载几款手机应用研究了下,发了有些自定义控件惊人的相似,所以我觉得在以后的开发中,对一些控件的复用肯定是很多的,在首页(非载入页)一般都会有一个幻灯片效果,既可以放广告也可以放推荐,如果图片设计的好看,效果一般都会不错,既然用到了Gallery,也附带把相框效果的例子写一写(淘宝详情界面的商品图片滑动展示)
一、效果图展示
& & (1)幻灯片效果展示: &&&&&&&&&&&& &&&&&&&&&&&& &&&&&&&&&&&& & &&
(2)商品图片滑动展示 &&&&&&&&&&&& &&&&&&&&&&&& &&&&&&&&&&&& &&&&& & 查看大图: &&&&&&&&&&&&
二、部分代码说明
& & (1)幻灯片效果的实现: &&&&& & 自定义Gallery:DetailGallery.java &&&&& & 可视界面:ImgSwitchActivity.java &&&&& & 适配类:GalleryIndexAdapter.java &&&&& & 1)自定义Gallery主要重写onFling通过按下和松手的位置不同比较是向右移动还是向左移动,部分代码如下:
private boolean isScrollingLeft(MotionEvent e1, MotionEvent e2) {
return e2.getX() & e1.getX();
public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX,
float velocityY) {
if (isScrollingLeft(e1, e2)) {
kEvent = KeyEvent.KEYCODE_DPAD_LEFT;
kEvent = KeyEvent.KEYCODE_DPAD_RIGHT;
onKeyDown(kEvent, null);
} &&&&& & 2)在适配类
GalleryIndexAdapter主要完成幻灯片的循环播放,在getCount里面返回值返回Integer.MAX_VALUE,然后在getView里面根据position与传进来初始图片个数进行余数计算得到每次循环到哪张图片。部分代码如下:
public int getCount() {
// TODO Auto-generated method stub
return Integer.MAX_VALUE;
public View getView(int position, View convertView, ViewGroup arg2) {
// TODO Auto-generated method stub
ImageView imageView = new ImageView(context);
imageView.setBackgroundResource(imagList.get(position%imagList.size()));
imageView.setScaleType(ScaleType.FIT_XY);
imageView.setLayoutParams(new Gallery.LayoutParams(Gallery.LayoutParams.FILL_PARENT
, Gallery.LayoutParams.WRAP_CONTENT));
return imageV
& & 3)在可视界面里面实现逻辑控制,通过定时器定时刷新幻灯片,定时器通过定时发送消息,消息接受处理机制接收到消息之后,就模拟滑动事件,调用Gallery的onFling方法实现图片自动切换效果。选择按钮的显示效果(RadioButton)需要在Gallery的setOnItemSelectedListener进行处理。&&
//定时器和事件处理5秒刷新一次幻灯片
/** 展示图控制器,实现展示图切换 */
final Handler handler_gallery = new Handler() {
public void handleMessage(Message msg) {
/* 自定义屏幕按下的动作 */
MotionEvent e1 = MotionEvent.obtain(SystemClock.uptimeMillis(),
SystemClock.uptimeMillis(), MotionEvent.ACTION_UP,
89.333336f, 265.33334f, 0);
/* 自定义屏幕放开的动作 */
MotionEvent e2 = MotionEvent.obtain(SystemClock.uptimeMillis(),
SystemClock.uptimeMillis(), MotionEvent.ACTION_DOWN,
300.0f, 238.00003f, 0);
myGallery.onFling(e2, e1, -800, 0);
/* 给gallery添加按下和放开的动作,实现自动滑动 */
super.handleMessage(msg);
protected void onResume() {
autogallery();
super.onResume();
private void autogallery() {
/* 设置定时器,每5秒自动切换展示图 */
Timer time = new Timer();
TimerTask task = new TimerTask() {
public void run() {
Message m = new Message();
handler_gallery.sendMessage(m);
time.schedule(task, );
//指示按钮和gallery初始化过程以及事件监听添加过程
void init(){
myGallery = (DetailGallery)findViewById(R.id.myGallery);
gallery_points = (RadioGroup) this.findViewById(R.id.galleryRaidoGroup);
ArrayList&Integer& list = new ArrayList&Integer&();
list.add(R.drawable.banner1);
list.add(R.drawable.banner2);
list.add(R.drawable.banner3);
list.add(R.drawable.banner4);
GalleryIndexAdapter adapter = new GalleryIndexAdapter(list, context);
myGallery.setAdapter(adapter);
//设置小按钮
gallery_point = new RadioButton[list.size()];
for (int i = 0; i & gallery_point. i++) {
layout = (LinearLayout) inflater.inflate(R.layout.gallery_icon, null);
gallery_point[i] = (RadioButton) layout.findViewById(R.id.gallery_radiobutton);
gallery_point[i].setId(i);/* 设置指示图按钮ID */
int wh = Tool.dp2px(context, 10);
RadioGroup.LayoutParams layoutParams = new RadioGroup.LayoutParams(wh, wh); // 设置指示图大小
gallery_point[i].setLayoutParams(layoutParams);
layoutParams.setMargins(4, 0, 4, 0);// 设置指示图margin值
gallery_point[i].setClickable(false);/* 设置指示图按钮不能点击 */
layout.removeView(gallery_point[i]);//一个子视图不能指定了多个父视图
gallery_points.addView(gallery_point[i]);/* 把已经初始化的指示图动态添加到指示图的RadioGroup中 */
//添加事件
void addEvn(){
myGallery.setOnItemSelectedListener(new OnItemSelectedListener() {
public void onItemSelected(AdapterView&?& arg0, View arg1,
int arg2, long arg3) {
// TODO Auto-generated method stub
gallery_points.check(gallery_point[arg2%gallery_point.length].getId());
public void onNothingSelected(AdapterView&?& arg0) {
// TODO Auto-generated method stub
& & (2)商品图片滑动实现过程: &&&&& & 图片滑动效果和上面的幻灯片效果非常的类似,只是在逻辑处理和界面上有一些小小的区别。 &&&&& & 1)适配器类GalleryAdapter.java上面进行了图片缩放处理,节省了内存开销,又可把图片按照自己的要求缩放。
//由于是测试case,所以图片都是写死的为了区别,在position = 1的时候换了一张图片
public View getView(int position, View convertView, ViewGroup parent) {
// TODO Auto-generated method stub
ImageView imageView = (ImageView) LayoutInflater.from(context).inflate(R.layout.img,
Bitmap bitmap =
if(position == 1 ){
bitmap = BitmapFactory.decodeStream(assetManager.open("xpic11247_s.jpg"));
imageView.setTag("xpic11247_s.jpg");
bitmap = BitmapFactory.decodeStream(assetManager.open("item0_pic.jpg"));
imageView.setTag("item0_pic.jpg");
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
// 加载图片之前进行缩放
int width = bitmap.getWidth();
int height = bitmap.getHeight();
float newHeight = 200;
float newWidth = width*newHeight/
float scaleWidth = ((float) newWidth) /
float scaleHeight = ((float) newHeight) /
// 取得想要缩放的matrix参数
Matrix matrix = new Matrix();
matrix.postScale(scaleWidth, scaleHeight);
// 得到新的图片
Bitmap newbm = Bitmap.createBitmap(bitmap, 0, 0, width, height, matrix, true);
System.out.println(newbm.getHeight()+"-----------"+newbm.getWidth());
imageView.setImageBitmap(newbm);
return imageV
& & 2)添加了一个相框效果,如果图片加载失败,就会出现一个图片压缩之后大小相等的相框图片。 &?xml version="1.0" encoding="utf-8"?&
&ImageView xmlns:android="/apk/res/android"
android:id="@+id/waterfall_image"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/image_border"
&/ImageView&
三、开发中遇到一些问题 & & (1)layout.removeView(gallery_point[i]);//一个子视图不能指定了多个父视图 &&&&& & 如果需要把当前子childview添加到另外一个view里面去,则必须在当前的父View里面移除掉当前的childView,如果不进行这样处理则会抛出Caused by: java.lang.IllegalStateException异常,提示The specified child already has a parent. You must call removeView() on the child's parent first. & & (2)在进行图片缩放的时候,记得处理好dp和px直接的转换。
1)">1)">1" ng-class="{current:{{currentPage==page}}}" ng-repeat="page in pages"><li class='page' ng-if="(endIndex<li class='page next' ng-if="(currentPage
相关文章阅读}

我要回帖

更多关于 手机gallery文件夹 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信