文章目录

  • 列表页面设计
    • 效果图
    • 具体实现
      • 添加Glide依赖
      • 添加主页面和两个列表布局
      • 用GsonFormat快速创建NewListData实体类存放新闻列表数据
      • MyApi添加一个获取新闻列表的方法
      • 主页面具体代码实现

列表页面设计

效果图

具体实现

添加Glide依赖

implementation 'com.github.bumptech.glide:glide:3.7.0'

添加主页面和两个列表布局


fragmet_new_list

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:orientation="vertical" 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"><com.handmark.pulltorefresh.library.PullToRefreshListViewandroid:id="@+id/pull_listview"android:layout_width="match_parent"android:layout_height="match_parent" /></LinearLayout>

一个图片的列表布局
item_new_one

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout android:orientation="vertical" 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:padding="10dp"android:layout_height="match_parent"><ImageViewandroid:id="@+id/item_image"android:layout_centerVertical="true"android:layout_alignParentRight="true"android:scaleType="centerCrop"android:layout_width="150dp"android:layout_height="100dp" /><TextViewandroid:id="@+id/item_title"android:layout_alignTop="@id/item_image"android:layout_width="280dp"android:lines="2"android:textSize="18sp"android:text="我是标题"android:layout_height="wrap_content" /><TextViewandroid:id="@+id/item_date"android:layout_alignBottom="@id/item_image"android:layout_width="match_parent"android:lines="1"android:textSize="18sp"android:text="2020"android:layout_height="wrap_content" />
</RelativeLayout>

三个图片的列表布局
item_new_three

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:orientation="vertical" 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:padding="10dp"><TextViewandroid:id="@+id/item_title_three"android:layout_width="match_parent"android:lines="1"android:textSize="18sp"android:text="我是标题"android:layout_height="wrap_content" /><LinearLayoutandroid:layout_width="match_parent"android:layout_height="wrap_content"android:orientation="horizontal"android:layout_centerVertical="true"><ImageViewandroid:id="@+id/item_image1_three"android:layout_weight="1"android:layout_width="0dp"android:layout_height="100dp"android:scaleType="centerCrop"/><ImageViewandroid:id="@+id/item_image2_three"android:layout_weight="1"android:layout_width="0dp"android:layout_marginLeft="5dp"android:layout_height="100dp"android:scaleType="centerCrop"/><ImageViewandroid:id="@+id/item_image3_three"android:layout_weight="1"android:layout_width="0dp"android:layout_height="100dp"android:layout_marginLeft="5dp"android:scaleType="centerCrop"/></LinearLayout><TextViewandroid:id="@+id/item_date_three"android:layout_width="wrap_content"android:layout_gravity="right"android:lines="1"android:textSize="15sp"android:text="2020"android:layout_height="wrap_content" />
</LinearLayout>

用GsonFormat快速创建NewListData实体类存放新闻列表数据

NewListData

package com.xzit.bean;import java.util.List;public class NewListData {/*** data : {"countcommenturl":"http://jrtt.qianlong.com/client/content/countComment/","more":"10007/list_2.json","news":[{"comment":true,"commentlist":"/jrtt/10007/comment_1.json","commenturl":"http://jrtt.qianlong.com/client/user/newComment/35319","id":35311,"listimage":"/jrtt/10007/1.jpg","pubdate":"2014-10-1113:18","title":"网上大讲堂第368期预告:义务环保人人有责","type":0,"url":"/jrtt/10007/724D6A55496A11726628.html","listimage1":"/jrtt/10007/4.jpg","listimage2":"/jrtt/10007/5.jpg"},{"comment":true,"commentlist":"/jrtt/10007/comment_1.json","commenturl":"http://jrtt.qianlong.com/client/user/newComment/35319","id":35312,"listimage":"/jrtt/10007/2.jpg","pubdate":"2014-10-1111:20","title":"马路改建为停车场车位年费高达3000元","type":0,"url":"/jrtt/10007/724D6A55496A11726628.html"},{"comment":true,"commentlist":"/jrtt/10007/comment_1.json","commenturl":"http://jrtt.qianlong.com/client/user/newComment/35319","id":35313,"listimage":"/jrtt/10007/3.jpg","listimage1":"/jrtt/10007/4.jpg","listimage2":"/jrtt/10007/5.jpg","pubdate":"2014-10-1110:34","title":"北京两年内将迁出1200家工业污染企业","type":1,"url":"/jrtt/10007/724D6A55496A11726628.html"},{"comment":true,"commentlist":"/jrtt/10007/comment_1.json","commenturl":"http://jrtt.qianlong.com/client/user/newComment/35319","id":35314,"listimage":"/jrtt/10007/6.jpg","pubdate":"2014-10-1110:08","title":"大雾再锁京城机场航班全部延误","type":0,"url":"/jrtt/10007/724D6A55496A11726628.html"},{"comment":true,"commentlist":"/jrtt/10007/comment_1.json","commenturl":"http://jrtt.qianlong.com/client/user/newComment/35319","id":35315,"listimage":"/jrtt/10007/7.jpg","listimage1":"/jrtt/10007/8.jpg","listimage2":"/jrtt/10007/9.jpg","pubdate":"2014-10-1110:03","title":"APEC会议期间调休企业员工盼同步放假","type":1,"url":"/jrtt/10007/724D6A55496A11726628.html"},{"comment":true,"commentlist":"/jrtt/10007/comment_1.json","commenturl":"http://jrtt.qianlong.com/client/user/newComment/35319","id":35316,"listimage":"/jrtt/10007/10.jpg","pubdate":"2014-10-1109:59","title":"机械\u201c龙马\u201d巡演17日亮相奥园","type":0,"url":"/jrtt/10007/724D6A55496A11726628.html"},{"comment":true,"commentlist":"/jrtt/10007/comment_1.json","commenturl":"http://jrtt.qianlong.com/client/user/newComment/35319","id":35310,"listimage":"/jrtt/10007/11.jpg","listimage1":"/jrtt/10007/12.jpg","listimage2":"/jrtt/10007/13.jpg","pubdate":"2014-10-1109:54","title":"门头沟获批100套限价房","type":1,"url":"/jrtt/10007/724D6A55496A11726628.html"},{"comment":true,"commentlist":"/jrtt/10007/comment_1.json","commenturl":"http://jrtt.qianlong.com/client/user/newComment/35319","id":35318,"listimage":"/jrtt/10007/14.jpg","pubdate":"2014-10-1109:52","title":"APEC期间净空区放带灯风筝可拘留","type":0,"url":"/jrtt/10007/724D6A55496A11726628.html"},{"comment":true,"commentlist":"/jrtt/10007/comment_1.json","commenturl":"http://jrtt.qianlong.com/client/user/newComment/35314","id":35314,"listimage":"/jrtt/10007/15.jpg","pubdate":"2014-10-1109:48","title":"今起两自住房摇号","type":0,"url":"/jrtt/10007/724D6A55496A11726628.html"},{"comment":true,"commentlist":"/jrtt/10007/comment_1.json","commenturl":"http://jrtt.qianlong.com/client/user/newComment/35117","id":35117,"listimage":"/jrtt/10007/16.jpg","listimage1":"/jrtt/10007/17.jpg","listimage2":"/jrtt/10007/18.jpg","pubdate":"2014-10-1109:45","title":"故宫神武门广场拟夜间开放停车","type":1,"url":"/jrtt/10007/724D6A55496A11726628.html"}],"title":"北京","topic":[{"description":"11111111","id":10101,"listimage":"/jrtt/10007/1452327318UU91.jpg","sort":1,"title":"北京","url":"/jrtt/10007/list_1.json"},{"description":"22222222","id":10100,"listimage":"/jrtt/10007/1452327318UU91.jpg","sort":2,"title":"222222222222","url":"/jrtt/10007/list_1.json"}],"topnews":[{"comment":true,"commentlist":"/jrtt/10007/comment_1.json","commenturl":"http://jrtt.qianlong.com/client/user/newComment/35301","id":35301,"pubdate":"2020-04-0814:24","title":"蜗居生活","topimage":"/jrtt/10007/1452327318UU91.jpg","type":"news","url":"/jrtt/10007/724D6A55496A11726628.html"},{"comment":true,"commentlist":"/jrtt/10007/comment_1.json","commenturl":"http://jrtt.qianlong.com/client/user/newComment/35125","id":35125,"pubdate":"2020-04-0809:09","title":"中秋赏月","topimage":"/jrtt/10007/1452327318UU92.jpg","type":"news","url":"/jrtt/10007/724D6A55496A11726628.html"},{"comment":true,"commentlist":"/jrtt/10007/comment_1.json","commenturl":"http://jrtt.qianlong.com/client/user/newComment/35125","id":35126,"pubdate":"2020-04-0809:09","title":"天空翱翔","topimage":"/jrtt/10007/1452327318UU93.jpg","type":"news","url":"/jrtt/10007/724D6A55496A11726628.html"},{"comment":true,"commentlist":"/jrtt/10007/comment_1.json","commenturl":"http://jrtt.qianlong.com/client/user/newComment/35125","id":35127,"pubdate":"2020-04-0809:09","title":"感官设计","topimage":"/jrtt/10007/1452327318UU94.png","type":"news","url":"/jrtt/10007/724D6A55496A11726628.html"}]}* retcode : 200*/public DataBean data;public int retcode;public static class DataBean {/*** countcommenturl : http://jrtt.qianlong.com/client/content/countComment/* more : 10007/list_2.json* news : [{"comment":true,"commentlist":"/jrtt/10007/comment_1.json","commenturl":"http://jrtt.qianlong.com/client/user/newComment/35319","id":35311,"listimage":"/jrtt/10007/1.jpg","pubdate":"2014-10-1113:18","title":"网上大讲堂第368期预告:义务环保人人有责","type":0,"url":"/jrtt/10007/724D6A55496A11726628.html"},{"comment":true,"commentlist":"/jrtt/10007/comment_1.json","commenturl":"http://jrtt.qianlong.com/client/user/newComment/35319","id":35312,"listimage":"/jrtt/10007/2.jpg","pubdate":"2014-10-1111:20","title":"马路改建为停车场车位年费高达3000元","type":0,"url":"/jrtt/10007/724D6A55496A11726628.html"},{"comment":true,"commentlist":"/jrtt/10007/comment_1.json","commenturl":"http://jrtt.qianlong.com/client/user/newComment/35319","id":35313,"listimage":"/jrtt/10007/3.jpg","listimage1":"/jrtt/10007/4.jpg","listimage2":"/jrtt/10007/5.jpg","pubdate":"2014-10-1110:34","title":"北京两年内将迁出1200家工业污染企业","type":1,"url":"/jrtt/10007/724D6A55496A11726628.html"},{"comment":true,"commentlist":"/jrtt/10007/comment_1.json","commenturl":"http://jrtt.qianlong.com/client/user/newComment/35319","id":35314,"listimage":"/jrtt/10007/6.jpg","pubdate":"2014-10-1110:08","title":"大雾再锁京城机场航班全部延误","type":0,"url":"/jrtt/10007/724D6A55496A11726628.html"},{"comment":true,"commentlist":"/jrtt/10007/comment_1.json","commenturl":"http://jrtt.qianlong.com/client/user/newComment/35319","id":35315,"listimage":"/jrtt/10007/7.jpg","listimage1":"/jrtt/10007/8.jpg","listimage2":"/jrtt/10007/9.jpg","pubdate":"2014-10-1110:03","title":"APEC会议期间调休企业员工盼同步放假","type":1,"url":"/jrtt/10007/724D6A55496A11726628.html"},{"comment":true,"commentlist":"/jrtt/10007/comment_1.json","commenturl":"http://jrtt.qianlong.com/client/user/newComment/35319","id":35316,"listimage":"/jrtt/10007/10.jpg","pubdate":"2014-10-1109:59","title":"机械\u201c龙马\u201d巡演17日亮相奥园","type":0,"url":"/jrtt/10007/724D6A55496A11726628.html"},{"comment":true,"commentlist":"/jrtt/10007/comment_1.json","commenturl":"http://jrtt.qianlong.com/client/user/newComment/35319","id":35310,"listimage":"/jrtt/10007/11.jpg","listimage1":"/jrtt/10007/12.jpg","listimage2":"/jrtt/10007/13.jpg","pubdate":"2014-10-1109:54","title":"门头沟获批100套限价房","type":1,"url":"/jrtt/10007/724D6A55496A11726628.html"},{"comment":true,"commentlist":"/jrtt/10007/comment_1.json","commenturl":"http://jrtt.qianlong.com/client/user/newComment/35319","id":35318,"listimage":"/jrtt/10007/14.jpg","pubdate":"2014-10-1109:52","title":"APEC期间净空区放带灯风筝可拘留","type":0,"url":"/jrtt/10007/724D6A55496A11726628.html"},{"comment":true,"commentlist":"/jrtt/10007/comment_1.json","commenturl":"http://jrtt.qianlong.com/client/user/newComment/35314","id":35314,"listimage":"/jrtt/10007/15.jpg","pubdate":"2014-10-1109:48","title":"今起两自住房摇号","type":0,"url":"/jrtt/10007/724D6A55496A11726628.html"},{"comment":true,"commentlist":"/jrtt/10007/comment_1.json","commenturl":"http://jrtt.qianlong.com/client/user/newComment/35117","id":35117,"listimage":"/jrtt/10007/16.jpg","listimage1":"/jrtt/10007/17.jpg","listimage2":"/jrtt/10007/18.jpg","pubdate":"2014-10-1109:45","title":"故宫神武门广场拟夜间开放停车","type":1,"url":"/jrtt/10007/724D6A55496A11726628.html"}]* title : 北京* topic : [{"description":"11111111","id":10101,"listimage":"/jrtt/10007/1452327318UU91.jpg","sort":1,"title":"北京","url":"/jrtt/10007/list_1.json"},{"description":"22222222","id":10100,"listimage":"/jrtt/10007/1452327318UU91.jpg","sort":2,"title":"222222222222","url":"/jrtt/10007/list_1.json"}]* topnews : [{"comment":true,"commentlist":"/jrtt/10007/comment_1.json","commenturl":"http://jrtt.qianlong.com/client/user/newComment/35301","id":35301,"pubdate":"2020-04-0814:24","title":"蜗居生活","topimage":"/jrtt/10007/1452327318UU91.jpg","type":"news","url":"/jrtt/10007/724D6A55496A11726628.html"},{"comment":true,"commentlist":"/jrtt/10007/comment_1.json","commenturl":"http://jrtt.qianlong.com/client/user/newComment/35125","id":35125,"pubdate":"2020-04-0809:09","title":"中秋赏月","topimage":"/jrtt/10007/1452327318UU92.jpg","type":"news","url":"/jrtt/10007/724D6A55496A11726628.html"},{"comment":true,"commentlist":"/jrtt/10007/comment_1.json","commenturl":"http://jrtt.qianlong.com/client/user/newComment/35125","id":35126,"pubdate":"2020-04-0809:09","title":"天空翱翔","topimage":"/jrtt/10007/1452327318UU93.jpg","type":"news","url":"/jrtt/10007/724D6A55496A11726628.html"},{"comment":true,"commentlist":"/jrtt/10007/comment_1.json","commenturl":"http://jrtt.qianlong.com/client/user/newComment/35125","id":35127,"pubdate":"2020-04-0809:09","title":"感官设计","topimage":"/jrtt/10007/1452327318UU94.png","type":"news","url":"/jrtt/10007/724D6A55496A11726628.html"}]*/public String countcommenturl;public String more;public String title;public List<NewsBean> news;public List<TopicBean> topic;public List<TopnewsBean> topnews;public static class NewsBean {/*** comment : true* commentlist : /jrtt/10007/comment_1.json* commenturl : http://jrtt.qianlong.com/client/user/newComment/35319* id : 35311* listimage : /jrtt/10007/1.jpg* pubdate : 2014-10-1113:18* title : 网上大讲堂第368期预告:义务环保人人有责* type : 0* url : /jrtt/10007/724D6A55496A11726628.html* listimage1 : /jrtt/10007/4.jpg* listimage2 : /jrtt/10007/5.jpg*/public boolean comment;public String commentlist;public String commenturl;public int id;public String listimage;public String pubdate;public String title;public int type;public String url;public String listimage1;public String listimage2;}public static class TopicBean {/*** description : 11111111* id : 10101* listimage : /jrtt/10007/1452327318UU91.jpg* sort : 1* title : 北京* url : /jrtt/10007/list_1.json*/public String description;public int id;public String listimage;public int sort;public String title;public String url;}public static class TopnewsBean {/*** comment : true* commentlist : /jrtt/10007/comment_1.json* commenturl : http://jrtt.qianlong.com/client/user/newComment/35301* id : 35301* pubdate : 2020-04-0814:24* title : 蜗居生活* topimage : /jrtt/10007/1452327318UU91.jpg* type : news* url : /jrtt/10007/724D6A55496A11726628.html*/public boolean comment;public String commentlist;public String commenturl;public int id;public String pubdate;public String title;public String topimage;public String type;public String url;}}
}

MyApi添加一个获取新闻列表的方法

MyApi

public interface MyApi {//注解与方法组成实现类@GET("home.json")public Call<ResponseData> getType();@GET("10007/list_1.json")public  Call<NewListData> getNewList();
}

主页面具体代码实现

import android.graphics.Color;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;import com.bumptech.glide.Glide;
import com.example.administrator.zhjrtt.R;
import com.google.gson.Gson;
import com.handmark.pulltorefresh.library.PullToRefreshListView;
import com.xzit.bean.NewListData;
import com.xzit.fragment.BaseFragment;
import com.xzit.net.MyApi;import java.util.List;import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;//1.继承BaseFragment
public class Page1Fragment extends BaseFragment {//2.重写getMyView//3.布局列表View fragmentView;@Overrideprotected View getMyView() {//4.加载布局fragmentView = View.inflate(getContext(), R.layout.fragment_new_list,null);return fragmentView;}//5.请求服务端数据@Overridepublic void onActivityCreated(@Nullable Bundle savedInstanceState) {super.onActivityCreated(savedInstanceState);Retrofit retrofit = new Retrofit.Builder()//创建器.baseUrl("http://192.168.31.114:8080/jrtt/")//项目路径,以/结束.addConverterFactory(GsonConverterFactory.create(new Gson())).build();//执行创建//6.执行请求retrofit.create(MyApi.class).getNewList().enqueue(new Callback<NewListData>() {@Overridepublic void onResponse(Call<NewListData> call, Response<NewListData> response) {//将请求的数据传给视图setDataToView(response.body().data);}@Overridepublic void onFailure(Call<NewListData> call, Throwable t) {}});}//7.显示private void setDataToView(NewListData.DataBean data) {//查找空间PullToRefreshListView pullToRefreshListView = fragmentView.findViewById(R.id.pull_listview);//赋值一个适配器NewListAdapter adapter = new NewListAdapter(data.news);pullToRefreshListView.setAdapter(adapter);}class ViewHolderOne{public TextView title;public TextView date;public ImageView image;}class ViewHolderThree extends ViewHolderOne{public ImageView image1;public ImageView image2;}//8.定义适配器class NewListAdapter extends BaseAdapter {private List<NewListData.DataBean.NewsBean> listData;public NewListAdapter( List<NewListData.DataBean.NewsBean> list) {listData = list;}@Overridepublic int getViewTypeCount() {//返回两种视图,一种是一图的,一种是三图的return 2;}@Overridepublic int getItemViewType(int position) {NewListData.DataBean.NewsBean bean = listData.get(position);if(bean.type==0){//一图return 0;//R.layout.item_new_one.xml}else {//三图return 1;R.layout.item_new_three.xml}}@Overridepublic int getCount() {return listData.size();}@Overridepublic Object getItem(int position) {return null;}@Overridepublic long getItemId(int position) {return 0;}@Overridepublic View getView(int position, View convertView, ViewGroup parent) {ViewHolderOne holderOne = null;ViewHolderThree holderThree = null;//获取数据NewListData.DataBean.NewsBean newsBean = listData.get(position);//判断当前的视图是一图还是三图int type = getItemViewType(position);if(type==0){//一图return setDataToOneView(convertView, newsBean);}else {//三图return setDataToThreeView(convertView, newsBean);}}@NonNullprivate View setDataToThreeView(View convertView, NewListData.DataBean.NewsBean newsBean) {ViewHolderThree holderThree;if(convertView == null){convertView = View.inflate(getContext(),R.layout.item_new_three,null);holderThree = new ViewHolderThree();holderThree.title = convertView.findViewById(R.id.item_title_three);holderThree.date = convertView.findViewById(R.id.item_date_three);holderThree.image = convertView.findViewById(R.id.item_image1_three);holderThree.image1 = convertView.findViewById(R.id.item_image2_three);holderThree.image2 = convertView.findViewById(R.id.item_image3_three);convertView.setTag(holderThree);}else {holderThree = (ViewHolderThree) convertView.getTag();}holderThree.title.setText(newsBean.title);holderThree.date.setText(newsBean.pubdate);String imageUrl= "http://192.168.31.114:8080"+newsBean.listimage;String imageUrl1= "http://192.168.31.114:8080"+newsBean.listimage1;String imageUrl2= "http://192.168.31.114:8080"+newsBean.listimage2;Glide.with(getContext()).load(imageUrl).into(holderThree.image);Glide.with(getContext()).load(imageUrl1).into(holderThree.image1);Glide.with(getContext()).load(imageUrl2).into(holderThree.image2);return convertView;}//当视图是一张图片时@NonNullprivate View setDataToOneView(View convertView, NewListData.DataBean.NewsBean newsBean) {ViewHolderOne holderOne;if(convertView ==null){//视图不是重用时convertView = View.inflate(getContext(),R.layout.item_new_one,null);holderOne = new ViewHolderOne();holderOne. title = convertView.findViewById(R.id.item_title);holderOne. date = convertView.findViewById(R.id.item_date);holderOne. image = convertView.findViewById(R.id.item_image);convertView.setTag(holderOne);}else {//视图重用holderOne= (ViewHolderOne) convertView.getTag();}holderOne. title.setText(newsBean.title);holderOne. date.setText(newsBean.pubdate);String imageUrl= "http://192.168.31.114:8080"+newsBean.listimage;Glide.with(getContext()).load(imageUrl).into(holderOne.image);return convertView;}}
}

(仿头条APP项目)5.列表页面设计实现相关推荐

  1. (仿头条APP项目)7.首页标签页完善和微头条页面设计实现

    文章目录 一.首页标签页完善 效果图 具体实现 二.微头条页面设计实现 效果图 实现思路 具体实现 布局 微头条页面实体类 业务逻辑代码 一.首页标签页完善 在之前已经把首页北京标签的新闻列表页面基本 ...

  2. (仿头条App项目)9.视频列表页面实现

    文章目录 视频列表页面实现 效果图 相关布局 功能实现 引入第三方视频库插件 从服务端获取数据 显示 滚动播放功能实现 视频列表页面实现 效果图 相关布局 视频VideoFragment页面放一个Li ...

  3. (仿头条APP项目)8.新闻详情页面实现和butterknife插件使用

    文章目录 butterknife插件使用 导入依赖 下载插件 使用 新闻详情页面显示 效果图 实现思路 具体实现 布局 数据库添加收藏表 新闻详情页面具体业务逻辑实现 详情页面跳转 效果图 具体实现步 ...

  4. (仿头条APP项目)2.主界面按钮切换Fragment页面

    文章目录 主界面按钮切换Fragment页面 效果展示 框架结构 xml视图 主视图 选择器和style java代码模块 创建4个Fragment 1.绑定按钮选择事件 2.初始化和用HashMap ...

  5. (仿头条APP项目)6.点击过的新闻列表文字变灰和下拉刷新与滚动加载新闻数据

    文章目录 一.点击过的新闻列表文字变灰 效果图 实现思路 导入ormlite数据库类依赖 利用ormlite创建数据库和表 创建数据库类MyDbHelper 创建数据库中的新闻实体类NewInfo 页 ...

  6. (仿头条APP项目)3.二级页面首页的ViewPager页面切换

    文章目录 二级页面首页的ViewPager页面切换 效果展示 代码实现 创建几个三级页面Fragment视图 ViewPager的Fragment数据丢失问题 创建fragment_home视图文件 ...

  7. (仿头条APP项目)4.父类BaseFragment创建,用retrofit和gson获取并解析服务器端数据

    文章目录 父类BaseFragment创建,用retrofit和gson获取并解析服务器端数据 效果展示 创建父类BaseFragment解决代码重复问题 用retrofit和gson获取并解析服务器 ...

  8. (仿头条APP项目)1.app载入界面相关功能实现

    app载入界面相关功能实现 模块功能 1.设置页面布局 2.初始化视频播放 //控制是否跳到主界面private boolean isjump = false;private VideoView vi ...

  9. 头条App项目测试实战(二)App手工测试流程以及需求分析与评审

    熟悉头条App项目步骤: 业务特性 用户与角色 组织架构图 技术栈 头条App测试流程(一次迭代) 测试流程 需求分析与评审 编写测试计划(测试方案) 设计测试用例与评审 执行测试用例与缺陷跟踪 编写 ...

最新文章

  1. 实录 | 平安人寿资深算法工程师姚晓远:对话生成模型的探析与创新
  2. AWS 用户指南笔记
  3. html查看程序魅族,怎么查看源代码(什么工具能查出一个程序的代码)
  4. 为什么中国开发不出流行的操作系统和编程语言呢?
  5. php h5微信公众号支付接口,微信公众号H5支付接口调用方法
  6. 【网络编程】中文字符、时间等编码转换
  7. java两个数最大公约数和最小公倍数,java求两个数的最大公约数和最小公倍数
  8. CAS 单点登录模块学习
  9. synchronized的实现原理用法详解
  10. <论文阅读> M2BEV Multi-Camera Joint 3D Detection and Segmentation with Unified Bird’s-Eye View Represen
  11. python normalize函数_Python normalize包_程序模块 - PyPI - Python中文网
  12. paas平台_paas平台排名
  13. ie禁用java怎么办,您如何解决IE中禁用javascript的问题?
  14. Javaweb中上传图片,获取相对路径,绝对路径
  15. 计算机自动化程序高 应用范围广是由于,计算机等级考试一级笔试模拟试题(三)及答案...
  16. Node.js阶段学习(一)
  17. 表格css样式 ——表格背景,隔行变色,触摸表格变色
  18. 光谱相似指数Spectral Similarity Index(SSI)计算
  19. android 购物车操作并发,Android 购物车页面和逻辑实现
  20. 数字电路硬件设计系列(十三)之HDMI电路设计

热门文章

  1. TEE_ObjectHandle在Crypto中的使用
  2. Boost Part III. 函数对象与高级编程 Library 10. Lambda 用法
  3. C++ priority_queue用法
  4. ReadFile 和 补充CreateFile
  5. 【Web安全】JSP内存马研究
  6. 【安全漏洞】苹果取证的分析
  7. C#使用RSA加密解密文件
  8. 【Curl】 获取网站下载速率(Bytes/s)
  9. sqrt()函数的详解和用法
  10. 1.1.1 数据结构的基本概念