update protype
This commit is contained in:
		
							parent
							
								
									0099c3ba3d
								
							
						
					
					
						commit
						662fbe9c96
					
				|  | @ -24,7 +24,7 @@ | |||
|             android:label="@string/title_activity_main3" /> | ||||
|         <activity | ||||
|             android:name=".Main2Activity" | ||||
|             android:label="@string/title_activity_main2" | ||||
|             android:label="@string/app_name" | ||||
|             android:theme="@style/ToolBarTheme.NoActionBar"> | ||||
|             <intent-filter> | ||||
|                 <action android:name="android.intent.action.MAIN" /> | ||||
|  |  | |||
|  | @ -7,10 +7,18 @@ import android.os.Bundle; | |||
| import android.support.v4.app.Fragment; | ||||
| import android.support.v4.app.FragmentManager; | ||||
| import android.support.v4.app.FragmentTransaction; | ||||
| import android.support.v7.widget.RecyclerView; | ||||
| import android.util.Log; | ||||
| import android.view.LayoutInflater; | ||||
| import android.view.View; | ||||
| import android.view.ViewGroup; | ||||
| import android.widget.TextView; | ||||
| 
 | ||||
| import java.util.ArrayList; | ||||
| import java.util.List; | ||||
| 
 | ||||
| import butterknife.BindView; | ||||
| import butterknife.ButterKnife; | ||||
| 
 | ||||
| 
 | ||||
| /** | ||||
|  | @ -73,4 +81,139 @@ public abstract class BasicFragment extends Fragment { | |||
|         super.onDetach(); | ||||
|         mListener = null; | ||||
|     } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|     //--------------------------------------------------------------book list adapter------------------------------------------------ | ||||
|     interface OnItemClickLitener | ||||
|     { | ||||
|         void onItemClick(View view, int position); | ||||
|         void onItemLongClick(View view , int position); | ||||
|     } | ||||
| 
 | ||||
|     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 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(OnItemClickLitener mOnItemClickLitener) | ||||
|         { | ||||
|             this.mOnItemClickLitener = mOnItemClickLitener; | ||||
|         } | ||||
| 
 | ||||
|         @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 (mOnItemClickLitener != null) | ||||
|             { | ||||
|                 holder.itemView.setOnClickListener(new View.OnClickListener() | ||||
|                 { | ||||
|                     @Override | ||||
|                     public void onClick(View v) | ||||
|                     { | ||||
|                         int pos = holder.getLayoutPosition(); | ||||
|                         mOnItemClickLitener.onItemClick(holder.itemView, pos); | ||||
|                     } | ||||
|                 }); | ||||
| 
 | ||||
|                 holder.itemView.setOnLongClickListener(new View.OnLongClickListener() | ||||
|                 { | ||||
|                     @Override | ||||
|                     public boolean onLongClick(View v) | ||||
|                     { | ||||
|                         int pos = holder.getLayoutPosition(); | ||||
|                         mOnItemClickLitener.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); | ||||
| 
 | ||||
|             } | ||||
|         } | ||||
|     } | ||||
| //-------------------------------------------------------------------------------------book list adapter end-------------------------------------------------- | ||||
| 
 | ||||
| } | ||||
|  |  | |||
|  | @ -3,14 +3,25 @@ package com.deiniu.zhuike; | |||
| import android.content.Context; | ||||
| import android.net.Uri; | ||||
| import android.os.Bundle; | ||||
| import android.support.design.widget.BottomSheetDialog; | ||||
| import android.support.v4.app.Fragment; | ||||
| import android.support.v4.view.ViewPager; | ||||
| import android.support.v7.widget.GridLayoutManager; | ||||
| import android.support.v7.widget.LinearLayoutManager; | ||||
| import android.support.v7.widget.RecyclerView; | ||||
| import android.util.Log; | ||||
| import android.view.LayoutInflater; | ||||
| import android.view.View; | ||||
| import android.view.ViewGroup; | ||||
| import android.widget.TextView; | ||||
| import android.widget.Toast; | ||||
| 
 | ||||
| import com.google.android.gms.plus.PlusOneButton; | ||||
| 
 | ||||
| import java.util.ArrayList; | ||||
| import java.util.List; | ||||
| 
 | ||||
| import butterknife.BindView; | ||||
| import butterknife.ButterKnife; | ||||
| 
 | ||||
| /** | ||||
|  | @ -69,8 +80,33 @@ public class Fragment_Shelf extends BasicFragment { | |||
|             mParam1 = getArguments().getString(ARG_PARAM1); | ||||
|             mParam2 = getArguments().getString(ARG_PARAM2); | ||||
|         } | ||||
| 
 | ||||
|         initData(); | ||||
| 
 | ||||
|         mAdapter = new BookListAdapter(activity,mDatas,R.layout.recycle_list_item,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); | ||||
|             } | ||||
|         }); | ||||
|     } | ||||
| 
 | ||||
|     @BindView(R.id.id_recyclerview) | ||||
|     RecyclerView  mRecyclerView; | ||||
|     private List<String> mDatas; | ||||
|     private BookListAdapter mAdapter; | ||||
| 
 | ||||
|     @Override | ||||
|     public View onCreateView(LayoutInflater inflater, ViewGroup container, | ||||
|                              Bundle savedInstanceState) { | ||||
|  | @ -79,9 +115,65 @@ public class Fragment_Shelf extends BasicFragment { | |||
|         View view = inflater.inflate(R.layout.fragment_fragment__shelf, container, false); | ||||
|         ButterKnife.bind(this, view); | ||||
| 
 | ||||
|         initReceyleView(); | ||||
| 
 | ||||
|         return view; | ||||
| 
 | ||||
|     } | ||||
| 
 | ||||
| 
 | ||||
|  void initReceyleView() { | ||||
| 
 | ||||
|    //  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); | ||||
|          } | ||||
|      }); | ||||
|      */ | ||||
|  } | ||||
| 
 | ||||
| 
 | ||||
|     protected void initData() | ||||
|     { | ||||
|         mDatas = new ArrayList<String>(); | ||||
|         for (int i = 'A'; i < 'G'; i++) | ||||
|         { | ||||
|             mDatas.add("射雕" + (char) i); | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|     private void initDialog(int position) { | ||||
| 
 | ||||
|         BottomSheetDialog bottomSheetDialog = new BottomSheetDialog(this.activity); | ||||
|         bottomSheetDialog.setContentView(R.layout.fragment_shelf_botoomsheetdialog); | ||||
| //给布局设置透明背景色 | ||||
|         bottomSheetDialog.getDelegate().findViewById(android.support.design.R.id.design_bottom_sheet) | ||||
|                 .setBackgroundColor(getResources().getColor(android.R.color.transparent)); | ||||
| 
 | ||||
|         TextView tv =(TextView) bottomSheetDialog.findViewById(R.id.bdTitle); | ||||
|         tv.setText(mDatas.get(position)); | ||||
| 
 | ||||
|         bottomSheetDialog.show(); | ||||
|     } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|     @Override | ||||
|     public void onResume() { | ||||
|         super.onResume(); | ||||
|  | @ -91,14 +183,10 @@ public class Fragment_Shelf extends BasicFragment { | |||
|     } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|     @Override | ||||
|     public void setFTag() { | ||||
|         TAG="com.deiniu.zhuike.Fragment_Shelf"; | ||||
|     } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| } | ||||
|  |  | |||
|  | @ -6,12 +6,16 @@ import android.os.Bundle; | |||
| import android.support.v4.app.Fragment; | ||||
| import android.support.v4.app.FragmentPagerAdapter; | ||||
| import android.support.v4.view.ViewPager; | ||||
| import android.support.v7.widget.GridLayoutManager; | ||||
| import android.support.v7.widget.LinearLayoutManager; | ||||
| import android.support.v7.widget.RecyclerView; | ||||
| import android.util.AttributeSet; | ||||
| import android.util.Log; | ||||
| import android.view.LayoutInflater; | ||||
| import android.view.View; | ||||
| import android.view.ViewGroup; | ||||
| import android.widget.ImageView; | ||||
| import android.widget.Toast; | ||||
| 
 | ||||
| import com.bumptech.glide.Glide; | ||||
| import com.deiniu.zhuike.utils.MyViewPager; | ||||
|  | @ -78,6 +82,25 @@ public class Fragment_jingxuan extends BasicFragment implements OnBannerListener | |||
|             mParam1 = getArguments().getString(ARG_PARAM1); | ||||
|             mParam2 = getArguments().getString(ARG_PARAM2); | ||||
|         } | ||||
|         initData(); | ||||
|         mAdapter = new BookListAdapter(activity,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); | ||||
|             } | ||||
|         }); | ||||
| 
 | ||||
|     } | ||||
| 
 | ||||
|     @Override | ||||
|  | @ -91,7 +114,7 @@ public class Fragment_jingxuan extends BasicFragment implements OnBannerListener | |||
|        // testBanner2(banner2,new BannerListioner2()); | ||||
| 
 | ||||
|         initTuijianPagers(); | ||||
| 
 | ||||
|         initialBookList(); | ||||
|         return  v; | ||||
|     } | ||||
| 
 | ||||
|  | @ -206,10 +229,169 @@ public class Fragment_jingxuan extends BasicFragment implements OnBannerListener | |||
|         mViewpagerTuijian.setAdapter(mAdapter); | ||||
| 
 | ||||
| 
 | ||||
|     } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|     //---------------------------------------------------book cate list-------------------------------begin | ||||
| 
 | ||||
|     private BookListAdapter mAdapter; | ||||
|     private List<String>  mHotNewData_l,mHotNewData_g,mHotLianZaiData_l, mHotLianZaiData_g,mFinishedData_l, mFinishedData_g; | ||||
| 
 | ||||
|     @BindView(R.id.rvHotNewL) RecyclerView  rvHotNewL; | ||||
|     @BindView(R.id.rvHotNewG) RecyclerView  rvHotNewG; | ||||
|     @BindView(R.id.rvLianZaiG) RecyclerView  rvLianZaiG; | ||||
|     @BindView(R.id.rvLianZaiL) RecyclerView  rvLianZaiL; | ||||
|     @BindView(R.id.rvFinishL) RecyclerView  rvFinishL; | ||||
|     @BindView(R.id.rvFinishG) RecyclerView  rvFinishG; | ||||
| 
 | ||||
|     void initialBookList() { | ||||
| 
 | ||||
|         rvHotNewL.setLayoutManager(new LinearLayoutManager(activity)); | ||||
|         rvHotNewL.setAdapter(new BookListAdapter(activity,mHotNewData_l,R.layout.recycle_list_item_horizon ,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); | ||||
|             } | ||||
|         })); | ||||
| 
 | ||||
|         rvHotNewG.setLayoutManager(new GridLayoutManager(activity,3)); | ||||
|         mAdapter.setParameters(mHotNewData_g,R.layout.recycle_list_item ); | ||||
|         rvHotNewG.setAdapter(new BookListAdapter(activity,mHotNewData_g,R.layout.recycle_list_item,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); | ||||
|             } | ||||
|         })); | ||||
| 
 | ||||
|         rvLianZaiL.setLayoutManager(new LinearLayoutManager(this.activity)); | ||||
| 
 | ||||
|         rvLianZaiL.setAdapter(new BookListAdapter(activity,mHotLianZaiData_l,R.layout.recycle_list_item_horizon,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); | ||||
|             } | ||||
|         })); | ||||
| 
 | ||||
|         rvLianZaiG.setLayoutManager(new GridLayoutManager(activity,3)); | ||||
| 
 | ||||
|         rvLianZaiG.setAdapter(new BookListAdapter(activity,mHotLianZaiData_g,R.layout.recycle_list_item,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); | ||||
|             } | ||||
|         })); | ||||
| 
 | ||||
|         rvFinishL.setLayoutManager(new LinearLayoutManager(this.activity)); | ||||
|         rvFinishL.setAdapter(new BookListAdapter(activity,mFinishedData_l,R.layout.recycle_list_item_horizon,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); | ||||
|             } | ||||
|         })); | ||||
| 
 | ||||
|         rvFinishG.setLayoutManager(new GridLayoutManager(activity,3)); | ||||
| 
 | ||||
|         rvFinishG.setAdapter(new BookListAdapter(activity,mFinishedData_g,R.layout.recycle_list_item ,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); | ||||
|             } | ||||
|         })); | ||||
| 
 | ||||
|     } | ||||
|     void initData() { | ||||
|         mHotNewData_l = initData(mHotNewData_l,'B'); | ||||
|         mHotNewData_g= initData(mHotNewData_g,'D'); | ||||
|         mHotLianZaiData_l= initData(mHotLianZaiData_l,'C'); | ||||
|         mHotLianZaiData_g=initData(mHotLianZaiData_g,'D'); | ||||
|         mFinishedData_l=initData(mFinishedData_l,'A'); | ||||
|         mFinishedData_g=initData(mFinishedData_g,'G'); | ||||
|     } | ||||
|     protected  List<String> initData(List<String> mDatas,char x) | ||||
|     { | ||||
|         mDatas = new ArrayList<String>(); | ||||
|         for (int i = 'A'; i < x; i++) | ||||
|         { | ||||
|             mDatas.add("射雕" + (char) i); | ||||
|         } | ||||
|         return  mDatas; | ||||
|     } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|  |  | |||
|  | @ -5,6 +5,8 @@ | |||
|     android:layout_width="match_parent" | ||||
|     android:layout_height="match_parent" | ||||
|     tools:context=".Main2Activity"> | ||||
| 
 | ||||
| 
 | ||||
|     <LinearLayout | ||||
| 
 | ||||
|         android:layout_width="match_parent" | ||||
|  |  | |||
|  | @ -1,11 +1,23 @@ | |||
| <?xml version="1.0" encoding="utf-8"?> | ||||
| <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||||
| <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=".Main4Activity"> | ||||
|     <relativeLayout | ||||
|         android:id="@+id/bottom_sheet" | ||||
|         android:layout_width="match_parent" | ||||
|         android:layout_height="wrap_content" | ||||
|         android:layout_alignParentBottom="true" | ||||
| 
 | ||||
|         app:behavior_hideable="true" | ||||
|         app:behavior_peekHeight="160dp" | ||||
|         app:layout_behavior="@string/bottom_sheet_behavior"> | ||||
| 
 | ||||
| 
 | ||||
|     </relativeLayout> | ||||
|     <android.support.design.widget.AppBarLayout | ||||
|         android:layout_width="match_parent" | ||||
|         android:layout_height="wrap_content" | ||||
|  |  | |||
|  | @ -1,18 +1,25 @@ | |||
| <?xml version="1.0" encoding="utf-8"?> | ||||
| <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||||
|     android:orientation="vertical" | ||||
|     xmlns:tools="http://schemas.android.com/tools" | ||||
|     android:layout_width="match_parent" | ||||
|     android:layout_height="match_parent" | ||||
| 
 | ||||
|     android:padding="3dp" | ||||
|     android:orientation="vertical" | ||||
|     > | ||||
| 
 | ||||
| 
 | ||||
|     <include layout="@layout/fragment_jingxuan_tuijian" /> | ||||
|     <android.support.v7.widget.RecyclerView | ||||
|         android:id="@+id/id_recyclerview" | ||||
|         android:divider="#ffff0000" | ||||
|         android:dividerHeight="10dp" | ||||
|         android:layout_width="match_parent" | ||||
|         android:layout_height="match_parent" | ||||
|         android:paddingBottom="40dp" | ||||
|         android:paddingTop="30dp" | ||||
|         /> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| <android.support.design.widget.TextInputEditText | ||||
|     <android.support.design.widget.TextInputEditText | ||||
|     android:layout_width="wrap_content" | ||||
|     android:layout_height="1500dp" /> | ||||
| 
 | ||||
| </LinearLayout> | ||||
|  | @ -107,7 +107,26 @@ | |||
| 
 | ||||
|                 </LinearLayout> | ||||
| 
 | ||||
|                 <include layout="@layout/fragment_jingxuan_book_list"></include> | ||||
|                 <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.support.v7.widget.RecyclerView | ||||
|                     android:id="@+id/rvHotNewG" | ||||
|                     android:divider="#ffff0000" | ||||
|                     android:dividerHeight="10dp" | ||||
|                     android:layout_width="match_parent" | ||||
|                     android:layout_height="match_parent" | ||||
| 
 | ||||
|                     /> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|                 <!-- <include layout="@layout/fragment_jingxuan_book_list"></include> --> | ||||
| 
 | ||||
| 
 | ||||
|                 <!--热门连载 --> | ||||
|  | @ -139,7 +158,28 @@ | |||
| 
 | ||||
|                 </LinearLayout> | ||||
| 
 | ||||
|                 <include layout="@layout/fragment_jingxuan_book_list"></include> | ||||
|                 <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.support.v7.widget.RecyclerView | ||||
|                     android:id="@+id/rvLianZaiG" | ||||
|                     android:divider="#ffff0000" | ||||
|                     android:dividerHeight="10dp" | ||||
|                     android:layout_width="match_parent" | ||||
|                     android:layout_height="match_parent" | ||||
| 
 | ||||
| 
 | ||||
|                     /> | ||||
| 
 | ||||
| 
 | ||||
|                 <!-- <include layout="@layout/fragment_jingxuan_book_list"></include> --> | ||||
| 
 | ||||
|                 <!--完本精选 --> | ||||
|                 <LinearLayout | ||||
|                     android:layout_width="match_parent" | ||||
|  | @ -168,7 +208,28 @@ | |||
| 
 | ||||
|                 </LinearLayout> | ||||
| 
 | ||||
|                 <include layout="@layout/fragment_jingxuan_book_list"></include> | ||||
| 
 | ||||
|                 <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.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" | ||||
| 
 | ||||
|                     /> | ||||
| 
 | ||||
| 
 | ||||
|                 <!-- <include layout="@layout/fragment_jingxuan_book_list"></include> --> | ||||
| 
 | ||||
| 
 | ||||
|             </LinearLayout> | ||||
|  |  | |||
|  | @ -15,6 +15,7 @@ | |||
|         android:gravity="center" | ||||
|         android:background="@drawable/item_selector" | ||||
|         android:clickable="true" | ||||
| 
 | ||||
|         android:layout_weight="1"> | ||||
|         <ImageView | ||||
|             android:layout_margin="10dp" | ||||
|  |  | |||
|  | @ -0,0 +1,220 @@ | |||
| <?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="wrap_content" | ||||
|      android:orientation="vertical" | ||||
|     > | ||||
| 
 | ||||
| 
 | ||||
|     <RelativeLayout | ||||
|         android:id="@+id/top_layout" | ||||
|         android:layout_width="match_parent" | ||||
|         android:layout_height="90dp" | ||||
|         android:elevation="1dp" | ||||
|         tools:ignore="UnusedAttribute"> | ||||
| 
 | ||||
|         <FrameLayout | ||||
|             android:layout_width="match_parent" | ||||
|             android:layout_height="75dp" | ||||
|             android:background="@color/white" | ||||
|             android:layout_alignParentBottom="true" | ||||
|             android:paddingStart="120dp" | ||||
|             android:paddingLeft="120dp" | ||||
|             > | ||||
| 
 | ||||
|             <LinearLayout | ||||
|                 android:layout_width="wrap_content" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 android:layout_gravity="bottom" | ||||
|                 android:paddingBottom="5dp" | ||||
|                 android:orientation="vertical"> | ||||
| 
 | ||||
|                 <TextView | ||||
|                     android:id="@+id/bdTitle" | ||||
|                     android:layout_width="wrap_content" | ||||
|                     android:layout_height="wrap_content" | ||||
|                     android:text="射雕英雄传" | ||||
|                     android:textColor="@color/colorPrimary" | ||||
|                     android:textSize="16sp" | ||||
|                     android:textStyle="bold" | ||||
|                     tools:ignore="HardcodedText,TextViewEdits" /> | ||||
| 
 | ||||
| 
 | ||||
|                 <TextView | ||||
|                     android:id="@+id/tv_goods_no" | ||||
|                     android:layout_width="wrap_content" | ||||
|                     android:layout_height="wrap_content" | ||||
|                     android:visibility="visible" | ||||
|                     android:text="金庸" | ||||
|                     tools:ignore="HardcodedText" /> | ||||
| 
 | ||||
|             </LinearLayout> | ||||
| 
 | ||||
| 
 | ||||
|         </FrameLayout> | ||||
| 
 | ||||
|         <android.support.v7.widget.CardView | ||||
|             android:id="@+id/cardView" | ||||
|             android:layout_width="90dp" | ||||
|             android:layout_height="90dp" | ||||
|             android:layout_marginEnd="14dp" | ||||
|             android:layout_marginRight="14dp" | ||||
|             android:layout_marginStart="20dp" | ||||
|             android:layout_marginLeft="20dp" | ||||
|             android:layout_marginBottom="5dp" | ||||
|             app:cardBackgroundColor="@color/white" | ||||
|             app:cardCornerRadius="6dp" | ||||
|             app:cardElevation="2dp"> | ||||
| 
 | ||||
|             <ImageView | ||||
|                 android:id="@+id/iv_goods" | ||||
|                 android:layout_width="match_parent" | ||||
|                 android:layout_height="match_parent" | ||||
|                 android:scaleType="centerCrop" | ||||
|                 android:src="@drawable/googleg_standard_color_18" | ||||
|                 tools:ignore="ContentDescription" /> | ||||
| 
 | ||||
|         </android.support.v7.widget.CardView> | ||||
| 
 | ||||
|     </RelativeLayout> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|     <LinearLayout | ||||
| 
 | ||||
|         android:orientation="horizontal" | ||||
|         android:layout_width="match_parent" | ||||
|         android:layout_height="200dp" | ||||
|         android:gravity="center" | ||||
|         android:background="@color/white" | ||||
|         > | ||||
| 
 | ||||
|         <LinearLayout | ||||
|             android:orientation="vertical" | ||||
|             android:layout_width="60dp" | ||||
|             android:layout_height="70dp" | ||||
| 
 | ||||
|             android:gravity="center" | ||||
|             android:background="@drawable/item_selector" | ||||
|             android:clickable="true" | ||||
|             android:layout_weight="1"> | ||||
|             <ImageView | ||||
| 
 | ||||
|                 android:layout_width="wrap_content" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 android:layout_weight="1" | ||||
|                 android:gravity="center" | ||||
|                 android:src="@drawable/googleg_standard_color_18" /> | ||||
| 
 | ||||
|             <TextView | ||||
|                 android:layout_width="wrap_content" | ||||
|                 android:layout_height="30dp" | ||||
| 
 | ||||
|                 android:gravity="center" | ||||
|                 android:text="书籍详情" | ||||
| 
 | ||||
|                 android:textColor="#212121" /> | ||||
| 
 | ||||
|         </LinearLayout>. | ||||
|         <LinearLayout | ||||
|             android:orientation="vertical" | ||||
|             android:layout_width="60dp" | ||||
|             android:layout_height="70dp" | ||||
| 
 | ||||
|             android:gravity="center" | ||||
|             android:background="@drawable/item_selector" | ||||
|             android:clickable="true" | ||||
|             android:layout_weight="1"> | ||||
|             <ImageView | ||||
| 
 | ||||
|                 android:layout_width="wrap_content" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 android:layout_weight="1" | ||||
|                 android:gravity="center" | ||||
|                 android:src="@drawable/googleg_standard_color_18" /> | ||||
| 
 | ||||
|             <TextView | ||||
|                 android:layout_width="wrap_content" | ||||
|                 android:layout_height="30dp" | ||||
| 
 | ||||
|                 android:gravity="center" | ||||
|                 android:text="目录书摘" | ||||
| 
 | ||||
|                 android:textColor="#212121" /> | ||||
| 
 | ||||
|         </LinearLayout>. | ||||
|         <LinearLayout | ||||
|             android:orientation="vertical" | ||||
|             android:layout_width="60dp" | ||||
|             android:layout_height="70dp" | ||||
|             android:gravity="center" | ||||
| 
 | ||||
|             android:background="@drawable/item_selector" | ||||
|             android:clickable="true" | ||||
|             android:layout_weight="1"> | ||||
|             <ImageView | ||||
| 
 | ||||
|                 android:layout_width="wrap_content" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 android:layout_weight="1" | ||||
|                 android:gravity="center" | ||||
|                 android:src="@drawable/googleg_standard_color_18" /> | ||||
| 
 | ||||
|             <TextView | ||||
|                 android:layout_width="wrap_content" | ||||
|                 android:layout_height="30dp" | ||||
| 
 | ||||
|                 android:gravity="center" | ||||
|                 android:text="查看书评" | ||||
| 
 | ||||
|                 android:textColor="#212121" /> | ||||
| 
 | ||||
|         </LinearLayout>. | ||||
|         <LinearLayout | ||||
|             android:orientation="vertical" | ||||
|             android:layout_width="60dp" | ||||
|             android:layout_height="70dp" | ||||
|             android:gravity="center" | ||||
| 
 | ||||
|             android:background="@drawable/item_selector" | ||||
|             android:clickable="true" | ||||
|             android:layout_weight="1"> | ||||
|             <ImageView | ||||
| 
 | ||||
|                 android:layout_width="wrap_content" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 android:layout_weight="1" | ||||
|                 android:gravity="center" | ||||
|                 android:src="@drawable/googleg_standard_color_18" /> | ||||
| 
 | ||||
|             <TextView | ||||
|                 android:layout_width="wrap_content" | ||||
|                 android:layout_height="30dp" | ||||
| 
 | ||||
|                 android:gravity="center" | ||||
|                 android:text="下载本书" | ||||
| 
 | ||||
|                 android:textColor="#212121" /> | ||||
| 
 | ||||
|         </LinearLayout>. | ||||
| 
 | ||||
| 
 | ||||
|     </LinearLayout> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|     </LinearLayout> | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,51 @@ | |||
| <?xml version="1.0" encoding="utf-8"?> | ||||
| <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||||
|     android:orientation="vertical" | ||||
|     android:layout_width="100dp" | ||||
|     android:layout_height="100dp" | ||||
|     android:gravity="center" | ||||
|     android:background="@drawable/item_selector" | ||||
|     android:clickable="true" | ||||
|     android:layout_weight="1" | ||||
|     android:padding="5dp"> | ||||
|     <ImageView | ||||
|         android:id="@+id/imageView" | ||||
|         android:layout_width="80dp" | ||||
|         android:layout_height="80dp" | ||||
|         android:layout_weight="1" | ||||
|         android:gravity="center" | ||||
|         android:src="@drawable/googleg_standard_color_18" /> | ||||
| 
 | ||||
|     <TextView | ||||
|         android:id="@+id/title" | ||||
|         android:layout_width="wrap_content" | ||||
|         android:layout_height="30dp" | ||||
|         android:gravity="center" | ||||
|         android:text="天龙八部" | ||||
| 
 | ||||
|         android:textColor="#212121" /> | ||||
|     <TextView | ||||
|         android:visibility="gone" | ||||
|         android:id="@+id/desc" | ||||
|         android:layout_width="wrap_content" | ||||
|         android:layout_height="30dp" | ||||
|         android:gravity="center" | ||||
|         android:text="" | ||||
|         android:textColor="#212121" /> | ||||
|     <TextView | ||||
|         android:visibility="gone" | ||||
|         android:id="@+id/author" | ||||
|         android:layout_width="wrap_content" | ||||
|         android:layout_height="30dp" | ||||
|         android:gravity="center" | ||||
|         android:text="" | ||||
|         android:textColor="#212121" /> | ||||
|     <TextView | ||||
|         android:visibility="gone" | ||||
|         android:id="@+id/category" | ||||
|         android:layout_marginLeft="5dp" | ||||
|         android:layout_width="wrap_content" | ||||
|         android:layout_height="wrap_content" | ||||
|         android:text="武侠小说" | ||||
|         android:textColor="@color/colorAccent" /> | ||||
| </LinearLayout> | ||||
|  | @ -0,0 +1,64 @@ | |||
| <?xml version="1.0" encoding="utf-8"?> | ||||
| <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||||
|     android:orientation="horizontal" | ||||
|     android:layout_width="match_parent" | ||||
|     android:layout_height="120dp" | ||||
|     android:gravity="center" | ||||
|     android:background="@drawable/item_selector" | ||||
|     android:clickable="true" | ||||
|     android:layout_weight="1"> | ||||
|     <ImageView | ||||
|         android:id="@+id/imageView" | ||||
|         android:layout_margin="10dp" | ||||
|         android:layout_width="100dp" | ||||
|         android:layout_height="100dp" | ||||
|         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:gravity="center" | ||||
|         android:layout_weight="1"> | ||||
| 
 | ||||
|         <TextView | ||||
|             android:id="@+id/title" | ||||
|             android:layout_width="wrap_content" | ||||
|             android:layout_height="30dp" | ||||
|             android:layout_gravity="left" | ||||
|             android:text="射雕英雄传" | ||||
|             android:textColor="#212121" /> | ||||
|         <TextView | ||||
|             android:id="@+id/desc" | ||||
|             android:layout_marginTop="5dp" | ||||
|             android:layout_width="match_parent" | ||||
|             android:layout_height="wrap_content" | ||||
|             android:gravity="center" | ||||
|             android:textSize="11sp" | ||||
|             android:text=" " | ||||
|             android:textColor="@color/common_google_signin_btn_text_light" /> | ||||
|         <LinearLayout | ||||
|             android:layout_marginTop="5dp" | ||||
|             android:orientation="horizontal" | ||||
|             android:layout_width="match_parent" | ||||
|             android:layout_height="wrap_content" | ||||
|             > | ||||
|             <TextView | ||||
|                 android:id="@+id/author" | ||||
|                 android:layout_width="wrap_content" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 android:text="金庸" | ||||
|                 android:textColor="#212121" /> | ||||
| 
 | ||||
|             <TextView | ||||
|                 android:id="@+id/category" | ||||
|                 android:layout_marginLeft="5dp" | ||||
|                 android:layout_width="wrap_content" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 android:text="武侠小说" | ||||
|                 android:textColor="@color/colorAccent" /> | ||||
| 
 | ||||
|         </LinearLayout> | ||||
|     </LinearLayout> | ||||
| </LinearLayout> | ||||
|  | @ -3,4 +3,5 @@ | |||
|     <color name="colorPrimary">#008577</color> | ||||
|     <color name="colorPrimaryDark">#00574B</color> | ||||
|     <color name="colorAccent">#D81B60</color> | ||||
|     <color name="white">#ffffff</color> | ||||
| </resources> | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue