android 仿QQ相册

TelegramGallery

项目地址: TelegramGallery
简介:世界级相册选择器,快速,低耗,响应快速,无依赖。抽取自 Telegram,扩展了 QQ 相册选择风格

English | 中文

Fast,efficiently,low memory selector of album,extract from Telegram. Support singleSelection, Multiselect, photo preview,scalable ,sliding to quit preview,QQ pick style.


Getting Started

configuration

    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>

    <activity android:name="com.tangxiaolv.telegramgallery.GalleryActivity" />

Usage

//open album
GalleryActivity.openActivity(
            Activity activity,
            //Filter the specified type, Follow the rule of standard of mime type 。eg:new String[]{"image/gif","image/png"}
            String[] filterMimeTypes,
            //true:singleSelection,false: Multiselect
            boolean singlePhoto,
            //limit for pick photo nums,when singlePhoto=false,the param is available
            int limitPickPhoto,
            int requestCode)

//or
GalleryActivity.openActivity(Activity activity, boolean singlePhoto, int limitPickPhoto,int requestCode)

//or
GalleryActivity.openActivity(Activity activity, boolean singlePhoto, int requestCode)

//process result
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {

    //list of photos of seleced
    List<String> photos = (List<String>) data.getSerializableExtra(GalleryActivity.PHOTOS);

    //list of videos of seleced
    List<String> vides = (List<String>) data.getSerializableExtra(GalleryActivity.VIDEOS);
}

License

Copyright 2016 TangXiaoLv

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta content="IE=7.0000" http-equiv="X-UA-Compatible"> <title>jquery 访QQ相册</title> <meta content="text/html; charset=utf-8" http-equiv=content-type> <script type=text/javascript src="js/jquery.js"></script> <script type=text/javascript src="js/images.js"></script> <style type="text/css"> * {line-height: 150%} .image {text-align: center; line-height: 590px; margin: 30px auto 0px; width: 850px; height: 620px} .image img { overflow:hidden} img {border:0px} #photo_content {text-align: center} .container {margin: 20px 0 0 0; width: 960px} div#container {z-index: -2; background: #fff; border-top: #fff 1px solid} body {margen: 0px; padding: 0px; } ul {margin: 0px; padding:0px;} li {margin: 0px; padding:0px;} .wrap { text-align: left; margin: 0px auto} #wrap {padding-bottom: 10px; background-color: #fff; min-height: 450px; clear: both; } .wrap {width: 960px} .switch {margin: 0px auto; width: 708px; background: url(images/switch_link_11.jpg) no-repeat center 0px; height: 87px} .clear {clear: both} .icon1 {text-indent: -9999px;padding: 30px 0 0 18px; width: 15px; display: inline; float: left;} .icon1 a {width: 15px; display: block; background: url(images/sprite.gif) no-repeat -693px -92px; height: 30px} .icon1 a:hover {background: url(images/sprite.gif) no-repeat -693px -132px} .icon2 {text-indent: -9999px; width: 15px; float: right; padding:30px 15px 0 0;} .icon2 a {width: 15px; display: block; background: url(images/sprite.gif) no-repeat -670px -92px; height: 30px} .icon2 a:hover {background: url(images/sprite.gif) no-repeat -670px -132px} .switch_center {width: 585px; float: left; height: 83px; margin-left: 28px; overflow: hidden} .switch_center ul {} .switch_center li {width: 66px; display: inline; float: left; height: 66px; margin:0 20px 0 0; padding: 10px 0 0 0} .switch_center li a {border: #ccc 1px solid;width: 60px; display: block; height: 60px;} .switch_center li a img {width: 60px; height: 60px} .switch_center li a.on {border: #ff9900 1px solid} .switch_center li a:hover {border: #ff9900 1px solid;} .clear {clear: both} .loading {line-height:520px; width:850px; background: url(images/loading.gif) #333 no-repeat center center; height: 520px} </style> </head> <body> <div id="wrap" class="wrap"> <div id="page3"> <div id="photo_content"> <div class="container"> <div class="switch"> <div class="icon1"> <a onFocus="this.blur();" title="上一个" href="javascript:void(0);">上一个</a> </div> <div id="pics" class="switch_center"> <ul> <li><a title="" href="javascript:void(0);"><img alt="" src="pics/1.jpg"></a></li> <li><a title="" href="javascript:void(0);"><img alt="" src="pics/2.jpg"></a></li> <li><a title="" href="javascript:void(0);"><img alt="" src="pics/3.jpg"></a></li> <li><a title="" href="javascript:void(0);"><img alt="" src="pics/4.jpg"></a></li> <li><a title="" href="javascript:void(0);"><img alt="" src="pics/5.jpg"></a></li> <li><a title="" href="javascript:void(0);"><img alt="" src="pics/6.jpg"></a></li> <li><a title="" href="javascript:void(0);"><img alt="" src="pics/7.jpg"></a></li> <li><a title="" href="javascript:void(0);"><img alt="" src="pics/8.jpg"></a></li> <li><a title="" href="javascript:void(0);"><img alt="" src="pics/9.jpg"></a></li> <li><a title="" href="javascript:void(0);"><img alt="" src="pics/10.jpg"></a></li> <li><a title="" href="javascript:void(0);"><img alt="" src="pics/11.jpg"></a></li> <li><a title="" href="javascript:void(0);"><img alt="" src="pics/12.jpg"></a></li> <li><a title="" href="javascript:void(0);"><img alt="" src="pics/13.jpg"></a></li> <li><a title="" href="javascript:void(0);"><img alt="" src="pics/14.jpg"></a></li> <li><a title="" href="javascript:void(0);"><img alt="" src="pics/15.jpg"></a></li> <li><a title="" href="javascript:void(0);"><img alt="" src="pics/16.jpg"></a></li> <li><a title="" href="javascript:void(0);"><img alt="" src="pics/17.jpg"></a></li> <li><a title="" href="javascript:void(0);"><img alt="" src="pics/18.jpg"></a></li> <li><a title="" href="javascript:void(0);"><img alt="" src="pics/19.jpg"></a></li> </ul> </div> <div class="icon2"><a onFocus="this.blur();" title="下一个" href="javascript:void(0);">下一个</a></div> <div class="clear"></div> </div> <div id="bigpics" class="image" title=""><IMG id=scollimg src="pics/1.jpg"></div> </div> </div> </div> </div> </body> </html>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值