update protype
This commit is contained in:
parent
be44e336d3
commit
e1097dcd30
|
@ -1,6 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.deiniu.zhuike">
|
||||
|
||||
<!-- To access Google+ APIs: -->
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
|
@ -14,6 +15,23 @@
|
|||
android:supportsRtl="true"
|
||||
android:theme="@style/ToolBarTheme"
|
||||
android:usesCleartextTraffic="true">
|
||||
<activity
|
||||
android:name=".Activity_shudan"
|
||||
android:label="@string/title_activity_shudan"
|
||||
android:parentActivityName=".Main2Activity"
|
||||
android:theme="@style/ToolBarTheme.NoActionBar" />
|
||||
<activity
|
||||
android:name=".Activity_cate_books"
|
||||
android:label="@string/title_activity_cate_books"
|
||||
android:launchMode="singleTask"
|
||||
android:parentActivityName=".activity_cates"
|
||||
android:theme="@style/ToolBarTheme.NoActionBar" />
|
||||
<activity
|
||||
android:name=".activity_cates"
|
||||
android:label="@string/title_activity_cates"
|
||||
android:launchMode="singleTask"
|
||||
android:parentActivityName=".Main2Activity"
|
||||
android:theme="@style/ToolBarTheme.NoActionBar" />
|
||||
<activity
|
||||
android:name=".Main7Activity"
|
||||
android:label="@string/title_activity_main7"
|
||||
|
@ -22,13 +40,13 @@
|
|||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value=".Activity_paihangbang" />
|
||||
<!-- meta tag and intent filter go into results activity -->
|
||||
<meta-data android:name="android.app.searchable"
|
||||
<meta-data
|
||||
android:name="android.app.searchable"
|
||||
android:resource="@xml/searchable" />
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.SEARCH" />
|
||||
</intent-filter>
|
||||
|
||||
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".ScrollingActivity"
|
||||
|
@ -43,9 +61,10 @@
|
|||
android:name=".Activity_paihangbang"
|
||||
android:label="@string/title_activity_paihangbang"
|
||||
android:parentActivityName=".Main2Activity"
|
||||
android:theme="@style/ToolBarTheme.NoActionBar" >
|
||||
<meta-data android:name="android.app.default_searchable"
|
||||
android:value=".Main7Activity"/>
|
||||
android:theme="@style/ToolBarTheme.NoActionBar">
|
||||
<meta-data
|
||||
android:name="android.app.default_searchable"
|
||||
android:value=".Main7Activity" />
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".Main5Activity"
|
||||
|
@ -65,8 +84,10 @@
|
|||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
<meta-data android:name="android.app.default_searchable"
|
||||
android:value=".Main7Activity"/>
|
||||
|
||||
<meta-data
|
||||
android:name="android.app.default_searchable"
|
||||
android:value=".Main7Activity" />
|
||||
</activity>
|
||||
</application>
|
||||
|
||||
|
|
|
@ -0,0 +1,88 @@
|
|||
package com.deiniu.zhuike;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.design.widget.FloatingActionButton;
|
||||
import android.support.design.widget.Snackbar;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.app.FragmentPagerAdapter;
|
||||
import android.support.v4.view.ViewPager;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
|
||||
import com.flyco.tablayout.SlidingTabLayout;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
|
||||
public class Activity_cate_books extends AppCompatActivity {
|
||||
|
||||
public static String TAG="com.deiniu.zhuike.Activity_cate_books";
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_cate_books);
|
||||
Toolbar toolbar = findViewById(R.id.toolbar);
|
||||
setSupportActionBar(toolbar);
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
ButterKnife.bind(this);
|
||||
String title = getIntent().getStringExtra("CATENAME");
|
||||
this.setTitle(title);
|
||||
|
||||
initTabs();
|
||||
|
||||
}
|
||||
//---------tabs-------------
|
||||
|
||||
@BindView(R.id.viewpager)
|
||||
ViewPager mViewpager;
|
||||
@BindView(R.id.tab_layout)
|
||||
SlidingTabLayout tabLayout;
|
||||
|
||||
private ArrayList<Fragment> mFragments;
|
||||
ArrayList<View> mList;
|
||||
String[] mTitle;
|
||||
void initTabs() {
|
||||
|
||||
if(mFragments ==null || mFragments.size() ==0){
|
||||
mTitle = new String[]{"最热", "最新", "评分","完结"};
|
||||
mFragments = new ArrayList<>();
|
||||
mFragments.add(new Fragment_shudan_list());
|
||||
mFragments.add(new Fragment_shudan_list());
|
||||
mFragments.add(new Fragment_shudan_list());
|
||||
mFragments.add(new Fragment_shudan_list());
|
||||
Log.d(TAG,"initial fragments in tabs ");
|
||||
}
|
||||
Log.d(TAG,"set viewPager adapter ");
|
||||
// FragmentPagerAdapter mAdapter = new FragmentPagerAdapter(activity.getSupportFragmentManager()) { 第一次进入没问题,再次进入ViewPager的fragment时里面内容就没了,数据丢失 https://blog.csdn.net/allan_bst/article/details/64920076
|
||||
FragmentPagerAdapter mAdapter = new FragmentPagerAdapter(getSupportFragmentManager()) {
|
||||
@Override
|
||||
public Fragment getItem(int position) {
|
||||
return mFragments.get(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCount() {
|
||||
return mFragments.size();
|
||||
}
|
||||
//ViewPager与TabLayout绑定后,这里获取到PageTitle就是Tab的Text
|
||||
@Override
|
||||
public CharSequence getPageTitle(int position) {
|
||||
return mTitle[position];
|
||||
}
|
||||
};
|
||||
mViewpager.setAdapter(mAdapter);
|
||||
|
||||
|
||||
tabLayout.setViewPager(mViewpager);
|
||||
// tabLayout.setViewPager(mViewpager, mTitle, activity, mFragments);
|
||||
mViewpager.setCurrentItem(0);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -72,9 +72,9 @@ public static String TAG ="com.deiniu.zhuike.paihangbang";
|
|||
if(mFragments ==null || mFragments.size() ==0){
|
||||
mTitle = new String[]{"周榜", "月榜", "总榜"};
|
||||
mFragments = new ArrayList<>();
|
||||
mFragments.add(new Fragment_shudan_list());
|
||||
mFragments.add(new Fragment_shudan_list());
|
||||
mFragments.add(new Fragment_shudan_list());
|
||||
mFragments.add(new Fragment_booklist());
|
||||
mFragments.add(new Fragment_booklist());
|
||||
mFragments.add(new Fragment_booklist());
|
||||
|
||||
}
|
||||
Log.d(TAG,"set viewPager adapter ");
|
||||
|
|
|
@ -0,0 +1,216 @@
|
|||
package com.deiniu.zhuike;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.design.widget.FloatingActionButton;
|
||||
import android.support.design.widget.Snackbar;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
|
||||
import com.deiniu.zhuike.utils.OnItemClickListener;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
|
||||
public class Activity_shudan extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_shudan);
|
||||
Toolbar toolbar = findViewById(R.id.toolbar);
|
||||
setSupportActionBar(toolbar);
|
||||
setSupportActionBar(toolbar);
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
ButterKnife.bind(this);
|
||||
String title = getIntent().getStringExtra("CATENAME");
|
||||
this.setTitle(title);
|
||||
initData();
|
||||
mAdapter = new BookListAdapter(this ,mDatas,R.layout.recycle_list_item_horizon,new OnItemClickListener()
|
||||
{
|
||||
|
||||
@Override
|
||||
public void onItemClick(View view, int position)
|
||||
{
|
||||
showBook("射雕" +position);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemLongClick(View view, int position)
|
||||
{
|
||||
// initDialog(position);
|
||||
// mAdapter.removeData(position);
|
||||
}
|
||||
@Override
|
||||
public void onLinearOutClick(View view, int bookId) {
|
||||
// Toast.makeText(activity, "book "+ bookId + " clicked", Toast.LENGTH_SHORT).show();
|
||||
|
||||
// showBookDetail( mData.get(bookId));
|
||||
}
|
||||
});
|
||||
initialBookList();
|
||||
|
||||
|
||||
}
|
||||
|
||||
//------------------------列表绑定------------
|
||||
|
||||
private BookListAdapter mAdapter;
|
||||
|
||||
@BindView(R.id.recycleViewBookList)
|
||||
RecyclerView rvshudan;
|
||||
List<String> mDatas;
|
||||
private void initData() {
|
||||
|
||||
mDatas = new ArrayList<String>();
|
||||
for (int i = 'A'; i <'K'; i++)
|
||||
{
|
||||
mDatas.add("小说" + (char) i);
|
||||
}
|
||||
}
|
||||
void initialBookList() {
|
||||
rvshudan.setLayoutManager(new LinearLayoutManager(this));
|
||||
rvshudan.setAdapter(mAdapter);
|
||||
|
||||
|
||||
}
|
||||
class MyViewHolder extends RecyclerView.ViewHolder {
|
||||
@BindView(R.id.title)
|
||||
TextView tvTitle;
|
||||
@BindView(R.id.author)
|
||||
TextView tvAuthor;
|
||||
@BindView(R.id.category)
|
||||
TextView tvCate;
|
||||
@BindView(R.id.desc)
|
||||
TextView tvDesc;
|
||||
|
||||
|
||||
public MyViewHolder(View view) {
|
||||
super(view);
|
||||
ButterKnife.bind(this, view);
|
||||
//tvTitle = (TextView) view.findViewById(R.id.title);
|
||||
// tvAuthor = (TextView) view.findViewById(R.id.author);
|
||||
|
||||
}
|
||||
}
|
||||
void showBook(String bookName) { //show paihangbang activity
|
||||
Intent intent = new Intent(this, BookActivity.class);
|
||||
intent.putExtra("BOOKNAME",bookName);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
class BookListAdapter extends RecyclerView.Adapter<MyViewHolder> {
|
||||
private final int EMPTY_VIEW = 1;
|
||||
private final int PROGRESS_VIEW = 2;
|
||||
private final int IMAGE_VIEW = 3;
|
||||
|
||||
private Context context;
|
||||
private List<String> mDatas = new ArrayList<String>();
|
||||
private OnItemClickListener mOnItemClickListener;
|
||||
private int listItemID;
|
||||
|
||||
public BookListAdapter(Context context, List<String> mDatas, int listItemID, OnItemClickListener clicklistener) {
|
||||
this.context = context;
|
||||
this.mDatas = mDatas;
|
||||
this.mOnItemClickListener = clicklistener;
|
||||
this.listItemID = listItemID;
|
||||
}
|
||||
|
||||
public BookListAdapter(Context context, OnItemClickListener clickLitener) {
|
||||
this.context = context;
|
||||
this.mOnItemClickListener = clickLitener;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemViewType(int position) {
|
||||
if (mDatas.size() == 0) {
|
||||
return EMPTY_VIEW;
|
||||
} else if (mDatas.get(position) == null) {
|
||||
return PROGRESS_VIEW;
|
||||
} else {
|
||||
return super.getItemViewType(position);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||
MyViewHolder holder = new MyViewHolder(LayoutInflater.from(
|
||||
context).inflate(listItemID, parent,
|
||||
false));
|
||||
return holder;
|
||||
}
|
||||
|
||||
|
||||
public void setParameters(List<String> mDatas, int listItemID) {
|
||||
this.mDatas = mDatas;
|
||||
this.listItemID = listItemID;
|
||||
}
|
||||
|
||||
public void setOnItemClickLitener(OnItemClickListener mOnItemClickListener) {
|
||||
this.mOnItemClickListener = mOnItemClickListener;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(MyViewHolder holder, int position) {
|
||||
|
||||
holder.tvTitle.setText(mDatas.get(position));
|
||||
holder.tvAuthor.setText("金庸" + position);
|
||||
holder.tvCate.setText("cate" + position);
|
||||
holder.tvDesc.setText("this is desc " + position);
|
||||
|
||||
|
||||
// 如果设置了回调,则设置点击事件
|
||||
if (mOnItemClickListener != null) {
|
||||
holder.itemView.setOnClickListener(new View.OnClickListener() //show more cate paihang
|
||||
{
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
int pos = holder.getLayoutPosition();
|
||||
mOnItemClickListener.onItemClick(holder.itemView, pos);
|
||||
}
|
||||
});
|
||||
|
||||
holder.itemView.setOnLongClickListener(new View.OnLongClickListener() {
|
||||
@Override
|
||||
public boolean onLongClick(View v) {
|
||||
int pos = holder.getLayoutPosition();
|
||||
mOnItemClickListener.onItemLongClick(holder.itemView, pos);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return mDatas.size();
|
||||
}
|
||||
|
||||
public void addData(int position) {
|
||||
mDatas.add(position, "Insert One");
|
||||
notifyItemInserted(position);
|
||||
}
|
||||
|
||||
public void removeData(int position) {
|
||||
mDatas.remove(position);
|
||||
notifyItemRemoved(position);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -21,6 +21,8 @@ import android.widget.LinearLayout;
|
|||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.deiniu.zhuike.utils.OnItemClickListener;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
@ -93,13 +95,13 @@ public abstract class BasicFragment extends Fragment {
|
|||
|
||||
|
||||
//--------------------------------------------------------------book list adapter------------------------------------------------
|
||||
interface OnItemClickLitener
|
||||
/* interface mOnItemClickListener
|
||||
{
|
||||
void onItemClick(View view, int position);
|
||||
void onItemLongClick(View view , int position);
|
||||
void onLinearOutClick(View view,int bookId);
|
||||
}
|
||||
|
||||
*/
|
||||
class BookListAdapter extends RecyclerView.Adapter<BookListAdapter.MyViewHolder> {
|
||||
private final int EMPTY_VIEW = 1;
|
||||
private final int PROGRESS_VIEW = 2;
|
||||
|
@ -107,17 +109,17 @@ public abstract class BasicFragment extends Fragment {
|
|||
|
||||
private Context context;
|
||||
private List<String> mDatas = new ArrayList<String>();
|
||||
private OnItemClickLitener mOnItemClickLitener;
|
||||
private OnItemClickListener mOnItemClickListener;
|
||||
private int listItemID;
|
||||
public BookListAdapter(Context context,List<String> mDatas,int listItemID,OnItemClickLitener clickLitener) {
|
||||
public BookListAdapter(Context context,List<String> mDatas,int listItemID,OnItemClickListener clickLitener) {
|
||||
this.context = context;
|
||||
this.mDatas = mDatas;
|
||||
this.mOnItemClickLitener = clickLitener;
|
||||
this.mOnItemClickListener = clickLitener;
|
||||
this.listItemID = listItemID;
|
||||
}
|
||||
public BookListAdapter(Context context, OnItemClickLitener clickLitener) {
|
||||
public BookListAdapter(Context context, OnItemClickListener clickLitener) {
|
||||
this.context = context;
|
||||
this.mOnItemClickLitener = clickLitener;
|
||||
this.mOnItemClickListener = clickLitener;
|
||||
|
||||
}
|
||||
|
||||
|
@ -148,9 +150,9 @@ public abstract class BasicFragment extends Fragment {
|
|||
this.listItemID = listItemID;
|
||||
}
|
||||
|
||||
public void setOnItemClickLitener(OnItemClickLitener mOnItemClickLitener)
|
||||
public void setOnItemClickLitener(OnItemClickListener mOnItemClickLitener)
|
||||
{
|
||||
this.mOnItemClickLitener = mOnItemClickLitener;
|
||||
this.mOnItemClickListener = mOnItemClickLitener;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -161,7 +163,7 @@ public abstract class BasicFragment extends Fragment {
|
|||
holder.tvCate.setText("cate"+position);
|
||||
holder.tvDesc.setText("this is desc " +position);
|
||||
// 如果设置了回调,则设置点击事件
|
||||
if (mOnItemClickLitener != null)
|
||||
if (mOnItemClickListener != null)
|
||||
{
|
||||
holder.itemView.setOnClickListener(new View.OnClickListener()
|
||||
{
|
||||
|
@ -169,7 +171,7 @@ public abstract class BasicFragment extends Fragment {
|
|||
public void onClick(View v)
|
||||
{
|
||||
int pos = holder.getLayoutPosition();
|
||||
mOnItemClickLitener.onItemClick(holder.itemView, pos);
|
||||
mOnItemClickListener.onItemClick(holder.itemView, pos);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -179,7 +181,7 @@ public abstract class BasicFragment extends Fragment {
|
|||
public boolean onLongClick(View v)
|
||||
{
|
||||
int pos = holder.getLayoutPosition();
|
||||
mOnItemClickLitener.onItemLongClick(holder.itemView, pos);
|
||||
mOnItemClickListener.onItemLongClick(holder.itemView, pos);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
@ -238,9 +240,21 @@ public abstract class BasicFragment extends Fragment {
|
|||
intent.putExtra("BOOKNAME",bookId);
|
||||
startActivity(intent);
|
||||
}
|
||||
void showShudanDetail(int shuandanId){
|
||||
Intent intent = new Intent(activity, Activity_shudan.class);
|
||||
intent.putExtra("SHUDANID",shuandanId);
|
||||
startActivity(intent);
|
||||
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------------book list adapter end--------------------------------------------------
|
||||
|
||||
void showPaihangbang(String type) { //show paihangbang activity
|
||||
|
||||
Intent intent = new Intent(activity, Activity_paihangbang.class);
|
||||
intent.putExtra("BANGNAME",type);
|
||||
startActivity(intent);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,21 +1,32 @@
|
|||
package com.deiniu.zhuike;
|
||||
|
||||
import android.animation.Animator;
|
||||
import android.animation.AnimatorListenerAdapter;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.design.widget.FloatingActionButton;
|
||||
import android.support.design.widget.Snackbar;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.deiniu.zhuike.utils.OnItemClickListener;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import io.alterac.blurkit.BlurKit;
|
||||
import io.alterac.blurkit.BlurLayout;
|
||||
|
||||
public class BookActivity extends AppCompatActivity {
|
||||
BookListAdapter mAdapter;
|
||||
// private BookListAdapter mAdapter;
|
||||
private List<String> mData;;
|
||||
|
||||
@BindView(R.id.rvBooklist)
|
||||
RecyclerView rvBooklist;
|
||||
// @BindView(R.id.blurLayout)
|
||||
// BlurLayout blurLayout;
|
||||
// private float movement = 150;
|
||||
|
@ -29,7 +40,26 @@ public class BookActivity extends AppCompatActivity {
|
|||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
String title = getIntent().getStringExtra("BOOKNAME");
|
||||
this.setTitle(title);
|
||||
mData =initData(mData,'D');
|
||||
mAdapter = new BookListAdapter(this, mData, R.layout.recycle_list_item_shudan, new OnItemClickListener() {
|
||||
|
||||
@Override
|
||||
public void onItemClick(View view, int position) {
|
||||
showBookDetail( mData.get(position));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemLongClick(View view, int position) {
|
||||
// initDialog(position);
|
||||
// mAdapter.removeData(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLinearOutClick(View view, int bookId) {
|
||||
|
||||
}
|
||||
});
|
||||
initialBookList();
|
||||
/*
|
||||
blurLayout.animate().translationY(movement).setDuration(1500).setListener(new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
|
@ -43,6 +73,30 @@ public class BookActivity extends AppCompatActivity {
|
|||
*/
|
||||
}
|
||||
|
||||
private void showBookDetail(String s) {
|
||||
Intent intent = new Intent(this, BookActivity.class);
|
||||
intent.putExtra("BOOKNAME",s);
|
||||
startActivity(intent);
|
||||
|
||||
}
|
||||
|
||||
private List<String> initData(List<String> mDatas, char z) {
|
||||
mDatas = new ArrayList<String>();
|
||||
for (int i = 'A'; i < z; i++)
|
||||
{
|
||||
mDatas.add("射雕" + (char) i);
|
||||
}
|
||||
return mDatas;
|
||||
}
|
||||
|
||||
//----------------绑定列表
|
||||
|
||||
|
||||
void initialBookList() {
|
||||
|
||||
rvBooklist.setLayoutManager(new LinearLayoutManager(this));
|
||||
rvBooklist.setAdapter(mAdapter);
|
||||
}
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
|
@ -63,4 +117,125 @@ public class BookActivity extends AppCompatActivity {
|
|||
super.onStop();
|
||||
// blurLayout.pauseBlur();
|
||||
}
|
||||
|
||||
class BookListAdapter extends RecyclerView.Adapter< BookListAdapter.MyViewHolder> {
|
||||
private final int EMPTY_VIEW = 1;
|
||||
private final int PROGRESS_VIEW = 2;
|
||||
private final int IMAGE_VIEW = 3;
|
||||
|
||||
private Context context;
|
||||
private List<String> mDatas = new ArrayList<String>();
|
||||
private OnItemClickListener mOnItemClickListener;
|
||||
private int listItemID;
|
||||
public BookListAdapter(Context context,List<String> mDatas,int listItemID,OnItemClickListener clickLitener) {
|
||||
this.context = context;
|
||||
this.mDatas = mDatas;
|
||||
this.mOnItemClickListener = clickLitener;
|
||||
this.listItemID = listItemID;
|
||||
}
|
||||
public BookListAdapter(Context context, OnItemClickListener clickLitener) {
|
||||
this.context = context;
|
||||
this.mOnItemClickListener = clickLitener;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemViewType(int position) {
|
||||
if(mDatas.size() == 0){
|
||||
return EMPTY_VIEW;
|
||||
} else if(mDatas.get(position) == null){
|
||||
return PROGRESS_VIEW;
|
||||
} else {
|
||||
return super.getItemViewType(position);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType)
|
||||
{
|
||||
BookListAdapter.MyViewHolder holder = new BookListAdapter.MyViewHolder(LayoutInflater.from(
|
||||
context).inflate(listItemID, parent,
|
||||
false));
|
||||
return holder;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setParameters(List<String> mDatas,int listItemID ) {
|
||||
this.mDatas = mDatas;
|
||||
this.listItemID = listItemID;
|
||||
}
|
||||
|
||||
public void setOnItemClickLitener(OnItemClickListener mOnItemClickLitener)
|
||||
{
|
||||
this.mOnItemClickListener = mOnItemClickLitener;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder( BookListAdapter.MyViewHolder holder, int position)
|
||||
{
|
||||
holder.tvTitle.setText(mDatas.get(position));
|
||||
holder.tvAuthor.setText("金庸" +position);
|
||||
holder.tvCate.setText("cate"+position);
|
||||
holder.tvDesc.setText("this is desc " +position);
|
||||
// 如果设置了回调,则设置点击事件
|
||||
if (mOnItemClickListener != null)
|
||||
{
|
||||
holder.itemView.setOnClickListener(new View.OnClickListener()
|
||||
{
|
||||
@Override
|
||||
public void onClick(View v)
|
||||
{
|
||||
int pos = holder.getLayoutPosition();
|
||||
mOnItemClickListener.onItemClick(holder.itemView, pos);
|
||||
}
|
||||
});
|
||||
|
||||
holder.itemView.setOnLongClickListener(new View.OnLongClickListener()
|
||||
{
|
||||
@Override
|
||||
public boolean onLongClick(View v)
|
||||
{
|
||||
int pos = holder.getLayoutPosition();
|
||||
mOnItemClickListener.onItemLongClick(holder.itemView, pos);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount()
|
||||
{
|
||||
return mDatas.size();
|
||||
}
|
||||
public void addData(int position) {
|
||||
mDatas.add(position, "Insert One");
|
||||
notifyItemInserted(position);
|
||||
}
|
||||
|
||||
public void removeData(int position) {
|
||||
mDatas.remove(position);
|
||||
notifyItemRemoved(position);
|
||||
}
|
||||
class MyViewHolder extends RecyclerView.ViewHolder
|
||||
{
|
||||
@BindView(R.id.title)
|
||||
TextView tvTitle;
|
||||
@BindView(R.id.author)
|
||||
TextView tvAuthor;
|
||||
@BindView(R.id.category)
|
||||
TextView tvCate;
|
||||
@BindView(R.id.desc)
|
||||
TextView tvDesc;
|
||||
public MyViewHolder(View view)
|
||||
{
|
||||
super(view);
|
||||
ButterKnife.bind(this, view);
|
||||
//tvTitle = (TextView) view.findViewById(R.id.title);
|
||||
// tvAuthor = (TextView) view.findViewById(R.id.author);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@ import android.view.ViewGroup;
|
|||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.deiniu.zhuike.utils.OnItemClickListener;
|
||||
import com.google.android.gms.plus.PlusOneButton;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -83,7 +84,7 @@ public class Fragment_Shelf extends BasicFragment {
|
|||
|
||||
initData();
|
||||
|
||||
mAdapter = new BookListAdapter(activity,mDatas,R.layout.recycle_list_item,new OnItemClickLitener()
|
||||
mAdapter = new BookListAdapter(activity,mDatas,R.layout.recycle_list_item,new OnItemClickListener()
|
||||
{
|
||||
|
||||
@Override
|
||||
|
@ -134,25 +135,7 @@ public class Fragment_Shelf extends BasicFragment {
|
|||
// mRecyclerView.setLayoutManager(new LinearLayoutManager(this.activity));
|
||||
mRecyclerView.setLayoutManager(new GridLayoutManager(activity,3));
|
||||
mRecyclerView.setAdapter(mAdapter );
|
||||
/*
|
||||
mAdapter.setOnItemClickLitener(new OnItemClickLitener()
|
||||
{
|
||||
|
||||
@Override
|
||||
public void onItemClick(View view, int position)
|
||||
{
|
||||
Toast.makeText(activity, position + " click",
|
||||
Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemLongClick(View view, int position)
|
||||
{
|
||||
initDialog(position);
|
||||
// mAdapter.removeData(position);
|
||||
}
|
||||
});
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -14,6 +14,8 @@ import android.widget.LinearLayout;
|
|||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.deiniu.zhuike.utils.OnItemClickListener;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -74,14 +76,14 @@ public class Fragment_bangdan extends BasicFragment {
|
|||
mParam2 = getArguments().getString(ARG_PARAM2);
|
||||
}
|
||||
initData();
|
||||
mAdapter = new MyListAdapter(activity ,mData,R.layout.recycle_list_item_bangdan,new OnItemClickLitener()
|
||||
mAdapter = new MyListAdapter(activity ,mData,R.layout.recycle_list_item_bangdan,new OnItemClickListener()
|
||||
{
|
||||
|
||||
@Override
|
||||
public void onItemClick(View view, int position)
|
||||
{
|
||||
showPaihangbang("分类名称" +position);
|
||||
|
||||
showBookDetail( mData.get(position));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -93,6 +95,7 @@ public class Fragment_bangdan extends BasicFragment {
|
|||
@Override
|
||||
public void onLinearOutClick(View view, int bookId) {
|
||||
// Toast.makeText(activity, "book "+ bookId + " clicked", Toast.LENGTH_SHORT).show();
|
||||
|
||||
showBookDetail( mData.get(bookId));
|
||||
}
|
||||
});
|
||||
|
@ -132,7 +135,7 @@ public class Fragment_bangdan extends BasicFragment {
|
|||
TAG ="com.deiniu.zhuike.Fragment_bangdan";
|
||||
}
|
||||
|
||||
|
||||
|
||||
class MyListAdapter extends RecyclerView.Adapter<MyListAdapter.MyViewHolder> {
|
||||
private final int EMPTY_VIEW = 1;
|
||||
private final int PROGRESS_VIEW = 2;
|
||||
|
@ -140,15 +143,15 @@ public class Fragment_bangdan extends BasicFragment {
|
|||
|
||||
private Context context;
|
||||
private List<String> mDatas = new ArrayList<String>();
|
||||
private OnItemClickLitener mOnItemClickLitener;
|
||||
private OnItemClickListener mOnItemClickLitener;
|
||||
private int listItemID;
|
||||
public MyListAdapter(Context context,List<String> mDatas,int listItemID,OnItemClickLitener clickLitener) {
|
||||
public MyListAdapter(Context context,List<String> mDatas,int listItemID,OnItemClickListener clickLitener) {
|
||||
this.context = context;
|
||||
this.mDatas = mDatas;
|
||||
this.mOnItemClickLitener = clickLitener;
|
||||
this.listItemID = listItemID;
|
||||
}
|
||||
public MyListAdapter(Context context, OnItemClickLitener clickLitener) {
|
||||
public MyListAdapter(Context context, OnItemClickListener clickLitener) {
|
||||
this.context = context;
|
||||
this.mOnItemClickLitener = clickLitener;
|
||||
|
||||
|
@ -181,7 +184,7 @@ public class Fragment_bangdan extends BasicFragment {
|
|||
this.listItemID = listItemID;
|
||||
}
|
||||
|
||||
public void setOnItemClickLitener(OnItemClickLitener mOnItemClickLitener)
|
||||
public void setOnItemClickLitener(OnItemClickListener mOnItemClickLitener)
|
||||
{
|
||||
this.mOnItemClickLitener = mOnItemClickLitener;
|
||||
}
|
||||
|
@ -191,24 +194,24 @@ public class Fragment_bangdan extends BasicFragment {
|
|||
{
|
||||
holder.tvCateName .setText("分类名称" +position);
|
||||
holder.tvTitle.setText(mDatas.get(position));
|
||||
holder.tvAuthor.setText("金庸" +position);
|
||||
holder.tvAuthor.setText("作者" +position);
|
||||
holder.tvCate.setText("cate"+position);
|
||||
holder.tvDesc.setText("this is desc " +position);
|
||||
|
||||
holder.tvTitle2.setText(mDatas.get(position));
|
||||
holder.tvAuthor2.setText("金庸2" +position);
|
||||
holder.tvTitle2.setText(mDatas.get(position) +1);
|
||||
holder.tvAuthor2.setText("作者2" +position);
|
||||
holder.tvCate2.setText("cate2"+position);
|
||||
holder.tvDesc2.setText("this is desc2 " +position);
|
||||
|
||||
holder.tvTitle3.setText(mDatas.get(position));
|
||||
holder.tvAuthor3.setText("金庸3-" +position);
|
||||
holder.tvTitle3.setText(mDatas.get(position)+2);
|
||||
holder.tvAuthor3.setText("作者3" +position);
|
||||
holder.tvCate3.setText("cate3-"+position);
|
||||
holder.tvDesc3.setText("this is desc3- " +position);
|
||||
|
||||
// 如果设置了回调,则设置点击事件
|
||||
if (mOnItemClickLitener != null)
|
||||
{
|
||||
holder.itemView.setOnClickListener(new View.OnClickListener()
|
||||
holder.itemView.setOnClickListener(new View.OnClickListener() //show more cate paihang
|
||||
{
|
||||
@Override
|
||||
public void onClick(View v)
|
||||
|
@ -230,7 +233,7 @@ public class Fragment_bangdan extends BasicFragment {
|
|||
});
|
||||
|
||||
|
||||
holder.ll1.setOnClickListener(new View.OnClickListener() {
|
||||
holder.ll1.setOnClickListener(new View.OnClickListener() { //show bookdetail
|
||||
@Override
|
||||
public void onClick(View v)
|
||||
{
|
||||
|
@ -239,7 +242,7 @@ public class Fragment_bangdan extends BasicFragment {
|
|||
}
|
||||
});
|
||||
|
||||
holder.ll2.setOnClickListener(new View.OnClickListener() {
|
||||
holder.ll2.setOnClickListener(new View.OnClickListener() { //show bookdetail
|
||||
@Override
|
||||
public void onClick(View v)
|
||||
{
|
||||
|
@ -248,7 +251,7 @@ public class Fragment_bangdan extends BasicFragment {
|
|||
}
|
||||
});
|
||||
|
||||
holder.ll3.setOnClickListener(new View.OnClickListener() {
|
||||
holder.ll3.setOnClickListener(new View.OnClickListener() { //show bookdetail
|
||||
@Override
|
||||
public void onClick(View v)
|
||||
{
|
||||
|
@ -319,6 +322,6 @@ public class Fragment_bangdan extends BasicFragment {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,142 @@
|
|||
package com.deiniu.zhuike;
|
||||
|
||||
import android.content.Context;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.deiniu.zhuike.utils.OnItemClickListener;
|
||||
import com.google.android.gms.plus.PlusOneButton;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
|
||||
/**
|
||||
* A fragment with a Google +1 button.
|
||||
* Activities that contain this fragment must implement the
|
||||
* {@link Fragment_booklist.OnFragmentInteractionListener} interface
|
||||
* to handle interaction events.
|
||||
* Use the {@link Fragment_booklist#newInstance} factory method to
|
||||
* create an instance of this fragment.
|
||||
*/
|
||||
public class Fragment_booklist extends BasicFragment {
|
||||
// TODO: Rename parameter arguments, choose names that match
|
||||
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
|
||||
private static final String ARG_PARAM1 = "param1";
|
||||
private static final String ARG_PARAM2 = "param2";
|
||||
// The request code must be 0 or greater.
|
||||
private static final int PLUS_ONE_REQUEST_CODE = 0;
|
||||
// The URL to +1. Must be a valid URL.
|
||||
|
||||
// TODO: Rename and change types of parameters
|
||||
private String mParam1;
|
||||
private String mParam2;
|
||||
|
||||
|
||||
public Fragment_booklist() {
|
||||
// Required empty public constructor
|
||||
}
|
||||
|
||||
/**
|
||||
* Use this factory method to create a new instance of
|
||||
* this fragment using the provided parameters.
|
||||
*
|
||||
* @param param1 Parameter 1.
|
||||
* @param param2 Parameter 2.
|
||||
* @return A new instance of fragment Fragment_booklist.
|
||||
*/
|
||||
// TODO: Rename and change types and number of parameters
|
||||
public static Fragment_booklist newInstance(String param1, String param2) {
|
||||
Fragment_booklist fragment = new Fragment_booklist();
|
||||
Bundle args = new Bundle();
|
||||
args.putString(ARG_PARAM1, param1);
|
||||
args.putString(ARG_PARAM2, param2);
|
||||
fragment.setArguments(args);
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
if (getArguments() != null) {
|
||||
mParam1 = getArguments().getString(ARG_PARAM1);
|
||||
mParam2 = getArguments().getString(ARG_PARAM2);
|
||||
}
|
||||
mData =initData(mData,'Z');
|
||||
mAdapter = new BookListAdapter(activity, mData, R.layout.recycle_list_item_shudan, new OnItemClickListener() {
|
||||
|
||||
@Override
|
||||
public void onItemClick(View view, int position) {
|
||||
showBookDetail( mData.get(position));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemLongClick(View view, int position) {
|
||||
// initDialog(position);
|
||||
// mAdapter.removeData(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLinearOutClick(View view, int bookId) {
|
||||
Toast.makeText(activity, "book " + bookId + " clicked",
|
||||
Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
// Inflate the layout for this fragment
|
||||
View view = inflater.inflate(R.layout.fragment_fragment_booklist, container, false);
|
||||
|
||||
//Find the +1 button
|
||||
ButterKnife.bind(this, view);
|
||||
|
||||
initialBookList();
|
||||
|
||||
return view;
|
||||
}
|
||||
//----------------绑定列表
|
||||
BasicFragment.BookListAdapter mAdapter;
|
||||
// private BookListAdapter mAdapter;
|
||||
private List<String> mData;;
|
||||
|
||||
@BindView(R.id.rvBooklist)
|
||||
RecyclerView rvBooklist;
|
||||
|
||||
void initialBookList() {
|
||||
|
||||
rvBooklist.setLayoutManager(new LinearLayoutManager(activity));
|
||||
rvBooklist.setAdapter(mAdapter);
|
||||
}
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void setFTag() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDetach() {
|
||||
super.onDetach();
|
||||
mListener = null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -15,6 +15,7 @@ import android.util.Log;
|
|||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.Toast;
|
||||
|
@ -22,6 +23,7 @@ import android.widget.Toast;
|
|||
import com.bumptech.glide.Glide;
|
||||
import com.deiniu.zhuike.utils.CyclePageIndicator;
|
||||
import com.deiniu.zhuike.utils.MyViewPager;
|
||||
import com.deiniu.zhuike.utils.OnItemClickListener;
|
||||
import com.youth.banner.Banner;
|
||||
import com.youth.banner.BannerConfig;
|
||||
import com.youth.banner.Transformer;
|
||||
|
@ -33,6 +35,7 @@ import java.util.List;
|
|||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.OnClick;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -52,12 +55,11 @@ public class Fragment_jingxuan extends BasicFragment implements OnBannerListener
|
|||
// TODO: Rename and change types of parameters
|
||||
private String mParam1;
|
||||
private String mParam2;
|
||||
@BindView(R.id.llTuijian)
|
||||
LinearLayout llTuijian;
|
||||
//@BindView(R.id.llTuijian)
|
||||
// LinearLayout llTuijian;
|
||||
@BindView(R.id.banner)
|
||||
Banner banner;
|
||||
// @BindView(R.id.banner2)
|
||||
// Banner banner2;
|
||||
|
||||
|
||||
private ArrayList<String> list_path;
|
||||
private ArrayList<String> list_title;
|
||||
|
@ -67,6 +69,41 @@ public class Fragment_jingxuan extends BasicFragment implements OnBannerListener
|
|||
|
||||
}
|
||||
|
||||
@OnClick({R.id.buttonMoreHot,R.id.buttonMoreLianzai,R.id.buttonMoreTuijian,R.id.buttonMoreWanben
|
||||
,R.id.buttonCatePingfen,R.id.buttonCateRegeng ,R.id.buttonCateTuijian,R.id.buttonCateShoucang,R.id.buttonCateWanjie
|
||||
})
|
||||
void bubmitButton(View view) {
|
||||
|
||||
switch (view.getId()) {
|
||||
case R.id.buttonMoreLianzai:
|
||||
showPaihangbang("最热");
|
||||
break;
|
||||
case R.id.buttonMoreTuijian:
|
||||
showPaihangbang("推荐");
|
||||
break;
|
||||
case R.id.buttonMoreWanben:
|
||||
showPaihangbang("完结");
|
||||
break;
|
||||
case R.id.buttonMoreHot:
|
||||
showPaihangbang("新书");
|
||||
break;
|
||||
case R.id.buttonCatePingfen:
|
||||
showPaihangbang("评分");
|
||||
break;
|
||||
case R.id.buttonCateRegeng:
|
||||
showPaihangbang("最热");
|
||||
break;
|
||||
case R.id.buttonCateWanjie:
|
||||
showPaihangbang("完结");
|
||||
break;
|
||||
case R.id.buttonCateShoucang:
|
||||
showPaihangbang("收藏");
|
||||
break;
|
||||
case R.id.buttonCateTuijian:
|
||||
showPaihangbang("推荐");
|
||||
break;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Use this factory method to create a new instance of
|
||||
* this fragment using the provided parameters.
|
||||
|
@ -111,23 +148,11 @@ public class Fragment_jingxuan extends BasicFragment implements OnBannerListener
|
|||
initTuijianPagers();
|
||||
initialBookList();
|
||||
|
||||
llTuijian.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
showPaihangbang("推荐");
|
||||
|
||||
}
|
||||
});
|
||||
return v;
|
||||
}
|
||||
|
||||
private void showPaihangbang(String type) {
|
||||
|
||||
Intent intent = new Intent(activity, Activity_paihangbang.class);
|
||||
intent.putExtra("BANGNAME",type);
|
||||
startActivity(intent);
|
||||
|
||||
}
|
||||
@Override
|
||||
public void setFTag() {
|
||||
TAG ="com.deiniu.zhuike.Fragment_jingxuan";
|
||||
|
@ -176,7 +201,7 @@ public class Fragment_jingxuan extends BasicFragment implements OnBannerListener
|
|||
|
||||
@Override
|
||||
public void OnBannerClick(int position) {
|
||||
Log.i("第一个banner", "你点了第一个banner 第"+position+"张轮播图");
|
||||
showShudanDetail(position);
|
||||
}
|
||||
//自定义的图片加载器
|
||||
private class MyLoader extends ImageLoader {
|
||||
|
@ -209,6 +234,8 @@ public class Fragment_jingxuan extends BasicFragment implements OnBannerListener
|
|||
mFragments.add(new Fragment_jingxuan_tuijian());
|
||||
mFragments.add(new Fragment_jingxuan_tuijian());
|
||||
mFragments.add(new Fragment_jingxuan_tuijian());
|
||||
mFragments.add(new Fragment_jingxuan_tuijian());
|
||||
mFragments.add(new Fragment_jingxuan_tuijian());
|
||||
Log.d(TAG, "initial fragments in tabs ");
|
||||
}
|
||||
|
||||
|
@ -232,7 +259,7 @@ public class Fragment_jingxuan extends BasicFragment implements OnBannerListener
|
|||
// }
|
||||
};
|
||||
mViewpagerTuijian.setAdapter(mAdapter);
|
||||
mViewpagerTuijian.addOnPageChangeListener(new CyclePageIndicator(getContext(), cyclell, 3));
|
||||
mViewpagerTuijian.addOnPageChangeListener(new CyclePageIndicator(getContext(), cyclell, mFragments.size()));
|
||||
|
||||
}
|
||||
|
||||
|
@ -253,8 +280,7 @@ public class Fragment_jingxuan extends BasicFragment implements OnBannerListener
|
|||
|
||||
void initialBookList() {
|
||||
|
||||
rvHotNewL.setLayoutManager(new LinearLayoutManager(activity));
|
||||
rvHotNewL.setAdapter(new BookListAdapter(activity,mHotNewData_l,R.layout.recycle_list_item_horizon ,new OnItemClickLitener()
|
||||
OnItemClickListener onItemClickListener =new OnItemClickListener()
|
||||
{
|
||||
|
||||
@Override
|
||||
|
@ -275,11 +301,13 @@ public class Fragment_jingxuan extends BasicFragment implements OnBannerListener
|
|||
|
||||
}
|
||||
|
||||
}));
|
||||
} ;
|
||||
rvHotNewL.setLayoutManager(new LinearLayoutManager(activity));
|
||||
rvHotNewL.setAdapter(new BookListAdapter(activity,mHotNewData_l,R.layout.recycle_list_item_horizon ,onItemClickListener));
|
||||
|
||||
rvHotNewG.setLayoutManager(new GridLayoutManager(activity,3));
|
||||
|
||||
rvHotNewG.setAdapter(new BookListAdapter(activity,mHotNewData_g,R.layout.recycle_list_item,new OnItemClickLitener()
|
||||
rvHotNewG.setAdapter(new BookListAdapter(activity,mHotNewData_g,R.layout.recycle_list_item,new OnItemClickListener()
|
||||
{
|
||||
|
||||
@Override
|
||||
|
@ -302,7 +330,7 @@ public class Fragment_jingxuan extends BasicFragment implements OnBannerListener
|
|||
|
||||
rvLianZaiL.setLayoutManager(new LinearLayoutManager(this.activity));
|
||||
|
||||
rvLianZaiL.setAdapter(new BookListAdapter(activity,mHotLianZaiData_l,R.layout.recycle_list_item_horizon,new OnItemClickLitener()
|
||||
rvLianZaiL.setAdapter(new BookListAdapter(activity,mHotLianZaiData_l,R.layout.recycle_list_item_horizon,new OnItemClickListener()
|
||||
{
|
||||
|
||||
@Override
|
||||
|
@ -327,7 +355,7 @@ public class Fragment_jingxuan extends BasicFragment implements OnBannerListener
|
|||
|
||||
rvLianZaiG.setLayoutManager(new GridLayoutManager(activity,3));
|
||||
|
||||
rvLianZaiG.setAdapter(new BookListAdapter(activity,mHotLianZaiData_g,R.layout.recycle_list_item,new OnItemClickLitener()
|
||||
rvLianZaiG.setAdapter(new BookListAdapter(activity,mHotLianZaiData_g,R.layout.recycle_list_item,new OnItemClickListener()
|
||||
{
|
||||
|
||||
@Override
|
||||
|
@ -350,7 +378,7 @@ public class Fragment_jingxuan extends BasicFragment implements OnBannerListener
|
|||
}));
|
||||
|
||||
rvFinishL.setLayoutManager(new LinearLayoutManager(this.activity));
|
||||
rvFinishL.setAdapter(new BookListAdapter(activity,mFinishedData_l,R.layout.recycle_list_item_horizon,new OnItemClickLitener()
|
||||
rvFinishL.setAdapter(new BookListAdapter(activity,mFinishedData_l,R.layout.recycle_list_item_horizon,new OnItemClickListener()
|
||||
{
|
||||
|
||||
@Override
|
||||
|
@ -374,7 +402,7 @@ public class Fragment_jingxuan extends BasicFragment implements OnBannerListener
|
|||
|
||||
rvFinishG.setLayoutManager(new GridLayoutManager(activity,3));
|
||||
|
||||
rvFinishG.setAdapter(new BookListAdapter(activity,mFinishedData_g,R.layout.recycle_list_item ,new OnItemClickLitener()
|
||||
rvFinishG.setAdapter(new BookListAdapter(activity,mFinishedData_g,R.layout.recycle_list_item ,new OnItemClickListener()
|
||||
{
|
||||
|
||||
@Override
|
||||
|
|
|
@ -10,6 +10,9 @@ import android.view.ViewGroup;
|
|||
|
||||
import com.google.android.gms.plus.PlusOneButton;
|
||||
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.OnClick;
|
||||
|
||||
/**
|
||||
* A fragment with a Google +1 button.
|
||||
* Activities that contain this fragment must implement the
|
||||
|
@ -69,10 +72,29 @@ public class Fragment_jingxuan_tuijian extends BasicFragment {
|
|||
// Inflate the layout for this fragment
|
||||
View view = inflater.inflate(R.layout.fragment_jingxuan_tuijian, container, false);
|
||||
|
||||
|
||||
ButterKnife.bind(this, view);
|
||||
return view;
|
||||
}
|
||||
|
||||
@OnClick({R.id.llGallary1,R.id.llGallary2,R.id.llGallary3})
|
||||
void onGallaryClick(View view){
|
||||
switch (view.getId()){
|
||||
case R.id.llGallary1:
|
||||
showBookDetail("ABC");
|
||||
break;
|
||||
case R.id.llGallary2:
|
||||
showBookDetail("123");
|
||||
break;
|
||||
case R.id.llGallary3:
|
||||
showBookDetail("ZXF");
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
|
|
|
@ -14,6 +14,7 @@ import android.widget.LinearLayout;
|
|||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.deiniu.zhuike.utils.OnItemClickListener;
|
||||
import com.flyco.tablayout.CommonTabLayout;
|
||||
import com.flyco.tablayout.SlidingTabLayout;
|
||||
import com.flyco.tablayout.listener.CustomTabEntity;
|
||||
|
@ -81,7 +82,7 @@ public class Fragment_paihang extends BasicFragment {
|
|||
mParam2 = getArguments().getString(ARG_PARAM2);
|
||||
}
|
||||
initData();
|
||||
mAdapter = new BookListAdapter(activity, mData, R.layout.recycle_list_item_shudan, new OnItemClickLitener() {
|
||||
mAdapter = new BookListAdapter(activity, mData, R.layout.recycle_list_item_shudan, new OnItemClickListener() {
|
||||
|
||||
@Override
|
||||
public void onItemClick(View view, int position) {
|
||||
|
|
|
@ -3,6 +3,8 @@ package com.deiniu.zhuike;
|
|||
import android.content.Context;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.support.design.widget.FloatingActionButton;
|
||||
import android.support.design.widget.Snackbar;
|
||||
import android.support.design.widget.TabLayout;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.app.FragmentPagerAdapter;
|
||||
|
@ -11,6 +13,7 @@ import android.util.Log;
|
|||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.flyco.tablayout.SlidingTabLayout;
|
||||
|
||||
|
@ -83,6 +86,12 @@ public class Fragment_shudan extends BasicFragment {
|
|||
ButterKnife.bind(this, v);
|
||||
initTabs();
|
||||
|
||||
fab.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
Toast.makeText(getContext(),"。。。。。。",Toast.LENGTH_LONG).show();
|
||||
}
|
||||
});
|
||||
return v;
|
||||
}
|
||||
|
||||
|
@ -92,7 +101,8 @@ public class Fragment_shudan extends BasicFragment {
|
|||
}
|
||||
|
||||
//---------tabs-------------
|
||||
|
||||
@BindView(R.id.fab)
|
||||
FloatingActionButton fab;
|
||||
@BindView(R.id.viewpager)
|
||||
ViewPager mViewpager;
|
||||
@BindView(R.id.tab_layout2)
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.deiniu.zhuike;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.Fragment;
|
||||
|
@ -12,8 +13,10 @@ import android.view.View;
|
|||
import android.view.ViewGroup;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.deiniu.zhuike.utils.OnItemClickListener;
|
||||
import com.google.android.gms.plus.PlusOneButton;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import butterknife.BindView;
|
||||
|
@ -58,12 +61,11 @@ public class Fragment_shudan_list extends BasicFragment {
|
|||
mParam2 = getArguments().getString(ARG_PARAM2);
|
||||
}
|
||||
initData();
|
||||
mAdapter = new BookListAdapter(activity, mData, R.layout.recycle_list_item_shudan, new OnItemClickLitener() {
|
||||
mAdapter = new BookListAdapter(activity, mData, R.layout.recycle_list_item_shudan, new OnItemClickListener() {
|
||||
|
||||
@Override
|
||||
public void onItemClick(View view, int position) {
|
||||
Toast.makeText(activity, position + " click",
|
||||
Toast.LENGTH_SHORT).show();
|
||||
showShudanDetail(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -125,7 +127,11 @@ public class Fragment_shudan_list extends BasicFragment {
|
|||
RecyclerView rvShudan;
|
||||
private void initData() {
|
||||
|
||||
mData =initData(mData,'Z');
|
||||
mData = new ArrayList<String>();
|
||||
for (int i = 'A'; i < 'X'; i++)
|
||||
{
|
||||
mData.add("读者书单" + (char) i);
|
||||
}
|
||||
}
|
||||
void initialBookList() {
|
||||
|
||||
|
@ -136,4 +142,5 @@ public class Fragment_shudan_list extends BasicFragment {
|
|||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.deiniu.zhuike;
|
|||
|
||||
import android.app.SearchManager;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.nfc.Tag;
|
||||
import android.os.Bundle;
|
||||
|
@ -148,7 +149,10 @@ public class Main2Activity extends AppCompatActivity
|
|||
public boolean onMenuItemClick(MenuItem item) {
|
||||
int menuItemId = item.getItemId();
|
||||
if (menuItemId == R.id.menuFenlei) {
|
||||
Toast.makeText( Main2Activity.this , R.string.test , Toast.LENGTH_SHORT).show();
|
||||
|
||||
Intent intent = new Intent(Main2Activity.this, activity_cates.class);
|
||||
startActivity(intent);
|
||||
|
||||
|
||||
}else if(menuItemId == R.id.menuMore) {
|
||||
showShelfMoreSheet();
|
||||
|
|
|
@ -0,0 +1,194 @@
|
|||
package com.deiniu.zhuike;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.support.v7.widget.GridLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.Window;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
|
||||
public class activity_cates extends AppCompatActivity {
|
||||
|
||||
@BindView(R.id.recycleViewCateList)
|
||||
RecyclerView mRecyclerView;
|
||||
private List<String> mDatas;
|
||||
private BookListAdapter mAdapter;
|
||||
//@BindView(R.id.textTile)
|
||||
//TextView tvTitle;
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
// requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
|
||||
setContentView(R.layout.activity_cates);
|
||||
Toolbar toolbar = findViewById(R.id.toolbar);
|
||||
setSupportActionBar(toolbar);
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
ButterKnife.bind(this);
|
||||
// getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE,R.layout.activity_title_layout);
|
||||
// tvTitle.setText("小说分类");
|
||||
// setTitle("小说分类");
|
||||
initData();
|
||||
|
||||
mAdapter = new BookListAdapter(this,mDatas,R.layout.recycle_list_item_cates,new OnItemClickLitener()
|
||||
{
|
||||
|
||||
@Override
|
||||
public void onItemClick(View view, int position)
|
||||
{
|
||||
showCateList( mDatas.get(position));
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
initReceyleView();
|
||||
|
||||
}
|
||||
interface OnItemClickLitener
|
||||
{
|
||||
void onItemClick(View view, int position);
|
||||
|
||||
}
|
||||
|
||||
private void showCateList(String s) {
|
||||
Intent intent = new Intent(activity_cates.this, Activity_cate_books.class);
|
||||
intent.putExtra("CATENAME",s);
|
||||
startActivity(intent);
|
||||
|
||||
}
|
||||
|
||||
private void initData() {
|
||||
mDatas = new ArrayList<String>();
|
||||
for (int i = 'A'; i <'K'; i++)
|
||||
{
|
||||
mDatas.add("小说分类" + (char) i);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void initReceyleView() {
|
||||
|
||||
// mRecyclerView.setLayoutManager(new LinearLayoutManager(this.activity));
|
||||
mRecyclerView.setLayoutManager(new GridLayoutManager(this,2));
|
||||
mRecyclerView.setAdapter(mAdapter );
|
||||
|
||||
}
|
||||
|
||||
class BookListAdapter extends RecyclerView.Adapter<BookListAdapter.MyViewHolder> {
|
||||
private final int EMPTY_VIEW = 1;
|
||||
private final int PROGRESS_VIEW = 2;
|
||||
private final int IMAGE_VIEW = 3;
|
||||
|
||||
private Context context;
|
||||
private List<String> mDatas = new ArrayList<String>();
|
||||
private OnItemClickLitener mOnItemClickLitener;
|
||||
private int listItemID;
|
||||
public BookListAdapter(Context context, List<String> mDatas, int listItemID, OnItemClickLitener clickLitener) {
|
||||
this.context = context;
|
||||
this.mDatas = mDatas;
|
||||
this.mOnItemClickLitener = clickLitener;
|
||||
this.listItemID = listItemID;
|
||||
}
|
||||
public BookListAdapter(Context context, OnItemClickLitener clickLitener) {
|
||||
this.context = context;
|
||||
this.mOnItemClickLitener = clickLitener;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemViewType(int position) {
|
||||
if(mDatas.size() == 0){
|
||||
return EMPTY_VIEW;
|
||||
} else if(mDatas.get(position) == null){
|
||||
return PROGRESS_VIEW;
|
||||
} else {
|
||||
return super.getItemViewType(position);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public BookListAdapter.MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType)
|
||||
{
|
||||
BookListAdapter.MyViewHolder holder = new BookListAdapter.MyViewHolder(LayoutInflater.from(
|
||||
context).inflate(listItemID, parent,
|
||||
false));
|
||||
return holder;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setParameters(List<String> mDatas,int listItemID ) {
|
||||
this.mDatas = mDatas;
|
||||
this.listItemID = listItemID;
|
||||
}
|
||||
|
||||
public void setOnItemClickLitener(OnItemClickLitener mOnItemClickLitener)
|
||||
{
|
||||
this.mOnItemClickLitener = mOnItemClickLitener;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(BookListAdapter.MyViewHolder holder, int position)
|
||||
{
|
||||
holder.tvTitle.setText(mDatas.get(position));
|
||||
holder.tvNum.setText("9999");
|
||||
// 如果设置了回调,则设置点击事件
|
||||
if (mOnItemClickLitener != null)
|
||||
{
|
||||
holder.itemView.setOnClickListener(new View.OnClickListener()
|
||||
{
|
||||
@Override
|
||||
public void onClick(View v)
|
||||
{
|
||||
int pos = holder.getLayoutPosition();
|
||||
mOnItemClickLitener.onItemClick(holder.itemView, pos);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount()
|
||||
{
|
||||
return mDatas.size();
|
||||
}
|
||||
public void addData(int position) {
|
||||
mDatas.add(position, "Insert One");
|
||||
notifyItemInserted(position);
|
||||
}
|
||||
|
||||
public void removeData(int position) {
|
||||
mDatas.remove(position);
|
||||
notifyItemRemoved(position);
|
||||
}
|
||||
class MyViewHolder extends RecyclerView.ViewHolder
|
||||
{
|
||||
@BindView(R.id.tvCateName)
|
||||
TextView tvTitle;
|
||||
@BindView(R.id.tvCateNums)
|
||||
TextView tvNum;
|
||||
|
||||
public MyViewHolder(View view)
|
||||
{
|
||||
super(view);
|
||||
ButterKnife.bind(this, view);
|
||||
//tvTitle = (TextView) view.findViewById(R.id.title);
|
||||
// tvAuthor = (TextView) view.findViewById(R.id.author);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
package com.deiniu.zhuike.utils;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.deiniu.zhuike.BasicFragment;
|
||||
import com.deiniu.zhuike.Fragment_bangdan;
|
||||
import com.deiniu.zhuike.R;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
package com.deiniu.zhuike.utils;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
public interface OnItemClickListener {
|
||||
void onItemClick(View view, int position);
|
||||
void onItemLongClick(View view , int position);
|
||||
void onLinearOutClick(View view,int bookId);
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".Activity_cate_books">
|
||||
|
||||
<android.support.design.widget.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fitsSystemWindows="true"
|
||||
android:paddingTop="@dimen/toolbarPadding"
|
||||
android:theme="@style/ToolBarTheme.AppBarOverlay">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="?attr/colorPrimary"
|
||||
app:popupTheme="@style/ToolBarTheme.PopupOverlay" />
|
||||
|
||||
</android.support.design.widget.AppBarLayout>
|
||||
|
||||
<include layout="@layout/content_activity_cate_books" />
|
||||
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout>
|
|
@ -0,0 +1,30 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true"
|
||||
tools:context=".activity_cates">
|
||||
|
||||
<android.support.design.widget.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fitsSystemWindows="true"
|
||||
android:paddingTop="@dimen/toolbarPadding"
|
||||
android:theme="@style/ToolBarTheme.AppBarOverlay">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="?attr/colorPrimary"
|
||||
app:popupTheme="@style/ToolBarTheme.PopupOverlay" />
|
||||
|
||||
</android.support.design.widget.AppBarLayout>
|
||||
|
||||
<include layout="@layout/content_activity_cates" />
|
||||
|
||||
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout>
|
|
@ -12,7 +12,7 @@
|
|||
<android.support.design.widget.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="22dp"
|
||||
android:paddingTop="@dimen/toolbarPadding"
|
||||
android:fitsSystemWindows="true"
|
||||
android:theme="@style/ToolBarTheme.AppBarOverlay">
|
||||
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".Activity_shudan">
|
||||
|
||||
<android.support.design.widget.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fitsSystemWindows="true"
|
||||
android:paddingTop="@dimen/toolbarPadding"
|
||||
android:theme="@style/ToolBarTheme.AppBarOverlay">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="?attr/colorPrimary"
|
||||
app:popupTheme="@style/ToolBarTheme.PopupOverlay" />
|
||||
|
||||
</android.support.design.widget.AppBarLayout>
|
||||
|
||||
<include layout="@layout/content_activity_shudan" />
|
||||
|
||||
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout>
|
|
@ -6,5 +6,7 @@
|
|||
<TextView android:id="@+id/textTile"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold"
|
||||
android:text="title" />
|
||||
</LinearLayout>
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
tools:context=".Activity_cate_books"
|
||||
tools:showIn="@layout/activity_cate_books"
|
||||
android:orientation="vertical"
|
||||
>
|
||||
|
||||
|
||||
<com.flyco.tablayout.SlidingTabLayout
|
||||
android:id="@+id/tab_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:background="@color/white"
|
||||
app:tl_indicator_color="@color/crimson"
|
||||
app:tl_indicator_corner_radius="1.5dp"
|
||||
app:tl_indicator_height="2dp"
|
||||
app:tl_indicator_width="45dp"
|
||||
app:tl_textSelectColor="@color/crimson"
|
||||
app:tl_textUnselectColor="@color/grey"
|
||||
app:tl_tab_space_equal ="true"
|
||||
|
||||
/>
|
||||
<android.support.v4.view.ViewPager
|
||||
android:id="@+id/viewpager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
</android.support.v4.view.ViewPager>
|
||||
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
tools:context=".activity_cates"
|
||||
tools:showIn="@layout/activity_cates">
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/recycleViewCateList"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
>
|
||||
</android.support.v7.widget.RecyclerView>
|
||||
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
|
@ -0,0 +1,193 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="5dp"
|
||||
android:orientation="vertical"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
tools:context=".Activity_shudan"
|
||||
tools:showIn="@layout/activity_shudan">
|
||||
|
||||
<android.support.v4.widget.SwipeRefreshLayout
|
||||
android:id="@+id/swipeLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.v4.widget.NestedScrollView
|
||||
android:id="@+id/n_scroll_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="50dp"
|
||||
android:fillViewport="true"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<include layout="@layout/recycle_list_item_shudan"></include>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_gravity="center">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@mipmap/side_bg"
|
||||
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<Button
|
||||
style="@style/buttonCates"
|
||||
android:background="@drawable/item_selector"
|
||||
android:drawableTop="@drawable/ic_mood_black_24dp"
|
||||
android:text="推荐" />
|
||||
|
||||
<Button
|
||||
style="@style/buttonCates"
|
||||
android:background="@drawable/item_selector"
|
||||
android:drawableTop="@drawable/ic_mood_black_24dp"
|
||||
|
||||
android:text="收藏" />
|
||||
|
||||
<Button
|
||||
style="@style/buttonCates"
|
||||
android:background="@drawable/item_selector"
|
||||
android:drawableTop="@drawable/ic_mood_black_24dp"
|
||||
|
||||
android:text="举报" />
|
||||
|
||||
<Button
|
||||
style="@style/buttonCates"
|
||||
android:background="@drawable/item_selector"
|
||||
android:drawableTop="@drawable/ic_mood_black_24dp"
|
||||
|
||||
android:text="评论" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/llGraySplit" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="5dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/colorAccent"
|
||||
|
||||
/>
|
||||
|
||||
<TextView
|
||||
style="@style/TextViewTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="简介" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
style="@style/TextViewDesc"
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
android:layout_height="wrap_content"
|
||||
android:text="一句话概括了书单的内容" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/llGraySplit" />
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
style="@style/TextViewTitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="书友评论" />
|
||||
|
||||
<TextView
|
||||
style="@style/TextViewDesc"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right"
|
||||
android:layout_weight="0"
|
||||
android:gravity="right"
|
||||
android:text="写评论" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/llGraySplit" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="5dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/colorAccent"
|
||||
|
||||
/>
|
||||
|
||||
<TextView
|
||||
style="@style/TextViewTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="好书奉送" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/recycleViewBookList"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
>
|
||||
|
||||
|
||||
</android.support.v7.widget.RecyclerView>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</android.support.v4.widget.NestedScrollView>
|
||||
</android.support.v4.widget.SwipeRefreshLayout>
|
||||
</LinearLayout>
|
|
@ -1,91 +1,281 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.v4.widget.NestedScrollView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<android.support.v4.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="3dp"
|
||||
android:layout_weight="1"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
tools:context=".BookActivity"
|
||||
tools:showIn="@layout/activity_book"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginBottom="3dp"
|
||||
>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
>
|
||||
tools:showIn="@layout/activity_book">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:orientation="horizontal"
|
||||
android:layout_weight="0"
|
||||
android:layout_gravity="bottom"
|
||||
>
|
||||
<TextView
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_weight="0"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<Button
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0"
|
||||
android:background="@drawable/item_selector"
|
||||
android:drawableLeft="@drawable/ic_mood_black_24dp"
|
||||
android:paddingLeft="5dp"
|
||||
android:text="推荐"
|
||||
|
||||
/>
|
||||
|
||||
<Button
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:layout_weight="0"
|
||||
android:background="@drawable/item_selector"
|
||||
android:drawableLeft="@drawable/ic_toys_black_24dp"
|
||||
android:paddingLeft="5dp"
|
||||
android:text="分享" />
|
||||
|
||||
<Button
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0"
|
||||
android:background="@drawable/item_selector"
|
||||
android:drawableLeft="@drawable/ic_sentiment_very_satisfied_black_24dp"
|
||||
android:paddingLeft="5dp"
|
||||
android:text="报错" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout style="@style/llGraySplit" />
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"/>
|
||||
<Button
|
||||
android:text="推荐"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:drawableLeft="@drawable/ic_mood_black_24dp"
|
||||
android:layout_weight="0"
|
||||
android:background="@drawable/item_selector"
|
||||
android:paddingLeft="5dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
/>
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<Button
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:text="分享"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:drawableLeft="@drawable/ic_toys_black_24dp"
|
||||
android:layout_weight="0"
|
||||
android:background="@drawable/item_selector"
|
||||
android:paddingLeft="5dp"
|
||||
/>
|
||||
<TextView
|
||||
android:layout_width="5dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/colorAccent"
|
||||
|
||||
<Button
|
||||
android:text="报错"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:drawableLeft="@drawable/ic_sentiment_very_satisfied_black_24dp"
|
||||
android:layout_weight="0"
|
||||
android:background="@drawable/item_selector"
|
||||
android:paddingLeft="5dp"
|
||||
/>
|
||||
/>
|
||||
|
||||
<TextView
|
||||
<TextView
|
||||
style="@style/TextViewTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="简介" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
style="@style/TextViewDesc"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:text="一句话概括了书单的内容" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_gravity="center">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@mipmap/side_bg"
|
||||
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/llGraySplit" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"/>
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="5dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/colorAccent"
|
||||
|
||||
/>
|
||||
|
||||
<TextView
|
||||
style="@style/TextViewTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="目录" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="0"
|
||||
android:src="@drawable/ic_mood_black_24dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/TextViewDesc"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="最近更新:2/20/2019 5:06:39 PM"
|
||||
|
||||
/>
|
||||
|
||||
<TextView
|
||||
style="@style/TextViewDesc"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="第一万两千八百章 天冷好个秋" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
style="@style/TextViewDesc"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right|center"
|
||||
android:layout_weight="0"
|
||||
android:text=">>" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/llGraySplit" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
style="@style/TextViewTitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="书友评论" />
|
||||
|
||||
<TextView
|
||||
style="@style/TextViewDesc"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right"
|
||||
android:layout_weight="0"
|
||||
android:gravity="right"
|
||||
android:text="写评论" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
style="@style/TextViewDesc"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text=" 评论1 " />
|
||||
|
||||
<TextView
|
||||
style="@style/TextViewDesc"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text=" 评论2 " />
|
||||
|
||||
<TextView
|
||||
style="@style/TextViewDesc"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text=" 评论3 " />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/llGraySplit" />
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/TextViewTitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="xxx 还写过" />
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/rvBooklist"
|
||||
android:divider="#ffff0000"
|
||||
android:dividerHeight="10dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:nestedScrollingEnabled="false"
|
||||
android:paddingBottom="50dp"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/text_margin"
|
||||
android:text="@string/large_text" />
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</android.support.v4.widget.NestedScrollView>
|
||||
<!--
|
||||
</android.support.v4.widget.NestedScrollView><!--
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".Fragment_booklist">
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/rvBooklist"
|
||||
android:divider="#ffff0000"
|
||||
android:dividerHeight="10dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:nestedScrollingEnabled="false"
|
||||
android:paddingBottom="50dp"
|
||||
/>
|
||||
</FrameLayout>
|
|
@ -13,7 +13,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:nestedScrollingEnabled="false"
|
||||
android:paddingBottom="50dp"
|
||||
android:paddingBottom="5dp"
|
||||
/>
|
||||
|
||||
</android.support.v4.widget.SwipeRefreshLayout>
|
|
@ -1,274 +1,277 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" android:orientation="vertical"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:context=".Fragment_jingxuan">
|
||||
|
||||
<android.support.v4.widget.SwipeRefreshLayout
|
||||
android:id="@+id/swipeLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:id="@+id/swipeLayout" >
|
||||
<android.support.v4.widget.NestedScrollView
|
||||
android:id="@+id/n_scroll_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fillViewport="true"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.v4.widget.NestedScrollView
|
||||
android:id="@+id/n_scroll_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
|
||||
>
|
||||
|
||||
|
||||
<com.youth.banner.Banner xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/banner"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="150dp" />
|
||||
|
||||
|
||||
<include layout="@layout/fragment_jingxuan_cates" />
|
||||
|
||||
android:layout_marginBottom="50dp"
|
||||
android:fillViewport="true"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
<!-- 推荐 -->
|
||||
android:orientation="vertical"
|
||||
>
|
||||
<com.youth.banner.Banner
|
||||
android:id="@+id/banner"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="150dp" />
|
||||
|
||||
<include layout="@layout/fragment_jingxuan_cates" />
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_margin="6dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="left"
|
||||
android:layout_weight="1"
|
||||
android:text="重磅推荐"
|
||||
android:textColor="#212121" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="right"
|
||||
android:layout_weight="1"
|
||||
android:gravity="right"
|
||||
android:text="更多>>"
|
||||
android:textColor="#212121" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.deiniu.zhuike.utils.MyViewPager
|
||||
android:id="@+id/viewpager_tuijian"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"></com.deiniu.zhuike.utils.MyViewPager>
|
||||
<LinearLayout
|
||||
android:id="@+id/dot_horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_margin="3dp"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"/>
|
||||
|
||||
<!--
|
||||
<com.viewpagerindicator.TitlePageIndicator
|
||||
android:id="@+id/titleIndictator"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="fill_parent" />
|
||||
-->
|
||||
|
||||
|
||||
<!--火热新书 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="5dp"
|
||||
android:background="@color/ghostwhite"
|
||||
|
||||
android:orientation="horizontal"/>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_margin="6dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:orientation="vertical">
|
||||
<!-- 推荐 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="left"
|
||||
android:layout_weight="1"
|
||||
android:text="火热新书"
|
||||
android:textColor="#212121" />
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_margin="6dp"
|
||||
android:orientation="horizontal">
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/googleg_standard_color_18"
|
||||
android:layout_gravity="left"
|
||||
/>
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="left"
|
||||
android:layout_weight="1"
|
||||
android:text="重磅推荐"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:textColor="#212121" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
<Button
|
||||
android:id="@+id/buttonMoreTuijian"
|
||||
style="@style/buttonRightMore"
|
||||
android:text="更多>"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.deiniu.zhuike.utils.MyViewPager
|
||||
android:id="@+id/viewpager_tuijian"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"></com.deiniu.zhuike.utils.MyViewPager>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/dot_horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_margin="3dp"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal" />
|
||||
|
||||
<!--
|
||||
<com.viewpagerindicator.TitlePageIndicator
|
||||
android:id="@+id/titleIndictator"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="fill_parent" />
|
||||
-->
|
||||
|
||||
|
||||
<!--火热新书 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="5dp"
|
||||
android:background="@color/ghostwhite"
|
||||
|
||||
android:orientation="horizontal" />
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="right"
|
||||
android:layout_weight="1"
|
||||
android:gravity="right"
|
||||
android:text="更多>>"
|
||||
android:textColor="#212121" />
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_margin="6dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/googleg_standard_color_18"
|
||||
android:layout_gravity="left"
|
||||
/>
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="left"
|
||||
android:layout_weight="1"
|
||||
android:text="火热新书"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:textColor="#212121" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/buttonMoreHot"
|
||||
style="@style/buttonRightMore"
|
||||
android:text="更多>"
|
||||
|
||||
/>
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/rvHotNewL"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:divider="#ffff0000"
|
||||
android:dividerHeight="10dp"
|
||||
android:nestedScrollingEnabled="false" />
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/rvHotNewG"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:divider="#ffff0000"
|
||||
android:dividerHeight="10dp"
|
||||
android:nestedScrollingEnabled="false" />
|
||||
|
||||
|
||||
<!-- <include layout="@layout/fragment_jingxuan_book_list"></include> -->
|
||||
<LinearLayout style="@style/llGraySplit"/>
|
||||
|
||||
|
||||
<!--热门连载 -->
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_margin="6dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/googleg_standard_color_18"
|
||||
android:layout_gravity="left"
|
||||
/>
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="left"
|
||||
android:layout_weight="1"
|
||||
android:text="热门连载"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:textColor="#212121" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/buttonMoreLianzai"
|
||||
style="@style/buttonRightMore"
|
||||
android:text="更多>"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/rvLianZaiL"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:divider="#ffff0000"
|
||||
android:dividerHeight="10dp"
|
||||
android:nestedScrollingEnabled="false"
|
||||
|
||||
/>
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/rvLianZaiG"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:divider="#ffff0000"
|
||||
android:dividerHeight="10dp"
|
||||
android:nestedScrollingEnabled="false"
|
||||
|
||||
/>
|
||||
|
||||
<LinearLayout style="@style/llGraySplit"/>
|
||||
|
||||
<!-- <include layout="@layout/fragment_jingxuan_book_list"></include> -->
|
||||
|
||||
<!--完本精选 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_margin="6dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/googleg_standard_color_18"
|
||||
android:layout_gravity="left"
|
||||
/>
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="left"
|
||||
android:layout_weight="1"
|
||||
android:text="完本精选"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:textColor="#212121" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/buttonMoreWanben"
|
||||
style="@style/buttonRightMore"
|
||||
android:text="更多>"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/rvFinishL"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:divider="#ffff0000"
|
||||
android:dividerHeight="10dp"
|
||||
android:nestedScrollingEnabled="false"
|
||||
|
||||
/>
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/rvFinishG"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:divider="#ffff0000"
|
||||
android:dividerHeight="10dp"
|
||||
android:nestedScrollingEnabled="false"
|
||||
android:paddingBottom="40dp" />
|
||||
|
||||
|
||||
<!-- <include layout="@layout/fragment_jingxuan_book_list"></include> -->
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/rvHotNewL"
|
||||
android:divider="#ffff0000"
|
||||
android:dividerHeight="10dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:nestedScrollingEnabled="false"
|
||||
/>
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/rvHotNewG"
|
||||
android:divider="#ffff0000"
|
||||
android:dividerHeight="10dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:nestedScrollingEnabled="false"
|
||||
/>
|
||||
|
||||
|
||||
|
||||
<!-- <include layout="@layout/fragment_jingxuan_book_list"></include> -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="5dp"
|
||||
android:background="@color/ghostwhite"
|
||||
|
||||
/>
|
||||
|
||||
|
||||
<!--热门连载 -->
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_margin="6dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="left"
|
||||
android:layout_weight="1"
|
||||
android:text="热门连载"
|
||||
android:textColor="#212121" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="right"
|
||||
android:layout_weight="1"
|
||||
android:gravity="right"
|
||||
android:text="更多>>"
|
||||
android:textColor="#212121" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/rvLianZaiL"
|
||||
android:divider="#ffff0000"
|
||||
android:dividerHeight="10dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:nestedScrollingEnabled="false"
|
||||
|
||||
/>
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/rvLianZaiG"
|
||||
android:divider="#ffff0000"
|
||||
android:dividerHeight="10dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:nestedScrollingEnabled="false"
|
||||
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="5dp"
|
||||
android:background="@color/ghostwhite"
|
||||
|
||||
android:orientation="horizontal"/>
|
||||
|
||||
<!-- <include layout="@layout/fragment_jingxuan_book_list"></include> -->
|
||||
|
||||
<!--完本精选 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_margin="6dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="left"
|
||||
android:layout_weight="1"
|
||||
android:text="完本精选"
|
||||
android:textColor="#212121" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="right"
|
||||
android:layout_weight="1"
|
||||
android:gravity="right"
|
||||
android:text="更多>>"
|
||||
android:textColor="#212121" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/rvFinishL"
|
||||
android:divider="#ffff0000"
|
||||
android:dividerHeight="10dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:nestedScrollingEnabled="false"
|
||||
|
||||
/>
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/rvFinishG"
|
||||
android:divider="#ffff0000"
|
||||
android:dividerHeight="10dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingBottom="40dp"
|
||||
android:nestedScrollingEnabled="false"
|
||||
/>
|
||||
|
||||
|
||||
<!-- <include layout="@layout/fragment_jingxuan_book_list"></include> -->
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<android.support.design.widget.TextInputEditText
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="100dp" />
|
||||
</LinearLayout>
|
||||
</android.support.v4.widget.NestedScrollView>
|
||||
</android.support.v4.widget.NestedScrollView>
|
||||
</android.support.v4.widget.SwipeRefreshLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
|
|
@ -3,11 +3,54 @@
|
|||
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="80dp"
|
||||
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center">
|
||||
<LinearLayout
|
||||
android:id="@+id/llTuijian2"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:gravity="center"
|
||||
android:background="@drawable/item_selector"
|
||||
|
||||
android:layout_weight="1">
|
||||
|
||||
<Button
|
||||
android:id="@+id/buttonCateTuijian"
|
||||
style="@style/buttonCates"
|
||||
android:drawableTop="@drawable/googleg_standard_color_18"
|
||||
android:text="推荐"
|
||||
/>
|
||||
<Button
|
||||
android:id="@+id/buttonCateShoucang"
|
||||
style="@style/buttonCates"
|
||||
android:drawableTop="@drawable/googleg_standard_color_18"
|
||||
android:text="收藏"
|
||||
/>
|
||||
<Button
|
||||
android:id="@+id/buttonCatePingfen"
|
||||
style="@style/buttonCates"
|
||||
android:drawableTop="@drawable/googleg_standard_color_18"
|
||||
android:text="评分"
|
||||
/>
|
||||
<Button
|
||||
android:id="@+id/buttonCateWanjie"
|
||||
style="@style/buttonCates"
|
||||
android:drawableTop="@drawable/googleg_standard_color_18"
|
||||
android:text="完结"
|
||||
/>
|
||||
<Button
|
||||
android:id="@+id/buttonCateRegeng"
|
||||
style="@style/buttonCates"
|
||||
android:drawableTop="@drawable/googleg_standard_color_18"
|
||||
android:text="热更"
|
||||
/>
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
<!--
|
||||
<LinearLayout
|
||||
android:id="@+id/llTuijian"
|
||||
android:orientation="vertical"
|
||||
|
@ -145,5 +188,5 @@ android:gravity="center">
|
|||
android:textColor="#212121" />
|
||||
|
||||
</LinearLayout>.
|
||||
|
||||
-->
|
||||
</LinearLayout>
|
||||
|
|
|
@ -5,84 +5,51 @@
|
|||
android:layout_height="wrap_content"
|
||||
>
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/item_selector"
|
||||
android:clickable="true"
|
||||
android:layout_weight="1">
|
||||
android:id="@+id/llGallary1"
|
||||
style="@style/llGallary">
|
||||
<ImageView
|
||||
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:id="@+id/imageGallary1"
|
||||
style="@style/llGallaryImage"
|
||||
android:src="@drawable/googleg_standard_color_18" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="30dp"
|
||||
|
||||
android:gravity="center"
|
||||
android:id="@+id/tvGallaryName1"
|
||||
style="@style/GarllayTextView"
|
||||
android:text="天龙八部"
|
||||
|
||||
android:textColor="#212121" />
|
||||
/>
|
||||
|
||||
</LinearLayout>.
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/item_selector"
|
||||
android:clickable="true"
|
||||
android:layout_weight="1">
|
||||
android:id="@+id/llGallary2"
|
||||
style="@style/llGallary">
|
||||
<ImageView
|
||||
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:id="@+id/imageGallary2"
|
||||
style="@style/llGallaryImage"
|
||||
android:src="@drawable/googleg_standard_color_18" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="30dp"
|
||||
|
||||
android:gravity="center"
|
||||
android:id="@+id/tvGallaryName2"
|
||||
style="@style/GarllayTextView"
|
||||
android:text="射雕英雄传"
|
||||
|
||||
android:textColor="#212121" />
|
||||
/>
|
||||
|
||||
</LinearLayout>.
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/item_selector"
|
||||
android:clickable="true"
|
||||
android:layout_weight="1">
|
||||
android:id="@+id/llGallary3"
|
||||
style="@style/llGallary">
|
||||
<ImageView
|
||||
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:id="@+id/imageGallary3"
|
||||
style="@style/llGallaryImage"
|
||||
android:src="@drawable/googleg_standard_color_18" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="30dp"
|
||||
|
||||
android:gravity="center"
|
||||
android:id="@+id/tvGallaryName3"
|
||||
style="@style/GarllayTextView"
|
||||
android:text="神雕侠侣"
|
||||
|
||||
android:textColor="#212121" />
|
||||
/>
|
||||
|
||||
</LinearLayout>.
|
||||
|
||||
</LinearLayout>
|
||||
|
|
|
@ -2,32 +2,33 @@
|
|||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="10dp"
|
||||
android:orientation="vertical">
|
||||
<Button
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="5dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:text="1"
|
||||
/>
|
||||
<Button
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="2" android:layout_margin="5dp"
|
||||
android:text="2" android:layout_marginBottom="5dp"
|
||||
/>
|
||||
<Button
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="3" android:layout_margin="5dp"
|
||||
android:text="3" android:layout_marginBottom="5dp"
|
||||
/>
|
||||
<Button
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="4" android:layout_margin="5dp"
|
||||
android:text="4" android:layout_marginBottom="5dp"
|
||||
/>
|
||||
|
||||
<Button
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="5" android:layout_margin="5dp"
|
||||
android:text="5" android:layout_marginBottom="5dp"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
|
|
@ -1,11 +1,15 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".Fragment_shudan">
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
>
|
||||
|
||||
<!-- TODO: Update blank fragment layout -->
|
||||
|
||||
|
@ -29,7 +33,9 @@
|
|||
<android.support.v4.view.ViewPager
|
||||
android:id="@+id/viewpager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="50dp"
|
||||
>
|
||||
<!-- <android.support.design.widget.TabLayout
|
||||
android:id="@+id/tab_layout"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -37,7 +43,15 @@
|
|||
app:tabMode="fixed"/>
|
||||
-->
|
||||
</android.support.v4.view.ViewPager>
|
||||
<!--
|
||||
|
||||
-->
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
android:id="@+id/fab"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_marginRight="@dimen/fab_margin"
|
||||
android:layout_marginBottom="60dp"
|
||||
app:srcCompat="@android:drawable/ic_menu_add" />
|
||||
</android.support.design.widget.CoordinatorLayout>
|
|
@ -2,8 +2,8 @@
|
|||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
>
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
|
@ -22,29 +22,32 @@
|
|||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll1"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="100dp"
|
||||
android:gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/item_selector"
|
||||
android:clickable="true"
|
||||
android:layout_weight="1">
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_weight="0"
|
||||
android:gravity="left"
|
||||
android:src="@drawable/googleg_standard_color_18" />
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:layout_weight="1">
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
|
@ -53,12 +56,13 @@
|
|||
android:layout_gravity="left"
|
||||
android:text="射雕英雄传"
|
||||
android:textColor="#212121" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_marginTop="2dp"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
android:layout_marginTop="2dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/author"
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -68,22 +72,23 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/category"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:text="武侠小说"
|
||||
android:textColor="@color/colorAccent" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/desc"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:gravity="center"
|
||||
android:textSize="11sp"
|
||||
android:text="武侠小说,武侠小说,著名的金庸作品 "
|
||||
android:textColor="@color/common_google_signin_btn_text_light" />
|
||||
android:textColor="@color/common_google_signin_btn_text_light"
|
||||
android:textSize="11sp" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
@ -91,27 +96,29 @@
|
|||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll2"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="100dp"
|
||||
android:gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/item_selector"
|
||||
android:clickable="true"
|
||||
android:layout_weight="1">
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView2"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_weight="0"
|
||||
android:gravity="left"
|
||||
android:src="@drawable/googleg_standard_color_18" />
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:layout_weight="1">
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title2"
|
||||
|
@ -120,12 +127,13 @@
|
|||
android:layout_gravity="left"
|
||||
android:text="射雕英雄传"
|
||||
android:textColor="#212121" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_marginTop="2dp"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
android:layout_marginTop="2dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/author2"
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -135,51 +143,53 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/category2"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:text="武侠小说"
|
||||
android:textColor="@color/colorAccent" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/desc2"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:gravity="center"
|
||||
android:textSize="11sp"
|
||||
android:text="武侠小说,武侠小说,著名的金庸作品 "
|
||||
android:textColor="@color/common_google_signin_btn_text_light" />
|
||||
android:textColor="@color/common_google_signin_btn_text_light"
|
||||
android:textSize="11sp" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll3"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="100dp"
|
||||
android:gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/item_selector"
|
||||
android:clickable="true"
|
||||
android:layout_weight="1">
|
||||
android:clickable="false"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView3"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_weight="0"
|
||||
android:gravity="left"
|
||||
android:src="@drawable/googleg_standard_color_18" />
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:layout_weight="1">
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title3"
|
||||
|
@ -188,12 +198,13 @@
|
|||
android:layout_gravity="left"
|
||||
android:text="射雕英雄传"
|
||||
android:textColor="#212121" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_marginTop="2dp"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
android:layout_marginTop="2dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/author3"
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -203,48 +214,49 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/category3"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:text="武侠小说"
|
||||
android:textColor="@color/colorAccent" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/desc3"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:gravity="center"
|
||||
android:textSize="11sp"
|
||||
android:text="武侠小说,武侠小说,著名的金庸作品 "
|
||||
android:textColor="@color/common_google_signin_btn_text_light" />
|
||||
android:textColor="@color/common_google_signin_btn_text_light"
|
||||
android:textSize="11sp" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/item_selector"
|
||||
android:layout_gravity="center_horizontal"
|
||||
>
|
||||
<TextView
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="30dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="更多"
|
||||
android:textColor="#212121" />
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:background="@drawable/item_selector">
|
||||
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="更多"
|
||||
android:textColor="#212121" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="5dp"
|
||||
android:background="@color/ghostwhite"
|
||||
|
||||
android:orientation="horizontal"/>
|
||||
android:orientation="horizontal" />
|
||||
</LinearLayout>
|
||||
|
|
|
@ -0,0 +1,61 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.v7.widget.CardView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/cardView"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:layout_marginTop="10dp"
|
||||
app:cardCornerRadius="6dp"
|
||||
app:cardElevation="2dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
|
||||
android:background="@drawable/item_selector"
|
||||
>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
<TextView
|
||||
android:id="@+id/tvCateName"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="玄幻奇幻"/>
|
||||
<TextView
|
||||
android:id="@+id/tvCateNums"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/lightblue"
|
||||
android:text="8888"
|
||||
/>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_weight="0"
|
||||
android:padding="2dp"
|
||||
android:id="@+id/iv_goods"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="80dp"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/googleg_standard_color_18"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</android.support.v7.widget.CardView>
|
||||
|
|
@ -47,7 +47,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:gravity="left"
|
||||
android:textSize="12sp"
|
||||
android:text="共19本书"
|
||||
android:text="武侠"
|
||||
android:textColor="@color/common_google_signin_btn_text_light" />
|
||||
<TextView
|
||||
android:id="@+id/author"
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<!-- Default screen margins, per the Android Design guidelines. -->
|
||||
<dimen name="activity_horizontal_margin">16dp</dimen>
|
||||
<dimen name="activity_vertical_margin">16dp</dimen>
|
||||
<dimen name="fab_margin">22dp</dimen>
|
||||
<dimen name="fab_margin">16dp</dimen>
|
||||
<dimen name="app_bar_height">256dp</dimen>
|
||||
|
||||
<!-- 状态栏电池厚度 -->
|
||||
|
@ -36,5 +36,6 @@
|
|||
<dimen name="tabBlock_height">25dp</dimen>
|
||||
<dimen name="text_margin">16dp</dimen>
|
||||
<dimen name="appbar_padding_top">8dp</dimen>
|
||||
<dimen name="toolbarPadding">22dp</dimen>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -120,5 +120,8 @@
|
|||
<string name="title_activity_main7">Main7Activity</string>
|
||||
<string name="fenlei">分类</string>
|
||||
<string name="more">更多</string>
|
||||
<string name="title_activity_cates">分类</string>
|
||||
<string name="title_activity_cate_books">Activity_cate_books</string>
|
||||
<string name="title_activity_shudan">书单详情</string>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -76,4 +76,72 @@
|
|||
<item name="android:textSize">16sp</item>
|
||||
</style>
|
||||
|
||||
<style name="buttonRightMore" parent="@android:style/Widget.Button">
|
||||
<item name="android:layout_width">40dp</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:layout_gravity">center</item>
|
||||
<item name="android:layout_weight">0</item>
|
||||
<item name="android:gravity">right</item>
|
||||
<item name="android:textColor">@color/grey</item>
|
||||
<item name="android:background">@drawable/item_selector</item>
|
||||
</style>
|
||||
|
||||
<style name="buttonCates" parent="@android:style/Widget.Button">
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:layout_weight">1</item>
|
||||
<item name="android:background">@drawable/item_selector</item>
|
||||
<item name="android:paddingTop">2dp</item>
|
||||
|
||||
</style>
|
||||
<style name="buttonCates.big" >
|
||||
<item name="android:layout_height">match_parent</item>
|
||||
</style>
|
||||
<style name="llGraySplit">
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:layout_height">5dp</item>
|
||||
<item name="android:background">@color/ghostwhite</item>
|
||||
|
||||
</style>
|
||||
|
||||
<style name="TextViewTitle">
|
||||
<item name="android:paddingLeft">5dp</item>
|
||||
<item name="android:textColor">@color/darkcyan</item>
|
||||
<item name="android:textSize">18sp</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
|
||||
</style>
|
||||
|
||||
<style name="TextViewDesc">
|
||||
<item name="android:textColor">@color/lightgray</item>
|
||||
<item name="android:textSize">15sp</item>
|
||||
</style>
|
||||
|
||||
<style name="llGallaryImage">
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:layout_height">match_parent</item>
|
||||
<item name="android:layout_weight">1</item>
|
||||
<item name="android:gravity">center</item>
|
||||
</style>
|
||||
|
||||
<style name="llGallary">
|
||||
<item name="android:orientation">vertical</item>
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:layout_height">120dp</item>
|
||||
<item name="android:gravity">center</item>
|
||||
<item name="android:background">@drawable/item_selector</item>
|
||||
<item name="android:clickable">true</item>
|
||||
<item name="android:layout_weight">1</item>
|
||||
</style>
|
||||
|
||||
<style name="GarllayTextView">
|
||||
|
||||
<item name="android:layout_width">wrap_content</item>
|
||||
<item name="android:layout_height">30dp</item>
|
||||
<item name="android:gravity">center</item>
|
||||
<item name="android:textColor">#212121</item>
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
</resources>
|
||||
|
|
Loading…
Reference in New Issue