bean类(3秒钟教你如何创建所需实体类)

SkipActivity
跳转界面

package com.example.smartcity.bean;

import android.content.Context;
import android.content.Intent;

import com.example.smartcity.activity.EmptyActivity;

import static com.example.smartcity.utils.KeyUtils.VALUES;

public class SkipActivity {
    //跳转界面
    public static void skipEmptyActivity(String name, Context context){
        Intent intent = new Intent(context, EmptyActivity.class);
        intent.putExtra(VALUES,name);
        context.startActivity(intent);
    }
}

NewsInfoSkip
新闻信息实体类

package com.example.smartcity.bean;

import java.io.Serializable;

public class NewsInfoSkip implements Serializable {
    private String image;
    private String title;
    private String content;
    private int id;

    public NewsInfoSkip() {
    }


    public NewsInfoSkip(String image, String title, String content, int id) {
        this.image = image;
        this.title = title;
        this.content = content;
        this.id = id;
    }


    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }


}

ServicesIcon
服务gridview

package com.example.smartcity.bean;

public class ServicesIcon {
    private int image;
    private String title;

    public int getImage() {
        return image;
    }

    public void setImage(int image) {
        this.image = image;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public ServicesIcon() {
    }


    public ServicesIcon(int image, String title) {
        this.image = image;
        this.title = title;
    }



}

PersonInfo
用户信息栏目

package com.example.smartcity.bean;

public class PersonInfo {

    private int image;
    private String name;
    private int toImg;

    public PersonInfo(int image, String name, int backImg) {
        this.image = image;
        this.name = name;
        this.toImg = backImg;
    }


    public PersonInfo() {
    }



    public int getImage() {
        return image;
    }

    public void setImage(int image) {
        this.image = image;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getBackImg() {
        return toImg;
    }

    public void setBackImg(int backImg) {
        this.toImg = backImg;
    }
}

ColumnInfo
地铁关于我们栏目
package com.example.smartcity.bean;

public class ColumnInfo {

private int icon;
private String name;

public ColumnInfo() {
}

public ColumnInfo(int icon, String name) {
    this.icon = icon;
    this.name = name;
}



public int getIcon() {
    return icon;
}

public void setIcon(int icon) {
    this.icon = icon;
}

public String getName() {
    return name;
}

public void setName(String name) {
    this.name = name;
}

}

StarNewsSkipContent
电影新闻跳转

package com.example.smartcity.bean;

import java.io.Serializable;

public class StarNewsSkipContent implements Serializable {
    private String name;
    private String  image;
    private String content;
    private int likeNum;
    private int id;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }



    public StarNewsSkipContent() {
    }



    public StarNewsSkipContent(String  image, String content, int likeNum, int id,String name) {
        this.image = image;
        this.content = content;
        this.likeNum = likeNum;
        this.id = id;
        this.name = name;
    }



    public String  getImage() {
        return image;
    }

    public void setImage(String  image) {
        this.image = image;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public int getLikeNum() {
        return likeNum;
    }

    public void setLikeNum(int likeNum) {
        this.likeNum = likeNum;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }


}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

玛丽莲.梦露

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值