栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 移动开发 > Android

android书架效果实现原理与代码

Android 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

android书架效果实现原理与代码

以前也模仿者ireader实现了书架的效果,但是那种是使用listview实现的,并不好用。绝大多数都是用gridview实现的,网上这方面资料比较少,有些开源的电子书都是重点做了阅读,并没有像ireader和QQ阅读这样的书架效果。

书架这种效果我早就实现了,本来想做一个完美的电子书,但是因为自己的懒惰,仅仅持续了一两天,今天又找到了以前的代码分享出来,希望大家能一起实现一个比较完美的开源的电子书。废话不多说先看下效果:
 
本地部分还没有做,做好以后就可以吧本地的书加载到书架里了,这只是一个开始,后面还有很多复杂的没有做。
下面先看一下书架的实现原理吧!
首先看一下layout下的布局文件main.xml
复制代码 代码如下:

xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>

android:id="@+id/bookShelf"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_below="@id/head"
android:cacheColorHint="#00000000"
android:columnWidth="90.0dip"
android:fadingEdge="none"
android:horizontalSpacing="5dp"
android:listSelector="#00000000"
android:numColumns="3"
android:scrollbars="none"
android:verticalSpacing="20dp"/>

android:id="@+id/sliding"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:content="@+id/allApps"
android:handle="@+id/imageViewIcon"
android:orientation="vertical">

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/165657.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号