CommonBean.java
1.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/*
* Copyright (c) Wondertek Technologies Co., Ltd. 2021-2021. All rights reserved.
*/
package com.wd.foundation.bean.base;
import android.text.TextUtils;
/**
* 基础数据bean,主要实现序列化
*
* @author zhangbo
* @version [V1.0.0, 2022/2/28]
* @since V1.0.0
*/
public class CommonBean extends BaseBean {
/**
* 是否曝光过 false: 没有曝光;true: 曝光过
*/
private boolean exposure = false;
/**
* 位置
*/
private int exposureIndex;
/**
* 双列Feed,单Feed流
* 检测是否竖屏展示数据
* 1.竖图图片,横图图片都存在,根据langScape判断为2走竖图模板,不为2走横图模板;
* 2.竖图图片,横图图片都不存在,走竖图模板;
* 3.只有竖图图片存在,走竖图模板;
* 4.只有横图图片存在,走横图模板。
*
* @return true 是
*/
public static boolean showVStye(String landscape, String vImage, String hImage) {
if (!TextUtils.isEmpty(vImage) && !TextUtils.isEmpty(hImage)) {
if ("2".equals(landscape)) {
// 竖图
return true;
} else {
// 横图
return false;
}
}
// 只有竖图图片存在,走竖图模板
if (!TextUtils.isEmpty(vImage)) {
return true;
}
// 只有横图图片存在,走横图模板。
if (!TextUtils.isEmpty(hImage)) {
return false;
}
return true;
}
public boolean isExposure() {
return exposure;
}
public void setExposure(boolean exposure) {
this.exposure = exposure;
}
public int getExposureIndex() {
return exposureIndex;
}
public void setExposureIndex(int exposureIndex) {
this.exposureIndex = exposureIndex;
}
}