package go.qianfeng.ui;
import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.Button;
import android.widget.ListView;
import android.widget.Toast;
public class ReaderActivity extends Activity {
private ShelfAdapter mAdapter;
private Button shelf_image_button;
private ListView shelf_list;
private Button button_1 , button_2 , button_3;
@ Override
public void onCreate ( Bundle savedInstanceState ) {
super.onCreate ( savedInstanceState );
setContentView ( R.layout.shelf );
init ();
mAdapter = new ShelfAdapter ();//new adapter对象才能用
shelf_list.setAdapter ( mAdapter );
}
private void init () {
shelf_image_button = ( Button ) findViewById ( R.id.shelf_image_button );
shelf_list = ( ListView ) findViewById ( R.id.shelf_list );
}
public class ShelfAdapter extends BaseAdapter {
int[ ] size = new int[ 10 ];//假设数据
public ShelfAdapter () {
}
@ Override
public int getCount () {
if ( size.length > 3 ) {
return size.length;
} else {
return 3;
}
}
@ Override
public Object getItem ( int position ) {
return size[ position ];
}
@ Override
public long getItemId ( int position ) {
return position;
}
@ Override
public View getView ( int position , View convertView , ViewGroup parent ) {
LayoutInflater layout_inflater = ( LayoutInflater ) ReaderActivity.this.getSystemService ( Context.LAYOUT_INFLATER_SERVICE );
View layout = layout_inflater.inflate ( R.layout.shelf_list_item , null );
Button button_1 , button_2 , button_3;
button_1 = ( Button ) layout.findViewById ( R.id.button_1 );
button_2 = ( Button ) layout.findViewById ( R.id.button_2 );
button_3 = ( Button ) layout.findViewById ( R.id.button_3 );
button_1.setOnClickListener ( new ButtonOnClick () );
button_2.setOnClickListener ( new ButtonOnClick () );
button_3.setOnClickListener ( new ButtonOnClick () );
return layout;
}
};
public class ButtonOnClick implements OnClickListener {
@ Override
public void onClick ( View v ) {
switch ( v.getId () ) {
case R.id.button_1 :
Toast.makeText ( ReaderActivity.this , "button1" , Toast.LENGTH_SHORT ).show ();
break;
case R.id.button_2 :
Toast.makeText ( ReaderActivity.this , "button2" , Toast.LENGTH_SHORT ).show ();
break;
case R.id.button_3 :
Toast.makeText ( ReaderActivity.this , "button3" , Toast.LENGTH_SHORT ).show ();
break;
}
}
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
Android应用源码之仿ireader书架.zip项目安卓应用源码下载
共61个文件
png:36个
class:9个
xml:7个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 181 浏览量
2022-03-08
13:57:50
上传
评论
收藏 839KB ZIP 举报
温馨提示
Android应用源码之仿ireader书架.zip项目安卓应用源码下载Android应用源码之仿ireader书架.zip项目安卓应用源码下载 1.适合学生毕业设计研究参考 2.适合个人学习研究参考 3.适合公司开发项目技术参考
资源推荐
资源详情
资源评论
收起资源包目录
Android应用源码之仿ireader书架.zip (61个子文件)
Android应用源码之仿ireader书架
Android应用源码之仿ireader书架
qianfeng_reader
AndroidManifest.xml 689B
res
layout
bookshelfitem.xml 580B
shelf_list_item.xml 2KB
shelf.xml 1KB
main.xml 368B
drawable-ldpi
ic_launcher.png 2KB
drawable-mdpi
ic_launcher.png 3KB
drawable-hdpi
head_right.png 118B
bookshelf_goto_bookcity_0.xml 321B
bookshelf_header_logo.png 4KB
head_left.png 118B
bookshelf_layer.png 384B
bookshelf_goto_bookcity_f.png 8KB
cover_pdb.png 11KB
cover_ebk.png 11KB
bookshelf_layer_right.png 4KB
bookshelf_layer_center.png 70KB
cover_epub.png 11KB
bookshelf_header_bg.png 19KB
bookshelf_goto_bookcity.png 8KB
default_cover.png 31KB
bookshelf_layer_left.png 4KB
ic_launcher.png 4KB
guide.png 9KB
values
strings.xml 175B
proguard.cfg 1KB
src
go
qianfeng
ui
ReaderActivity.java 3KB
bin
classes
go
qianfeng
ui
ReaderActivity.class 1KB
R.class 503B
R$layout.class 487B
R$attr.class 328B
R$id.class 706B
R$string.class 415B
ReaderActivity$ButtonOnClick.class 1KB
ReaderActivity$ShelfAdapter.class 2KB
R$drawable.class 1KB
res
drawable-ldpi
ic_launcher.png 2KB
drawable-mdpi
ic_launcher.png 2KB
drawable-hdpi
head_right.png 118B
bookshelf_header_logo.png 4KB
head_left.png 118B
bookshelf_layer.png 384B
bookshelf_goto_bookcity_f.png 8KB
cover_pdb.png 11KB
cover_ebk.png 11KB
bookshelf_layer_right.png 4KB
bookshelf_layer_center.png 70KB
cover_epub.png 11KB
bookshelf_header_bg.png 19KB
bookshelf_goto_bookcity.png 8KB
default_cover.png 31KB
bookshelf_layer_left.png 4KB
ic_launcher.png 4KB
guide.png 9KB
classes.dex 5KB
resources.ap_ 208KB
qianfeng_reader.apk 213KB
.classpath 364B
project.properties 360B
.project 851B
gen
go
qianfeng
ui
R.java 2KB
共 61 条
- 1
资源评论
yxkfw
- 粉丝: 76
- 资源: 2万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功