Commit e2914fbc by wjg

init

parent a9aebfdb
......@@ -8,10 +8,21 @@ android {
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "com.ihaoin.hooloo.device"
minSdkVersion 24
minSdkVersion 26
targetSdkVersion 30
versionCode 1
versionName "1.0"
ndk {
//选择要添加的对应 cpu 类型的 .so 库。
abiFilters 'armeabi', 'armeabi-v7a', 'arm64-v8a'
// 还可以添加 'x86', 'x86_64', 'mips', 'mips64'
}
manifestPlaceholders = [
JPUSH_PKGNAME : applicationId,
JPUSH_APPKEY : "682a53c0cd0201792d45c469", //JPush 上注册的包名对应的 Appkey.
JPUSH_CHANNEL : "developer-default", //暂时填写默认值即可.
]
}
buildTypes {
release {
......@@ -19,10 +30,19 @@ android {
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
repositories {
flatDir {
dirs 'libs'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar', '*.aar'], dir: 'libs')
implementation fileTree(dir: 'libs', include: ['*.jar',"*.aar"])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.34'
implementation 'com.google.android.material:material:1.2.1'
......@@ -35,6 +55,13 @@ dependencies {
implementation 'com.squareup.okhttp3:okhttp:3.5.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.fasterxml.jackson.core:jackson-core:2.10.0'
implementation'com.fasterxml.jackson.core:jackson-databind:2.10.0'
implementation 'com.alibaba:fastjson:2.0.2.android'
implementation 'com.aliyun.alink.linksdk:iot-linkkit:1.7.2'
implementation 'com.aliyun.alink.linksdk:public-channel-core:0.7.7.1'
implementation 'com.aliyun.alink.linksdk:iot-device-manager:1.7.5.0'
// 引入极光 SDK
implementation project(':library_jiguang')
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.ihaoin.hooloo.device"
android:versionCode="1"
android:versionName="1.0">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.READ_PROFILE" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
<application
android:name=".HLApplication"
......@@ -13,11 +20,13 @@
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme"
android:usesCleartextTraffic="true">
android:usesCleartextTraffic="true"
tools:replace="android:allowBackup">
<activity
android:name=".view.LauncherActivity"
android:label="@string/app_name"
android:exported="true"
android:screenOrientation="landscape">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
......@@ -28,6 +37,22 @@
<category android:name="android.intent.category.MONKEY" />
</intent-filter>
</activity>
<receiver
android:name=".component.PushMessageReceiver"
android:exported="true">
<intent-filter>
<action android:name="cn.jpush.android.intent.RECEIVE_MESSAGE" />
<category android:name="com.ihaoin.hooloo.device"></category>
</intent-filter>
</receiver>
<service
android:name=".component.PushService"
android:exported="true"
android:process=":pushcore">
<intent-filter>
<action android:name="cn.jiguang.user.service.action" />
</intent-filter>
</service>
</application>
</manifest>
\ No newline at end of file
......@@ -4,6 +4,8 @@ import android.app.Application;
import com.ihaoin.hooloo.device.config.AppConfig;
import cn.jpush.android.api.JPushInterface;
public class HLApplication extends Application {
@Override
......@@ -12,6 +14,9 @@ public class HLApplication extends Application {
AppConfig.MACHINE_CODE = ""; // TODO 获取机器编码
AppConfig.SCREEN_NO = ""; // TODO 点单屏编码
JPushInterface.setDebugMode(true);
JPushInterface.init(this);
}
@Override
......
package com.ihaoin.hooloo.device.adapter;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;
import com.ihaoin.hooloo.device.R;
import com.ihaoin.hooloo.device.data.vo.Order;
import com.ihaoin.hooloo.device.util.CollectionUtils;
import java.util.List;
public class OrderAdapter extends BaseAdapter {
private Context mContext;
private List<Order> orders;
public OrderAdapter(Context context) {
this.mContext = context;
}
public List<Order> getOrders() {
return orders;
}
public void setOrders(List<Order> orders) {
this.orders = orders;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
Order order = (Order) this.getItem(position);
TextView textView = (TextView) LayoutInflater.from(mContext).inflate(R.layout.item_number, null);
textView.setText(order.getOrderNumber());
textView.setTag(order);
convertView = textView;
return convertView;
}
@Override
public boolean isEmpty() {
return CollectionUtils.isEmpty(orders);
}
@Override
public int getCount() {
return isEmpty() ? 0 : orders.size();
}
@Override
public Object getItem(int position) {
return isEmpty() ? null : orders.get(position);
}
@Override
public long getItemId(int position) {
return isEmpty() ? 0 : orders.get(position).getOrderId();
}
}
......@@ -30,21 +30,6 @@ public class TrolleyAdapter extends BaseAdapter {
}
@Override
public int getCount() {
return isEmpty() ? 0 : getTrolleyGoods().size();
}
@Override
public Object getItem(int position) {
return isEmpty() ? null : getTrolleyGoods().get(position);
}
@Override
public long getItemId(int position) {
return 0;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
TrolleyGoods goods = (TrolleyGoods) this.getItem(position);
convertView = LayoutInflater.from(mContext).inflate(R.layout.item_trolley, null);
......@@ -101,4 +86,19 @@ public class TrolleyAdapter extends BaseAdapter {
public boolean isEmpty() {
return getTrolleyGoods() == null || getTrolleyGoods().isEmpty() ? true : false;
}
@Override
public int getCount() {
return isEmpty() ? 0 : getTrolleyGoods().size();
}
@Override
public Object getItem(int position) {
return isEmpty() ? null : getTrolleyGoods().get(position);
}
@Override
public long getItemId(int position) {
return 0;
}
}
package com.ihaoin.hooloo.device.component;
import android.content.Context;
import android.os.Handler;
import android.os.Message;
import android.util.Log;
import androidx.annotation.NonNull;
import com.ihaoin.hooloo.device.config.AppConfig;
/**
* 所有网络请求处理父类
*/
public abstract class NetworkHandler extends Handler {
private static final String TAG = "Network";
private Context mContext;
public NetworkHandler(@NonNull Context context) {
this.mContext = context;
}
@Override
public void handleMessage(@NonNull Message msg) {
super.handleMessage(msg);
if (AppConfig.DEBUG) {
String msgText = String.format("返回状态:%s, 返回内容:%s", msg.what, msg.obj);
Log.d(TAG, msgText);
}
if (msg == null || msg.what == 0) {
return;
}
}
}
package com.ihaoin.hooloo.device.component;
import android.content.Context;
import android.content.Intent;
import android.os.Handler;
import android.os.Message;
import android.util.Log;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.ihaoin.hooloo.device.network.HttpUtil;
import com.ihaoin.hooloo.device.util.CollectionUtils;
import java.util.HashMap;
import java.util.Map;
import cn.jpush.android.api.CmdMessage;
import cn.jpush.android.api.CustomMessage;
import cn.jpush.android.api.JPushInterface;
import cn.jpush.android.api.JPushMessage;
import cn.jpush.android.api.NotificationMessage;
import cn.jpush.android.service.JPushMessageReceiver;
public class PushMessageReceiver extends JPushMessageReceiver {
private static final String TAG = "PushMessageReceiver";
private static Map<String, Handler> subscribers = new HashMap<>();
public static void subscribe(String key, Handler handler) {
subscribers.put(key, handler);
}
public static void unsubscribe(String key, Handler handler) {
subscribers.remove(key);
}
@Override
public void onMessage(Context context, CustomMessage customMessage) {
Log.e(TAG, "[onMessage] " + customMessage);
dispatchMsg(customMessage);
}
private void dispatchMsg(CustomMessage customMessage) {
if (CollectionUtils.isEmpty(subscribers)) {
Log.e(TAG, "msg subscribers is empty");
return;
}
JSONObject jsonObject = JSON.parseObject(customMessage.message);
String action = jsonObject.getString("action");
Handler handler = subscribers.get(action);
if (handler == null) {
Log.e(TAG, String.format("msg action[%s] subscribers is empty", action));
return;
}
JSONObject data = jsonObject.getJSONObject("data");
Message msg = handler.obtainMessage(1, data.toJSONString());
handler.sendMessage(msg);
}
@Override
public void onNotifyMessageOpened(Context context, NotificationMessage message) {
Log.e(TAG, "[onNotifyMessageOpened] " + message);
try {
//打开自定义的Activity
// Intent i = new Intent(context, TestActivity.class);
// Bundle bundle = new Bundle();
// bundle.putString(JPushInterface.EXTRA_NOTIFICATION_TITLE,message.notificationTitle);
// bundle.putString(JPushInterface.EXTRA_ALERT,message.notificationContent);
// i.putExtras(bundle);
// i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP );
// context.startActivity(i);
} catch (Throwable throwable) {
}
}
@Override
public void onMultiActionClicked(Context context, Intent intent) {
Log.e(TAG, "[onMultiActionClicked] 用户点击了通知栏按钮");
String nActionExtra = intent.getExtras().getString(JPushInterface.EXTRA_NOTIFICATION_ACTION_EXTRA);
//开发者根据不同 Action 携带的 extra 字段来分配不同的动作。
if (nActionExtra == null) {
Log.d(TAG, "ACTION_NOTIFICATION_CLICK_ACTION nActionExtra is null");
return;
}
if (nActionExtra.equals("my_extra1")) {
Log.e(TAG, "[onMultiActionClicked] 用户点击通知栏按钮一");
} else if (nActionExtra.equals("my_extra2")) {
Log.e(TAG, "[onMultiActionClicked] 用户点击通知栏按钮二");
} else if (nActionExtra.equals("my_extra3")) {
Log.e(TAG, "[onMultiActionClicked] 用户点击通知栏按钮三");
} else {
Log.e(TAG, "[onMultiActionClicked] 用户点击通知栏按钮未定义");
}
}
@Override
public void onNotifyMessageArrived(Context context, NotificationMessage message) {
Log.e(TAG, "[onNotifyMessageArrived] " + message);
}
@Override
public void onNotifyMessageDismiss(Context context, NotificationMessage message) {
Log.e(TAG, "[onNotifyMessageDismiss] " + message);
}
@Override
public void onRegister(Context context, String registrationId) {
Log.e(TAG, "[onRegister] " + registrationId);
HttpUtil.postRegistrationId(registrationId, null);
}
@Override
public void onConnected(Context context, boolean isConnected) {
Log.e(TAG, "[onConnected] " + isConnected);
}
@Override
public void onCommandResult(Context context, CmdMessage cmdMessage) {
Log.e(TAG, "[onCommandResult] " + cmdMessage);
}
@Override
public void onTagOperatorResult(Context context, JPushMessage jPushMessage) {
// TagAliasOperatorHelper.getInstance().onTagOperatorResult(context,jPushMessage);
super.onTagOperatorResult(context, jPushMessage);
}
@Override
public void onCheckTagOperatorResult(Context context, JPushMessage jPushMessage) {
// TagAliasOperatorHelper.getInstance().onCheckTagOperatorResult(context,jPushMessage);
super.onCheckTagOperatorResult(context, jPushMessage);
}
@Override
public void onAliasOperatorResult(Context context, JPushMessage jPushMessage) {
// TagAliasOperatorHelper.getInstance().onAliasOperatorResult(context,jPushMessage);
super.onAliasOperatorResult(context, jPushMessage);
}
@Override
public void onMobileNumberOperatorResult(Context context, JPushMessage jPushMessage) {
// TagAliasOperatorHelper.getInstance().onMobileNumberOperatorResult(context,jPushMessage);
super.onMobileNumberOperatorResult(context, jPushMessage);
}
@Override
public void onNotificationSettingsCheck(Context context, boolean isOn, int source) {
super.onNotificationSettingsCheck(context, isOn, source);
Log.e(TAG, "[onNotificationSettingsCheck] isOn:" + isOn + ",source:" + source);
}
}
package com.ihaoin.hooloo.device.component;
import cn.jpush.android.service.JCommonService;
public class PushService extends JCommonService {
}
package com.ihaoin.hooloo.device.config;
public class AppConfig {
/** 机器编码 */
public static Boolean DEBUG = true;
/**
* 机器编码
*/
public static String MACHINE_CODE = "";
/** 点单屏编码 */
/**
* 点单屏编码
*/
public static String SCREEN_NO = "";
}
......@@ -3,4 +3,11 @@ package com.ihaoin.hooloo.device.config;
public class Base {
public static final Integer TRUE = 1;
public static final Integer FALSE = 0;
public static final String NOTIFY_ACTION_ORDER_STATE_CHANGED = "ORDER_STATE_CHANGED";
public static final String NOTIFY_ACTION_QRCODE_VISITED = "QRCODE_VISITED";
public static final String ADD_GOODS_ACTION = "ADD_GOODS_ACTION";
public static final String GOODS_CHANGED_ACTION = "GOODS_CHANGED_ACTION";
public static final String CLEAR_GOODS_ACTION = "CLEAR_GOODS_ACTION";
}
......@@ -3,16 +3,17 @@ package com.ihaoin.hooloo.device.data;
import com.ihaoin.hooloo.device.data.vo.Category;
import com.ihaoin.hooloo.device.data.vo.Recommend;
import com.ihaoin.hooloo.device.data.vo.RightImage;
import java.util.List;
import java.util.Map;
public class Datas {
public static Integer COUNT_OF_ORDER = 9;
public static String tips = "http://www.baidu.com";
public static Integer SHOP_STATE = 1;
public static List<String> leftImages;
public static Map<Integer, String> rightImages;
public static List<RightImage> rightImages;
public static List<Recommend> recommends;
public static List<Category> categorys;
......
package com.ihaoin.hooloo.device.data.enums;
public enum ImageState {
CLOSED(0, "歇业"),
COOKING(1, "制作中"),
COMPLETED(2, "有待取餐"),
NOT_COMPLETED(3, "无待取餐");
private Integer code;
private String name;
ImageState(Integer code, String name) {
this.code = code;
this.name = name;
}
public static ImageState get(Integer code) {
for (ImageState state : ImageState.values()) {
if (state.getCode().equals(code)) {
return state;
}
}
return null;
}
public Integer getCode() {
return code;
}
public String getName() {
return name;
}
}
package com.ihaoin.hooloo.device.data.enums;
public enum OrderState {
COOKING(1, "制作中"),
WAITING(2, "待制作"),
COMPLETED(3, "可取餐");
private Integer code;
private String name;
OrderState(Integer code, String name) {
this.code = code;
this.name = name;
}
public static OrderState get(Integer code) {
for (OrderState state : OrderState.values()) {
if (state.getCode().equals(code)) {
return state;
}
}
return null;
}
public Integer getCode() {
return code;
}
public String getName() {
return name;
}
}
package com.ihaoin.hooloo.device.data.vo;
import java.io.Serializable;
import java.util.Objects;
public class Order implements Serializable {
/**
* 订单id
*/
private Integer orderId;
/**
* 订单编号
*/
private String orderNo;
/**
* 流水号
*/
private String orderNumber;
public Integer getOrderId() {
return orderId;
}
public void setOrderId(Integer orderId) {
this.orderId = orderId;
}
public String getOrderNo() {
return orderNo;
}
public void setOrderNo(String orderNo) {
this.orderNo = orderNo;
}
public String getOrderNumber() {
return orderNumber;
}
public void setOrderNumber(String orderNumber) {
this.orderNumber = orderNumber;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Order order = (Order) o;
return Objects.equals(orderId, order.orderId);
}
@Override
public int hashCode() {
return Objects.hash(orderId);
}
}
package com.ihaoin.hooloo.device.data.vo;
import java.io.Serializable;
import java.util.List;
public class OrderPkg implements Serializable {
/**
* 状态
*/
private Integer state;
/**
* 名称
*/
private String desc;
/**
* 订单信息
*/
private List<Order> orders;
public Integer getState() {
return state;
}
public void setState(Integer state) {
this.state = state;
}
public String getDesc() {
return desc;
}
public void setDesc(String desc) {
this.desc = desc;
}
public List<Order> getOrders() {
return orders;
}
public void setOrders(List<Order> orders) {
this.orders = orders;
}
}
package com.ihaoin.hooloo.device.data.vo;
import java.io.Serializable;
public class RightImage implements Serializable {
/**
* 状态
*/
private Integer state;
/**
* 网址
*/
private String url;
public Integer getState() {
return state;
}
public void setState(Integer state) {
this.state = state;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public RightImage(Integer state, String url) {
this.state = state;
this.url = url;
}
}
......@@ -5,5 +5,7 @@ public class BaseParams {
private static final String HOST = "http://www.baidu.com";
public static final String GET_MAIN_DATA = HOST + "/mainData";
public static final String GET_ORDERS = HOST + "/confirm/order";
public static final String POST_CONFIRM_ORDER = HOST + "/confirm/order";
public static final String POST_REGISTRATION_ID = HOST + "/confirm/order";
}
......@@ -2,6 +2,7 @@ package com.ihaoin.hooloo.device.network;
import android.os.Handler;
import android.os.Message;
import android.util.Log;
import java.io.IOException;
......@@ -14,6 +15,8 @@ import okhttp3.RequestBody;
import okhttp3.Response;
public class HttpUtil {
private static final String TAG = "Network";
public static void post(String url, String body, Handler handler) {
OkHttpClient client = new OkHttpClient();
RequestBody requestBody = RequestBody.create(MediaType.parse("application/json"), body);
......@@ -32,6 +35,11 @@ public class HttpUtil {
}
private static void onFailure(Handler handler, Exception e) {
if (handler == null) {
String msgText = String.format("返回状态:%s, 返回内容:%s", 0, e.getMessage());
Log.d(TAG, msgText);
return;
}
try {
Thread.sleep(3000);
} catch (InterruptedException e3) {
......@@ -42,6 +50,11 @@ public class HttpUtil {
}
private static void onResponse(Handler handler, Response response) throws IOException {
if (handler == null) {
String msgText = String.format("返回状态:%s, 返回内容:%s", 1, response.body() == null ? "" : response.body().string());
Log.d(TAG, msgText);
return;
}
try {
Thread.sleep(3000);
} catch (InterruptedException e) {
......@@ -51,7 +64,15 @@ public class HttpUtil {
handler.sendMessage(msg);
}
public static void postConfirmOrder(String body, Handler handler) throws IOException {
public static void postConfirmOrder(String body, Handler handler) {
post(BaseParams.POST_CONFIRM_ORDER, body, handler);
}
public static void getOrders(String body, Handler handler) {
post(BaseParams.GET_ORDERS, body, handler);
}
public static void postRegistrationId(String body, Handler handler) {
post(BaseParams.POST_REGISTRATION_ID, body, handler);
}
}
......@@ -4,6 +4,13 @@ import java.util.Collection;
import java.util.Map;
public class CollectionUtils {
public static Boolean isEmpty(Object[] collection) {
if (collection == null || collection.length == 0) {
return true;
}
return false;
}
public static Boolean isEmpty(Collection collection) {
if (collection == null || collection.isEmpty()) {
return true;
......
package com.ihaoin.hooloo.device.util;
public class JsonUtils {
// public static <T> T parse(String content, Class<T> valueType) {
// ObjectMapper objectMapper = new ObjectMapper();
// try {
// return objectMapper.readValue(content, valueType);
// } catch (Exception e) {
// e.printStackTrace();
// }
// return null;
// }
//
// public static <T> List<T> parseList(String content, Class<T> valueType) {
// ObjectMapper objectMapper = new ObjectMapper();
// try {
// return objectMapper.readValue(content, new TypeReference<ArrayList<T>>() {
// });
// } catch (Exception e) {
// e.printStackTrace();
// }
// return null;
// }
}
......@@ -12,6 +12,7 @@ import android.view.ViewGroup;
import androidx.coordinatorlayout.widget.ViewGroupUtils;
import com.ihaoin.hooloo.device.component.TouchDelegateComposite;
import com.ihaoin.hooloo.device.config.Base;
import com.ihaoin.hooloo.device.data.TrolleyGoods;
import com.ihaoin.hooloo.device.data.po.ConfirmGoods;
import com.ihaoin.hooloo.device.data.vo.Goods;
......@@ -25,13 +26,10 @@ import java.util.List;
import java.util.stream.Collectors;
public class Utils {
public static String ADD_GOODS_ACTION = "ADD_GOODS_ACTION";
public static String GOODS_CHANGED_ACTION = "GOODS_CHANGED_ACTION";
public static String CLEAR_GOODS_ACTION = "CLEAR_GOODS_ACTION";
public static void sendAddGoodsBroadcast(Context context, Goods goods, Sku sku, Integer count) {
Intent intent = new Intent();
intent.setAction(Utils.ADD_GOODS_ACTION);
intent.setAction(Base.ADD_GOODS_ACTION);
intent.putExtra("goods", goods);
intent.putExtra("sku", sku);
intent.putExtra("count", count);
......@@ -40,13 +38,13 @@ public class Utils {
public static void sendGoodsChnagedBroadcast(Context context) {
Intent intent = new Intent();
intent.setAction(Utils.GOODS_CHANGED_ACTION);
intent.setAction(Base.GOODS_CHANGED_ACTION);
context.sendBroadcast(intent);
}
public static void sendClearGoodsBroadcast(Context context) {
Intent intent = new Intent();
intent.setAction(Utils.CLEAR_GOODS_ACTION);
intent.setAction(Base.CLEAR_GOODS_ACTION);
context.sendBroadcast(intent);
}
......
......@@ -14,8 +14,17 @@ import android.widget.Toast;
import androidx.annotation.NonNull;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.alibaba.fastjson2.JSON;
import com.aliyun.alink.dm.api.DeviceInfo;
import com.aliyun.alink.linkkit.api.ILinkKitConnectListener;
import com.aliyun.alink.linkkit.api.IoTMqttClientConfig;
import com.aliyun.alink.linkkit.api.LinkKit;
import com.aliyun.alink.linkkit.api.LinkKitInitParams;
import com.aliyun.alink.linksdk.channel.core.persistent.mqtt.MqttConfigure;
import com.aliyun.alink.linksdk.tmp.device.payload.ValueWrapper;
import com.aliyun.alink.linksdk.tools.AError;
import com.ihaoin.hooloo.device.R;
import com.ihaoin.hooloo.device.component.NetworkHandler;
import com.ihaoin.hooloo.device.config.AppConfig;
import com.ihaoin.hooloo.device.data.TrolleyGoods;
import com.ihaoin.hooloo.device.data.po.ConfirmGoods;
......@@ -26,7 +35,9 @@ import com.ihaoin.hooloo.device.network.HttpUtil;
import com.ihaoin.hooloo.device.util.Utils;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class ConfirmOrderDialog extends Dialog {
private List<ConfirmGoods> goods = new ArrayList<>();
......@@ -86,13 +97,64 @@ public class ConfirmOrderDialog extends Dialog {
setCanceledOnTouchOutside(false);
postConfirmOrder();
connectMQTT();
}
private void connectMQTT() {
/**
* 设置设备认证信息
*/
String clientId = AppConfig.MACHINE_CODE;
String productKey = "";
String deviceName = "";
String deviceSecret = "";
String deviceToken = "";
DeviceInfo deviceInfo = new DeviceInfo();
deviceInfo.productKey = productKey;// 产品类型
deviceInfo.deviceName = deviceName;// 设备名称
deviceInfo.deviceSecret = deviceSecret;// 设备密钥
// 如果使用deviceToken和clientID连接物联网平台,那么设备的deviceSecret需要设置为null
// 一型一密免白名单动态注册之后建联需要设置deviceToken、clientId这两个值,这两个值由deviceDynamicRegister接口返回
MqttConfigure.deviceToken = deviceToken;
MqttConfigure.clientId = clientId;
/**
* 设置设备当前的初始状态值,属性需要和物联网平台创建的物模型属性一致
* 若此处为空,物模型属性的初始值则为空。
* 调用物模型上报接口之后,物模型会有相关数据缓存。
*/
Map<String, ValueWrapper> propertyValues = new HashMap<>();
// 示例
// propertyValues.put("LightSwitch", new ValueWrapper.BooleanValueWrapper(0));
IoTMqttClientConfig clientConfig = new IoTMqttClientConfig(productKey, deviceName, deviceSecret);
LinkKitInitParams params = new LinkKitInitParams();
params.deviceInfo = deviceInfo;
params.propertyValues = propertyValues;
params.mqttClientConfig = clientConfig;
/**
* 设备初始化建联
* onError 初始化建联失败,需要用户重试初始化。如因网络问题导致初始化失败。
* onInitDone 初始化成功
*/
LinkKit.getInstance().init(getContext(), params, new ILinkKitConnectListener() {
@Override
public void onError(AError error) {
// 初始化失败 error包含初始化错误信息
}
@Override
public void onInitDone(Object data) {
// 初始化成功 data 作为预留参数
}
});
}
private void postConfirmOrder() {
try {
startLoading();
confirmOrderHandler = new ConfirmOrderHandler();
confirmOrderHandler = new ConfirmOrderHandler(getContext());
HttpUtil.postConfirmOrder(genJson(), confirmOrderHandler);
} catch (Exception e) {
e.printStackTrace();
......@@ -123,9 +185,7 @@ public class ConfirmOrderDialog extends Dialog {
confirmOrder.setMachineCode(AppConfig.MACHINE_CODE);
confirmOrder.setScreenNo(AppConfig.SCREEN_NO);
confirmOrder.setGoods(goods);
ObjectMapper objectMapper = new ObjectMapper();
return objectMapper.writeValueAsString(confirmOrder);
return JSON.toJSONString(confirmOrder);
} catch (Exception e) {
e.printStackTrace();
}
......@@ -221,7 +281,11 @@ public class ConfirmOrderDialog extends Dialog {
}
}
class ConfirmOrderHandler extends Handler {
class ConfirmOrderHandler extends NetworkHandler {
public ConfirmOrderHandler(@NonNull Context context) {
super(context);
}
@Override
public void handleMessage(@NonNull Message msg) {
stopLoading();
......
This source diff could not be displayed because it is too large. You can view the blob instead.
package com.ihaoin.hooloo.device.view;
import android.app.Presentation;
import android.content.Context;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.util.Log;
import android.view.Display;
import android.widget.GridView;
import android.widget.ImageView;
import androidx.annotation.NonNull;
import com.alibaba.fastjson2.JSON;
import com.bumptech.glide.Glide;
import com.ihaoin.hooloo.device.R;
import com.ihaoin.hooloo.device.adapter.OrderAdapter;
import com.ihaoin.hooloo.device.component.NetworkHandler;
import com.ihaoin.hooloo.device.component.PushMessageReceiver;
import com.ihaoin.hooloo.device.config.Base;
import com.ihaoin.hooloo.device.data.Datas;
import com.ihaoin.hooloo.device.data.enums.ImageState;
import com.ihaoin.hooloo.device.data.enums.OrderState;
import com.ihaoin.hooloo.device.data.vo.Order;
import com.ihaoin.hooloo.device.data.vo.OrderPkg;
import com.ihaoin.hooloo.device.data.vo.RightImage;
import com.ihaoin.hooloo.device.network.HttpUtil;
import com.ihaoin.hooloo.device.util.CollectionUtils;
import java.util.List;
import java.util.Map;
import java.util.function.Function;
import java.util.stream.Collectors;
public class MenuPresentation extends Presentation {
private List<OrderPkg> pkgs;
private LoadOrdersHandler loadOrdersHandler;
private OrderStateChangeHandler orderStateChangeHandler;
private List<Order> cookingOrders;
private List<Order> waitingOrders;
private List<Order> completedOrders;
private ImageView imgLeft;
private ImageView imgRight;
private GridView gridCooking;
private GridView gridWaiting;
private GridView gridCompleted;
private OrderAdapter cookingAdapter;
private OrderAdapter waitingAdapter;
private OrderAdapter completedAdapter;
public MenuPresentation(Context outerContext, Display display) {
super(outerContext, display);
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_menu);
initViews();
loadDatas();
}
private void initViews() {
imgLeft = findViewById(R.id.img_left);
imgRight = findViewById(R.id.img_right);
gridCooking = findViewById(R.id.grid_cooking);
gridWaiting = findViewById(R.id.grid_waiting);
gridCompleted = findViewById(R.id.grid_completed);
cookingAdapter = new OrderAdapter(getContext());
waitingAdapter = new OrderAdapter(getContext());
completedAdapter = new OrderAdapter(getContext());
gridCooking.setAdapter(cookingAdapter);
gridWaiting.setAdapter(waitingAdapter);
gridCompleted.setAdapter(completedAdapter);
}
private String getImage(Integer state) {
if (CollectionUtils.isEmpty(Datas.rightImages)) {
return null;
}
for (RightImage image : Datas.rightImages) {
if (image.getState().equals(state)) {
return image.getUrl();
}
}
return null;
}
private void showImages() {
if (!CollectionUtils.isEmpty(Datas.leftImages)) {
Glide.with(getContext()).load(Datas.leftImages.get(0)).into(imgLeft);
}
if (Datas.SHOP_STATE.equals(0)) {
Glide.with(getContext()).load(getImage(ImageState.CLOSED.getCode())).into(imgRight);
} else if (!CollectionUtils.isEmpty(cookingOrders)) {
Glide.with(getContext()).load(getImage(ImageState.COOKING.getCode())).into(imgRight);
} else if (!CollectionUtils.isEmpty(completedOrders)) {
Glide.with(getContext()).load(getImage(ImageState.COMPLETED.getCode())).into(imgRight);
} else {
Glide.with(getContext()).load(getImage(ImageState.NOT_COMPLETED.getCode())).into(imgRight);
}
}
private void loadDatas() {
loadOrdersHandler = new LoadOrdersHandler(getContext());
String requestParams = "";
HttpUtil.getOrders(requestParams, loadOrdersHandler);
}
private void setDatas(String json) {
pkgs = JSON.parseArray(json, OrderPkg.class);
cookingOrders = getOrders(OrderState.COOKING.getCode());
waitingOrders = getOrders(OrderState.WAITING.getCode());
completedOrders = getOrders(OrderState.COMPLETED.getCode());
cookingAdapter.setOrders(completedOrders);
waitingAdapter.setOrders(waitingOrders);
completedAdapter.setOrders(completedOrders);
cookingAdapter.notifyDataSetChanged();
waitingAdapter.notifyDataSetChanged();
completedAdapter.notifyDataSetChanged();
showImages();
regsiterOrderChangeListener();
}
private void regsiterOrderChangeListener() {
orderStateChangeHandler = new OrderStateChangeHandler();
PushMessageReceiver.subscribe(Base.NOTIFY_ACTION_ORDER_STATE_CHANGED, orderStateChangeHandler);
}
private List<Order> getOrders(Integer state) {
if (CollectionUtils.isEmpty(pkgs)) {
return null;
}
Map<Integer, OrderPkg> map = pkgs.stream().collect(Collectors.toMap(OrderPkg::getState, Function.identity()));
if (CollectionUtils.isEmpty(map)) {
return null;
}
OrderPkg pkg = map.get(state);
if (pkg == null) {
return null;
}
return pkg.getOrders();
}
class LoadOrdersHandler extends NetworkHandler {
public LoadOrdersHandler(@NonNull Context context) {
super(context);
}
@Override
public void handleMessage(@NonNull Message msg) {
super.handleMessage(msg);
String body = "[{\"state\":1,\"desc\":\"制作中\",\"orders\":[{\"orderId\":1011,\"orderNo\":\"N20220220A19231\",\"orderNumber\":\"Mon101\"},{\"orderId\":1012,\"orderNo\":\"N20220220A19232\",\"orderNumber\":\"Mon102\"},{\"orderId\":1013,\"orderNo\":\"N20220220A19233\",\"orderNumber\":\"Mon103\"}]},{\"state\":2,\"desc\":\"待制作\",\"orders\":[{\"orderId\":1014,\"orderNo\":\"N20220220A19234\",\"orderNumber\":\"Mon104\"},{\"orderId\":1015,\"orderNo\":\"N20220220A19235\",\"orderNumber\":\"Mon105\"},{\"orderId\":1016,\"orderNo\":\"N20220220A19236\",\"orderNumber\":\"Mon106\"},{\"orderId\":1017,\"orderNo\":\"N20220220A19237\",\"orderNumber\":\"Mon107\"},{\"orderId\":1018,\"orderNo\":\"N20220220A19238\",\"orderNumber\":\"Mon108\"}]},{\"state\":3,\"desc\":\"可取餐\",\"orders\":[{\"orderId\":1019,\"orderNo\":\"N20220220A19239\",\"orderNumber\":\"Mon109\"},{\"orderId\":1001,\"orderNo\":\"N20220220A19221\",\"orderNumber\":\"Mon121\"},{\"orderId\":1002,\"orderNo\":\"N20220220A19222\",\"orderNumber\":\"Mon122\"},{\"orderId\":1003,\"orderNo\":\"N20220220A19223\",\"orderNumber\":\"Mon123\"},{\"orderId\":1004,\"orderNo\":\"N20220220A19224\",\"orderNumber\":\"Mon124\"},{\"orderId\":1005,\"orderNo\":\"N20220220A19241\",\"orderNumber\":\"Mon141\"},{\"orderId\":1006,\"orderNo\":\"N20220220A19251\",\"orderNumber\":\"Mon151\"}]}]";
setDatas(body);
}
}
class OrderStateChangeHandler extends Handler {
@Override
public void handleMessage(@NonNull Message msg) {
super.handleMessage(msg);
Log.d("TEST", msg.obj.toString());
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<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"
android:orientation="horizontal"
tools:context=".view.LauncherActivity">
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
......
<?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:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<ImageView
android:id="@+id/img_left"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:adjustViewBounds="true"
android:scaleType="centerCrop" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="@color/colorPrimary"
android:orientation="vertical"
android:padding="20dp">
<TextView
android:id="@+id/txt_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:text="自主取餐"
android:textColor="@color/white"
android:textSize="24sp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/txt_title"
android:layout_margin="10dp"
android:orientation="horizontal">
<RelativeLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1">
<TextView
android:id="@+id/txt_cooking"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="制作中"
android:textColor="@color/white"
android:textSize="18sp" />
<GridView
android:id="@+id/grid_cooking"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/txt_cooking"
android:numColumns="2" />
</RelativeLayout>
<ImageView
android:layout_width="0.5dp"
android:layout_height="match_parent"
android:layout_marginStart="10dp"
android:layout_marginTop="40dp"
android:layout_marginEnd="10dp"
android:layout_marginBottom="40dp"
android:background="@color/white"
tools:ignore="Suspicious0dp" />
<RelativeLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1">
<TextView
android:id="@+id/txt_waiting"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="待制作"
android:textColor="@color/white"
android:textSize="18sp" />
<GridView
android:id="@+id/grid_waiting"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/txt_waiting"
android:numColumns="2" />
</RelativeLayout>
<ImageView
android:layout_width="0.5dp"
android:layout_height="match_parent"
android:layout_marginStart="10dp"
android:layout_marginTop="40dp"
android:layout_marginEnd="10dp"
android:layout_marginBottom="40dp"
android:background="@color/white"
tools:ignore="Suspicious0dp" />
<RelativeLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1">
<TextView
android:id="@+id/txt_competed"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="可取餐(扫码取餐)"
android:textColor="@color/white"
android:textSize="18sp" />
<GridView
android:id="@+id/grid_completed"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/txt_competed"
android:numColumns="2" />
</RelativeLayout>
</LinearLayout>
</RelativeLayout>
<ImageView
android:id="@+id/img_right"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1.3"
android:adjustViewBounds="true"
android:scaleType="centerCrop" />
</LinearLayout>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:textColor="@color/white"
android:textSize="14sp" />
......@@ -16,7 +16,9 @@ allprojects {
repositories {
google()
jcenter()
maven {
url "https://maven.aliyun.com/nexus/content/repositories/releases/"
}
}
}
......
apply plugin: 'com.android.library'
android {
compileSdkVersion 29
buildToolsVersion "29.0.0"
defaultConfig {
minSdkVersion 21
targetSdkVersion 29
versionCode 1
versionName "1.0"
consumerProguardFiles 'consumer-rules.pro'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
repositories {
flatDir {
dirs 'libs'
}
}
sourceSets {
main {
jniLibs.srcDirs = ['libs']
}
}
}
dependencies {
api fileTree(dir: 'libs', include: ['*.jar'])
compileOnly fileTree(dir: 'libs', include: ["*.aar"])
}
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="cn.jiguang.sdk">
<!-- Required -->
<permission
android:name="${JPUSH_PKGNAME}.permission.JPUSH_MESSAGE"
android:protectionLevel="signature" />
<!-- Required 一些系统要求的权限,如访问网络等 -->
<uses-permission android:name="${JPUSH_PKGNAME}.permission.JPUSH_MESSAGE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<!-- 华为角标 -->
<uses-permission android:name="com.huawei.android.launcher.permission.CHANGE_BADGE" />
<!-- Optional for location -->
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" /> <!-- Android Q后台定位权限 -->
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.GET_TASKS"/>
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES"/>
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
<!--jpush_permission_start-->
<uses-sdk tools:overrideLibrary="
cn.jpush.android.thirdpush.fcm
,cn.jpush.android.thirdpush.huawei
,cn.jpush.android.thirdpush.meizu
,cn.jpush.android.thirdpush.oppo
,cn.jpush.android.thirdpush.vivo
,cn.jpush.android.thirdpush.xiaomi
,com.google.firebase.firebase_core
,com.google.firebase.messaging
,com.google.firebase.analytics.connector.impl
,com.google.firebase.measurement
,com.google.android.gms.measurement.api
,com.google.firebase.measurement_impl
,com.google.firebase.iid
,com.google.firebase
,com.google.firebase.iid.internal
,com.google.android.gms.base
,com.google.android.gms.tasks
,com.google.firebase.analytics.connector
,com.google.android.gms.stats
,com.google.android.gms.ads_identifier
,com.google.android.gms.common
,com.google.android.gms.measurement_base
,com.huawei.android.hms.openid
,com.huawei.agconnect.core
,com.huawei.hmf.tasks
,com.huawei.hms.framework.network.grs
,com.huawei.hms.framework.common
,com.huawei.android.hms.base
,com.huawei.android.hms.push
,android.support.mediacompat
,android.support.fragment
,android.support.coreutils
,android.support.coreui
,android.support.compat
,android.arch.lifecycle" />
<!--jpush_permission_end-->
<application>
<!--jpush_config_start-->
<!-- Rich push 核心功能 since 2.0.6 -->
<activity
android:name="cn.jpush.android.ui.PopWinActivity"
android:exported="true"
android:theme="@style/MyDialogStyle">
<intent-filter>
<category android:name="android.intent.category.DEFAULT" />
<action android:name="cn.jpush.android.ui.PopWinActivity" />
<category android:name="${JPUSH_PKGNAME}" />
</intent-filter>
</activity>
<!-- Required SDK核心功能 -->
<activity
android:name="cn.jpush.android.ui.PushActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="true"
android:theme="@android:style/Theme.NoTitleBar">
<intent-filter>
<action android:name="cn.jpush.android.ui.PushActivity" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="${JPUSH_PKGNAME}" />
</intent-filter>
</activity>
<!-- since 3.5.0 Required SDK 核心功能 -->
<!-- 3.5.0新增,用于定时展示功能 -->
<receiver
android:name="cn.jpush.android.service.SchedulerReceiver"
android:exported="false" />
<!-- 3.6.7 新增,用于负反馈组件 -->
<service android:name="cn.jpush.android.service.MessagingIntentService" />
<!-- since 3.0.9 Required SDK 核心功能 -->
<provider
android:name="cn.jpush.android.service.DataProvider"
android:authorities="${JPUSH_PKGNAME}.DataProvider"
android:exported="false"
android:process=":pushcore" />
<!-- since 3.1.0 Required SDK 核心功能 -->
<provider
android:name="cn.jpush.android.service.DownloadProvider"
android:authorities="${JPUSH_PKGNAME}.DownloadProvider"
android:exported="true" />
<!-- since 3.3.0 Required SDK核心功能 -->
<activity
android:name="cn.jpush.android.service.JNotifyActivity"
android:exported="true"
android:taskAffinity="jpush.custom"
android:theme="@style/JPushTheme" >
<intent-filter>
<action android:name="cn.jpush.android.intent.JNotifyActivity" />
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="${applicationId}" />
</intent-filter>
</activity>
<!-- since 3.5.6 新增华硕通道 -->
<receiver android:name="cn.jpush.android.asus.AsusPushMessageReceiver" />
<provider
android:name="cn.jiguang.union.ads.service.JAdFileProvider"
android:authorities="${applicationId}.JAdFileProvider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/jpush_file_paths" />
<intent-filter>
<action android:name="cn.jpush.android.intent.FileProvider" />
<category android:name="${applicationId}" />
</intent-filter>
</provider>
<!--jpush_config_end-->
<!--(jpush|jmessage)_config_start,jpush和jmessage公用的组件-->
<!-- Required SDK 核心功能 -->
<!-- 可配置android:process参数将PushService放在其他进程中 -->
<service
android:name="cn.jpush.android.service.PushService"
android:enabled="true"
android:exported="false"
android:process=":pushcore">
<intent-filter>
<action android:name="cn.jpush.android.intent.REGISTER" />
<action android:name="cn.jpush.android.intent.REPORT" />
<action android:name="cn.jpush.android.intent.PushService" />
<action android:name="cn.jpush.android.intent.PUSH_TIME" />
</intent-filter>
</service>
<!-- since 1.8.0 option 可选项。用于同一设备中不同应用的JPush服务相互拉起的功能。 -->
<!-- 若不启用该功能可删除该组件,或把 enabled 设置成 false ;App 不会被其他 App 拉起,但会拉起其他的 App。 -->
<service
android:name="cn.jpush.android.service.DaemonService"
android:enabled="true"
android:exported="true">
<intent-filter>
<action android:name="cn.jpush.android.intent.DaemonService" />
<category android:name="${JPUSH_PKGNAME}" />
</intent-filter>
</service>
<!-- 可选,如果使用静态Activity方式拉起,该组件必须声明 -->
<activity
android:name="cn.jpush.android.service.DActivity"
android:enabled="true"
android:exported="true"
android:taskAffinity="jpush.custom"
android:theme="@android:style/Theme.Translucent.NoTitleBar">
<intent-filter>
<action android:name="cn.jpush.android.intent.DActivity" />
<category android:name="${JPUSH_PKGNAME}" />
</intent-filter>
</activity>
<!-- Required SDK核心功能 -->
<receiver
android:name="cn.jpush.android.service.PushReceiver"
android:enabled="true"
android:exported="false">
<intent-filter android:priority="1000">
<action android:name="cn.jpush.android.intent.NOTIFICATION_RECEIVED_PROXY" /> <!-- Required 显示通知栏 -->
<category android:name="${JPUSH_PKGNAME}" />
</intent-filter>
<intent-filter>
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
</intent-filter>
<!-- Optional -->
<intent-filter>
<action android:name="android.intent.action.PACKAGE_ADDED" />
<action android:name="android.intent.action.PACKAGE_REMOVED" />
<data android:scheme="package" />
</intent-filter>
</receiver>
<!-- Required SDK核心功能 -->
<receiver
android:name="cn.jpush.android.service.AlarmReceiver"
android:exported="false" />
<!--(jpush|jmessage)_config_end-->
<!--Required_config-->
<meta-data
android:name="JPUSH_CHANNEL"
android:value="${JPUSH_CHANNEL}" />
<meta-data
android:name="JPUSH_APPKEY"
android:value="${JPUSH_APPKEY}" /> <!-- </>值来自开发者平台取得的AppKey -->
</application>
</manifest>
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle"
>
<corners android:radius="6dp" />
<solid android:color="#0A9789" />
<stroke android:color="#0A9789" android:width="1dp"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<!-- 获得焦点但未按下时的背景图片 -->
<item
android:state_focused="true"
android:state_enabled="true"
android:state_pressed="false"
android:drawable="@drawable/jpush_ic_richpush_actionbar_back" />
<!-- 按下时的背景图片 -->
<item
android:state_enabled="true"
android:state_pressed="true"
android:drawable="@android:color/darker_gray" />
<!-- 按下时的背景图片 -->
<item
android:state_enabled="true"
android:state_checked="true"
android:drawable="@android:color/darker_gray" />
<!-- 默认时的背景图片 -->
<item android:drawable="@drawable/jpush_ic_richpush_actionbar_back" />
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<!-- 背景 gradient是渐变,corners定义的是圆角 -->
<item android:id="@android:id/background">
<shape>
<solid android:color="#ffffff" />
</shape>
</item>
<!-- 进度条 -->
<item android:id="@android:id/progress">
<clip>
<shape>
<solid android:color="#4393ea" />
</shape>
</clip>
</item>
</layer-list>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
android:id="@+id/push_root_view"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<FrameLayout
android:id="@+id/v21"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<FrameLayout
android:id="@+id/layout_version_2"
android:layout_width="0dp"
android:layout_height="0dp" />
<RelativeLayout
android:id="@+id/push_notification_style_default"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone">
<LinearLayout
android:id="@+id/push_notification_layout_lefttop"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_toLeftOf="@+id/push_notification_big_icon"
android:gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:id="@+id/push_notification_small_icon"
android:layout_width="18dp"
android:layout_height="18dp"
android:scaleType="centerInside" />
<TextView
style="@android:style/TextAppearance.Material.Notification.Title"
android:id="@+id/push_notification_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="4dp"
android:maxLines="1"
android:maxWidth="200dp"
android:maxLength="24"
android:textSize="12sp" />
<TextView
style="@android:style/TextAppearance.Material.Notification.Info"
android:id="@+id/push_notification_dot"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="4dp"
android:textStyle="bold"
android:text="·"
android:textSize="16sp" />
<TextView
style="@android:style/TextAppearance.Material.Notification.Time"
android:maxLines="1"
android:id="@+id/push_notification_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="12sp" />
</LinearLayout>
<FrameLayout
android:id="@+id/push_notification_for_bottom_margin"
android:layout_width="match_parent"
android:layout_alignParentBottom="true"
android:layout_height="0dp"/>
<ImageView
android:id="@+id/push_notification_banner_icon"
android:layout_width="match_parent"
android:layout_height="96dp"
android:layout_above="@+id/push_notification_for_bottom_margin"
android:layout_marginBottom="8dp"
android:visibility="gone"
android:scaleType="centerCrop" />
<LinearLayout
android:id="@+id/push_notification_main_layout"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/push_notification_banner_icon"
android:gravity="center_vertical"
android:layout_marginRight="4dp"
android:layout_marginBottom="5dp"
android:layout_toLeftOf="@+id/push_notification_big_icon"
android:layout_below="@id/push_notification_layout_lefttop">
<TextView
style="@android:style/TextAppearance.Material.Notification.Title"
android:id="@+id/push_notification_sub_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="1dp"
android:maxLines="1"
android:ellipsize="end"
android:textSize="13sp"
android:visibility="gone" />
<TextView
style="@android:style/TextAppearance.Material.Notification.Info"
android:id="@+id/push_notification_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:layout_marginTop="1dp"
android:maxLines="2"
android:textSize="13sp" />
<TextView
style="@android:style/TextAppearance.Material.Notification.Info"
android:id="@+id/push_notification_content_one_line"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:layout_marginTop="1dp"
android:textSize="13sp"
android:maxLines="1"
android:visibility="gone" />
</LinearLayout>
<ImageView
android:id="@+id/push_notification_big_icon"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_alignParentRight="true"
android:layout_alignTop="@+id/push_notification_main_layout"
android:layout_alignBottom="@+id/push_notification_main_layout"
android:scaleType="centerInside" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/push_notification_style_1"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:visibility="gone">
<ImageView
android:id="@+id/push_notification_style_1_big_icon"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:scaleType="centerInside" />
<LinearLayout
android:id="@+id/push_notification_style_1_main_layout"
android:layout_toRightOf="@+id/push_notification_style_1_big_icon"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/push_notification_layout_time"
android:gravity="center_vertical"
android:weightSum="1"
android:orientation="horizontal">
<TextView
style="@android:style/TextAppearance.Material.Notification.Title"
android:id="@+id/push_notification_style_1_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="1"
android:layout_marginRight="8dp"
android:textSize="12sp"
android:textStyle="bold" />
<TextView
style="@android:style/TextAppearance.Material.Notification.Time"
android:id="@+id/push_notification_style_1_date"
android:layout_height="wrap_content"
android:layout_width="0dp"
android:layout_weight="1"
android:gravity="right"
android:textSize="12sp" />
<TextView android:id="@+id/push_notification_null"
android:layout_width="24dp"
android:visibility="gone"
android:layout_height="20dp"/>
</LinearLayout>
<TextView
style="@android:style/TextAppearance.Material.Notification.Info"
android:id="@+id/push_notification_style_1_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:layout_marginTop="1dp"
android:maxLines="1"
android:textSize="13sp" />
</LinearLayout>
<ImageView
android:id="@+id/push_notification_style_1_banner_icon"
android:layout_width="match_parent"
android:layout_height="96dp"
android:layout_alignParentBottom="true"
android:visibility="gone"
android:layout_below="@id/push_notification_style_1_main_layout"
android:scaleType="centerInside" />
</RelativeLayout>
<FrameLayout
android:id="@+id/push_notification_banner_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/push_notification_banner_img"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:visibility="gone" />
</FrameLayout>
<RelativeLayout
android:id="@+id/push_notification_header_neg_fb"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:visibility="gone">
<ImageView android:id="@+id/push_notification_header_expand"
android:layout_marginRight="2dp"
android:layout_marginTop="2dp"
android:layout_width="14dp"
android:layout_height="14dp"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:scaleType="centerInside"
android:background="#08000000"
android:src="@drawable/jpush_ic_action_close"
android:visibility="visible"/>
<LinearLayout
android:id="@+id/push_notification_fb_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="8dp"
android:layout_below="@id/push_notification_header_expand"
android:orientation="horizontal"
android:visibility="invisible"
android:gravity="center">
<TextView
style="@android:style/TextAppearance.Material.Notification.Title"
android:id="@+id/push_notification_fb_content_no_like1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#0f000000"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:textSize="14sp"
android:gravity="center"
android:maxLines="1"
android:layout_margin="5dp"
android:text="不感兴趣"/>
<TextView
style="@android:style/TextAppearance.Material.Notification.Title"
android:id="@+id/push_notification_fb_content_no_like2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#0f000000"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:textSize="14sp"
android:gravity="center"
android:maxLines="1"
android:layout_margin="5dp"
android:text="重复收到"/>
<TextView
style="@android:style/TextAppearance.Material.Notification.Title"
android:id="@+id/push_notification_fb_content_no_like3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#0f000000"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:textSize="14sp"
android:gravity="center"
android:maxLines="1"
android:layout_margin="5dp"
android:text="内容低质"/>
<TextView
style="@android:style/TextAppearance.Material.Notification.Title"
android:id="@+id/push_notification_fb_content_no_like4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#0f000000"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:textSize="14sp"
android:gravity="center"
android:maxLines="1"
android:layout_margin="5dp"
android:text="内容不宜"/>
</LinearLayout>
</RelativeLayout>
</RelativeLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
android:id="@+id/push_root_view"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="256dp">
<FrameLayout
android:id="@+id/v21"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<FrameLayout
android:id="@+id/layout_version_2"
android:layout_width="0dp"
android:layout_height="0dp" />
<RelativeLayout
android:id="@+id/push_notification_style_default"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone">
<LinearLayout
android:id="@+id/push_notification_layout_lefttop"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_toLeftOf="@+id/push_notification_big_icon"
android:gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:id="@+id/push_notification_small_icon"
android:layout_width="18dp"
android:layout_height="18dp"
android:scaleType="centerInside" />
<TextView
style="@android:style/TextAppearance.Material.Notification.Title"
android:id="@+id/push_notification_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="4dp"
android:maxLines="1"
android:maxWidth="200dp"
android:maxLength="24"
android:textSize="12sp" />
<TextView
style="@android:style/TextAppearance.Material.Notification.Info"
android:id="@+id/push_notification_dot"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="4dp"
android:textStyle="bold"
android:text="·"
android:textSize="16sp" />
<TextView
style="@android:style/TextAppearance.Material.Notification.Time"
android:maxLines="1"
android:id="@+id/push_notification_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="12sp" />
</LinearLayout>
<FrameLayout
android:id="@+id/push_notification_for_bottom_margin"
android:layout_width="match_parent"
android:layout_alignParentBottom="true"
android:layout_height="0dp"/>
<ImageView
android:id="@+id/push_notification_banner_icon"
android:layout_width="match_parent"
android:layout_height="150dp"
android:layout_above="@+id/push_notification_for_bottom_margin"
android:layout_marginBottom="8dp"
android:visibility="visible"
android:scaleType="centerCrop" />
<LinearLayout
android:id="@+id/push_notification_main_layout"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/push_notification_banner_icon"
android:gravity="center_vertical"
android:layout_marginRight="4dp"
android:layout_marginBottom="5dp"
android:layout_toLeftOf="@+id/push_notification_big_icon"
android:layout_below="@id/push_notification_layout_lefttop">
<TextView
style="@android:style/TextAppearance.Material.Notification.Title"
android:id="@+id/push_notification_sub_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="1dp"
android:maxLines="1"
android:ellipsize="end"
android:textSize="13sp"
android:visibility="gone" />
<TextView
style="@android:style/TextAppearance.Material.Notification.Info"
android:id="@+id/push_notification_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:layout_marginTop="1dp"
android:maxLines="2"
android:textSize="13sp" />
<TextView
style="@android:style/TextAppearance.Material.Notification.Info"
android:id="@+id/push_notification_content_one_line"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:layout_marginTop="1dp"
android:textSize="13sp"
android:maxLines="1"
android:visibility="gone" />
</LinearLayout>
<ImageView
android:id="@+id/push_notification_big_icon"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_alignParentRight="true"
android:layout_alignTop="@+id/push_notification_main_layout"
android:layout_alignBottom="@+id/push_notification_main_layout"
android:scaleType="centerInside" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/push_notification_style_1"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:visibility="gone">
<ImageView
android:id="@+id/push_notification_style_1_big_icon"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:scaleType="centerInside" />
<LinearLayout
android:id="@+id/push_notification_style_1_main_layout"
android:layout_toRightOf="@+id/push_notification_style_1_big_icon"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/push_notification_layout_time"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
style="@android:style/TextAppearance.Material.Notification.Title"
android:id="@+id/push_notification_style_1_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="1"
android:layout_marginRight="8dp"
android:textSize="12sp"
android:textStyle="bold" />
<TextView
style="@android:style/TextAppearance.Material.Notification.Time"
android:id="@+id/push_notification_style_1_date"
android:layout_height="wrap_content"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_marginRight="4dp"
android:gravity="right"
android:textSize="12sp" />
<TextView android:id="@+id/push_notification_null"
android:layout_width="24dp"
android:visibility="gone"
android:layout_height="20dp"/>
</LinearLayout>
<TextView
style="@android:style/TextAppearance.Material.Notification.Info"
android:id="@+id/push_notification_style_1_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="4dp"
android:ellipsize="end"
android:layout_marginTop="1dp"
android:maxLines="1"
android:textSize="13sp" />
</LinearLayout>
<ImageView
android:id="@+id/push_notification_style_1_banner_icon"
android:layout_width="match_parent"
android:layout_height="150dp"
android:layout_alignParentBottom="true"
android:visibility="gone"
android:layout_below="@id/push_notification_style_1_main_layout"
android:scaleType="centerInside" />
</RelativeLayout>
<FrameLayout
android:id="@+id/push_notification_banner_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/push_notification_banner_img"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:visibility="gone" />
</FrameLayout>
<RelativeLayout
android:id="@+id/push_notification_header_neg_fb"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:visibility="gone">
<ImageView android:id="@+id/push_notification_header_expand"
android:layout_marginRight="2dp"
android:layout_marginTop="2dp"
android:layout_width="14dp"
android:layout_height="14dp"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:scaleType="centerInside"
android:background="#08000000"
android:src="@drawable/jpush_ic_action_close"
android:visibility="visible"/>
<LinearLayout
android:id="@+id/push_notification_fb_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="8dp"
android:layout_below="@id/push_notification_header_expand"
android:orientation="horizontal"
android:visibility="invisible"
android:gravity="center">
<TextView
style="@android:style/TextAppearance.Material.Notification.Title"
android:id="@+id/push_notification_fb_content_no_like1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#0f000000"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:textSize="14sp"
android:gravity="center"
android:maxLines="1"
android:layout_margin="5dp"
android:text="不感兴趣"/>
<TextView
style="@android:style/TextAppearance.Material.Notification.Title"
android:id="@+id/push_notification_fb_content_no_like2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#0f000000"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:textSize="14sp"
android:gravity="center"
android:maxLines="1"
android:layout_margin="5dp"
android:text="重复收到"/>
<TextView
style="@android:style/TextAppearance.Material.Notification.Title"
android:id="@+id/push_notification_fb_content_no_like3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#0f000000"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:textSize="14sp"
android:gravity="center"
android:maxLines="1"
android:layout_margin="5dp"
android:text="内容低质"/>
<TextView
style="@android:style/TextAppearance.Material.Notification.Title"
android:id="@+id/push_notification_fb_content_no_like4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#0f000000"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:textSize="14sp"
android:gravity="center"
android:maxLines="1"
android:layout_margin="5dp"
android:text="内容不宜"/>
</LinearLayout>
</RelativeLayout>
</RelativeLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
android:id="@+id/push_root_view"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="202dp">
<FrameLayout
android:id="@+id/v21"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<FrameLayout
android:id="@+id/layout_version_2"
android:layout_width="0dp"
android:layout_height="0dp" />
<RelativeLayout
android:id="@+id/push_notification_style_default"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone">
<LinearLayout
android:id="@+id/push_notification_layout_lefttop"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_toLeftOf="@+id/push_notification_big_icon"
android:gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:id="@+id/push_notification_small_icon"
android:layout_width="18dp"
android:layout_height="18dp"
android:scaleType="centerInside" />
<TextView
style="@android:style/TextAppearance.Material.Notification.Title"
android:id="@+id/push_notification_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="4dp"
android:maxLines="1"
android:maxWidth="200dp"
android:maxLength="24"
android:textSize="12sp" />
<TextView
style="@android:style/TextAppearance.Material.Notification.Info"
android:id="@+id/push_notification_dot"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="4dp"
android:textStyle="bold"
android:text="·"
android:textSize="16sp" />
<TextView
style="@android:style/TextAppearance.Material.Notification.Time"
android:maxLines="1"
android:id="@+id/push_notification_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="12sp" />
</LinearLayout>
<FrameLayout
android:id="@+id/push_notification_for_bottom_margin"
android:layout_width="match_parent"
android:layout_alignParentBottom="true"
android:layout_height="0dp"/>
<ImageView
android:id="@+id/push_notification_banner_icon"
android:layout_width="match_parent"
android:layout_height="96dp"
android:layout_above="@+id/push_notification_for_bottom_margin"
android:layout_marginBottom="8dp"
android:visibility="visible"
android:scaleType="centerCrop" />
<LinearLayout
android:id="@+id/push_notification_main_layout"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/push_notification_banner_icon"
android:gravity="center_vertical"
android:layout_marginRight="4dp"
android:layout_marginBottom="5dp"
android:layout_toLeftOf="@+id/push_notification_big_icon"
android:layout_below="@id/push_notification_layout_lefttop">
<TextView
style="@android:style/TextAppearance.Material.Notification.Title"
android:id="@+id/push_notification_sub_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="1dp"
android:maxLines="1"
android:ellipsize="end"
android:textSize="13sp"
android:visibility="gone" />
<TextView
style="@android:style/TextAppearance.Material.Notification.Info"
android:id="@+id/push_notification_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:layout_marginTop="1dp"
android:maxLines="2"
android:textSize="13sp" />
<TextView
style="@android:style/TextAppearance.Material.Notification.Info"
android:id="@+id/push_notification_content_one_line"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:layout_marginTop="1dp"
android:textSize="13sp"
android:maxLines="1"
android:visibility="gone" />
</LinearLayout>
<ImageView
android:id="@+id/push_notification_big_icon"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_alignParentRight="true"
android:layout_alignTop="@+id/push_notification_main_layout"
android:layout_alignBottom="@+id/push_notification_main_layout"
android:scaleType="centerInside" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/push_notification_style_1"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:visibility="gone">
<ImageView
android:id="@+id/push_notification_style_1_big_icon"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:scaleType="centerInside" />
<LinearLayout
android:id="@+id/push_notification_style_1_main_layout"
android:layout_toRightOf="@+id/push_notification_style_1_big_icon"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/push_notification_layout_time"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
style="@android:style/TextAppearance.Material.Notification.Title"
android:id="@+id/push_notification_style_1_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="1"
android:layout_marginRight="8dp"
android:textSize="12sp"
android:textStyle="bold" />
<TextView
style="@android:style/TextAppearance.Material.Notification.Time"
android:id="@+id/push_notification_style_1_date"
android:layout_height="wrap_content"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_marginRight="4dp"
android:gravity="right"
android:textSize="12sp" />
<TextView android:id="@+id/push_notification_null"
android:layout_width="24dp"
android:visibility="gone"
android:layout_height="20dp"/>
</LinearLayout>
<TextView
style="@android:style/TextAppearance.Material.Notification.Info"
android:id="@+id/push_notification_style_1_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="4dp"
android:ellipsize="end"
android:layout_marginTop="1dp"
android:maxLines="1"
android:textSize="13sp" />
</LinearLayout>
<ImageView
android:id="@+id/push_notification_style_1_banner_icon"
android:layout_width="match_parent"
android:layout_height="96dp"
android:layout_alignParentBottom="true"
android:visibility="gone"
android:layout_below="@id/push_notification_style_1_main_layout"
android:scaleType="centerInside" />
</RelativeLayout>
<FrameLayout
android:id="@+id/push_notification_banner_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/push_notification_banner_img"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:visibility="gone" />
</FrameLayout>
<RelativeLayout
android:id="@+id/push_notification_header_neg_fb"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:visibility="gone">
<ImageView android:id="@+id/push_notification_header_expand"
android:layout_marginRight="2dp"
android:layout_marginTop="2dp"
android:layout_width="14dp"
android:layout_height="14dp"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:scaleType="centerInside"
android:background="#08000000"
android:src="@drawable/jpush_ic_action_close"
android:visibility="visible"/>
<LinearLayout
android:id="@+id/push_notification_fb_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="8dp"
android:layout_below="@id/push_notification_header_expand"
android:orientation="horizontal"
android:visibility="invisible"
android:gravity="center">
<TextView
style="@android:style/TextAppearance.Material.Notification.Title"
android:id="@+id/push_notification_fb_content_no_like1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#0f000000"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:textSize="14sp"
android:gravity="center"
android:maxLines="1"
android:layout_margin="5dp"
android:text="不感兴趣"/>
<TextView
style="@android:style/TextAppearance.Material.Notification.Title"
android:id="@+id/push_notification_fb_content_no_like2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#0f000000"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:textSize="14sp"
android:gravity="center"
android:maxLines="1"
android:layout_margin="5dp"
android:text="重复收到"/>
<TextView
style="@android:style/TextAppearance.Material.Notification.Title"
android:id="@+id/push_notification_fb_content_no_like3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#0f000000"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:textSize="14sp"
android:gravity="center"
android:maxLines="1"
android:layout_margin="5dp"
android:text="内容低质"/>
<TextView
style="@android:style/TextAppearance.Material.Notification.Title"
android:id="@+id/push_notification_fb_content_no_like4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#0f000000"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:textSize="14sp"
android:gravity="center"
android:maxLines="1"
android:layout_margin="5dp"
android:text="内容不宜"/>
</LinearLayout>
</RelativeLayout>
</RelativeLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
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:id="@+id/banner_root"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipChildren="false"
android:clipToPadding="false">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="1.0">
<RelativeLayout
android:id="@+id/banner_content_root"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.0"
android:clickable="true"
android:focusable="true"
android:gravity="center"
android:padding="15dp"
android:orientation="vertical"
android:visibility="visible">
<ImageView
android:id="@+id/banner_image_only"
android:adjustViewBounds="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
android:scaleType="fitXY"/>
<ImageView
android:id="@+id/banner_image"
android:adjustViewBounds="true"
android:layout_width="64dp"
android:layout_height="64dp"
android:layout_centerVertical="true"
android:padding="5dp"
android:layout_marginLeft="3dp"
android:visibility="visible" />
<LinearLayout
android:id="@+id/banner_text_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="74dp"
android:layout_toRightOf="@id/banner_image"
android:layout_marginLeft="3dp"
android:gravity="center_vertical"
android:orientation="vertical"
android:layout_centerInParent="true">
<TextView
android:id="@+id/banner_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/banner_image"
android:ellipsize="end"
android:singleLine="true"
android:layout_marginRight="4dp"
android:text=""
android:textSize="14sp"
android:visibility="visible" />
<TextView
android:id="@+id/banner_body"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/banner_title"
android:layout_toRightOf="@+id/banner_image"
android:ellipsize="end"
android:singleLine="true"
android:layout_marginRight="4dp"
android:text=""
android:textSize="14sp" />
</LinearLayout>
</RelativeLayout>
</LinearLayout>
</FrameLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/popLayoutId"
style="@style/MyDialogStyle"
android:orientation="vertical"
android:layout_width="280dp"
android:layout_height="250dp" >
<WebView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/wvPopwin"/>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<cn.jpush.android.ui.FullScreenView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/actionbarLayoutId"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<RelativeLayout
android:id="@+id/rlRichpushTitleBar"
android:layout_width="match_parent"
android:layout_height="40.0dp"
android:background="#29313a">
<ImageButton
android:id="@+id/imgRichpushBtnBack"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="9dp"
android:layout_marginRight="10dp"
android:background="@drawable/jpush_richpush_btn_selector" />
<ImageView
android:id="@+id/imgView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toRightOf="@id/imgRichpushBtnBack"
android:clickable="false"
android:src="@drawable/jpush_ic_richpush_actionbar_divider" />
<TextView
android:id="@+id/tvRichpushTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="7dp"
android:layout_marginRight="5dp"
android:layout_toRightOf="@id/imgView"
android:clickable="false"
android:text=" "
android:textSize="20sp"
android:textColor="#ffffff" />
</RelativeLayout>
<ProgressBar
android:id="@+id/pushPrograssBar"
android:layout_width="match_parent"
android:layout_height="1dp"
android:progress="0"
android:progressDrawable="@drawable/jpush_richpush_progressbar"
style="?android:attr/progressBarStyleHorizontal" />
<WebView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/fullWebView"
android:background="#000000" />
</cn.jpush.android.ui.FullScreenView>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/jad_root_view"
android:layout_width="match_parent"
android:layout_height="64dp"
android:orientation="horizontal"
android:padding="10dp">
<ImageView
android:id="@+id/jad_icon"
android:layout_width="44dp"
android:layout_height="44dp"
android:layout_gravity="center"
android:layout_marginRight="18dp"
android:layout_marginEnd="18dp"
android:background="#0A9789"
android:duplicateParentState="false"
android:scaleType="center" />
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1">
<TextView
android:id="@+id/jad_desc"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:singleLine="true"
android:textColor="#000000"
android:textSize="14sp"/>
<LinearLayout
android:id="@+id/jad_download_success"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/jad_desc"
android:orientation="horizontal"
android:visibility="gone">
<TextView
android:id="@+id/download_success_size"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="12dp"
android:layout_marginEnd="12dp"
android:ellipsize="end"
android:gravity="start|center"
android:singleLine="true"
android:textColor="#000000"
android:textSize="12sp"/>
<TextView
android:id="@+id/jad_download_success_status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:gravity="start|center"
android:singleLine="true"
android:textColor="#000000"
android:textSize="11sp"/>
</LinearLayout>
<LinearLayout
android:id="@+id/jad_download_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/jad_desc"
android:orientation="horizontal"
android:visibility="visible">
<TextView
android:id="@+id/jad_download_size"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="3"
android:ellipsize="end"
android:gravity="start|center"
android:maxLines="1"
android:textColor="#000000"
android:textSize="11sp"/>
<TextView
android:id="@+id/jad_download_status"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:ellipsize="end"
android:gravity="end|center"
android:singleLine="true"
android:textColor="#000000"
android:textSize="11sp"/>
</LinearLayout>
</RelativeLayout>
<TextView
android:id="@+id/jad_action"
android:layout_width="55dp"
android:layout_height="30dp"
android:layout_gravity="end|center"
android:layout_marginLeft="18dp"
android:layout_marginStart="18dp"
android:layout_weight="0"
android:gravity="center"
android:background="@drawable/jpush_btn_bg_green_playable"
android:textColor="#FFFFFF"
android:textSize="12sp"/>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
android:id="@+id/push_root_view"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<FrameLayout
android:id="@+id/v"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<FrameLayout
android:id="@+id/layout_version_2"
android:layout_width="0dp"
android:layout_height="0dp" />
<RelativeLayout
android:id="@+id/push_notification_style_default"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone">
<LinearLayout
android:id="@+id/push_notification_layout_lefttop"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_toLeftOf="@+id/push_notification_big_icon"
android:gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:id="@+id/push_notification_small_icon"
android:layout_width="18dp"
android:layout_height="18dp"
android:scaleType="centerInside" />
<TextView
style="@*android:style/TextAppearance.Material.Notification.Title"
android:id="@+id/push_notification_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="4dp"
android:maxLines="1"
android:maxWidth="200dp"
android:maxLength="24"
android:textSize="12sp" />
<TextView
style="@*android:style/TextAppearance.Material.Notification.Info"
android:id="@+id/push_notification_dot"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="4dp"
android:textStyle="bold"
android:text="·"
android:textSize="16sp" />
<TextView
style="@*android:style/TextAppearance.Material.Notification.Time"
android:maxLines="1"
android:id="@+id/push_notification_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="12sp" />
</LinearLayout>
<FrameLayout
android:id="@+id/push_notification_for_bottom_margin"
android:layout_width="match_parent"
android:layout_alignParentBottom="true"
android:layout_height="0dp"/>
<ImageView
android:id="@+id/push_notification_banner_icon"
android:layout_width="match_parent"
android:layout_height="96dp"
android:layout_above="@+id/push_notification_for_bottom_margin"
android:layout_marginBottom="8dp"
android:visibility="gone"
android:scaleType="centerCrop" />
<LinearLayout
android:id="@+id/push_notification_main_layout"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/push_notification_banner_icon"
android:gravity="center_vertical"
android:layout_marginRight="4dp"
android:layout_marginBottom="5dp"
android:layout_toLeftOf="@+id/push_notification_big_icon"
android:layout_below="@id/push_notification_layout_lefttop">
<TextView
style="@*android:style/TextAppearance.Material.Notification.Title"
android:id="@+id/push_notification_sub_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="1dp"
android:maxLines="1"
android:ellipsize="end"
android:textSize="13sp"
android:visibility="gone" />
<TextView
style="@*android:style/TextAppearance.Material.Notification.Info"
android:id="@+id/push_notification_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:layout_marginTop="1dp"
android:maxLines="2"
android:textSize="13sp" />
<TextView
style="@*android:style/TextAppearance.Material.Notification.Info"
android:id="@+id/push_notification_content_one_line"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:layout_marginTop="1dp"
android:textSize="13sp"
android:maxLines="1"
android:visibility="gone" />
</LinearLayout>
<ImageView
android:id="@+id/push_notification_big_icon"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_alignParentRight="true"
android:layout_alignTop="@+id/push_notification_main_layout"
android:layout_alignBottom="@+id/push_notification_main_layout"
android:scaleType="centerInside" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/push_notification_style_1"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:visibility="gone">
<ImageView
android:id="@+id/push_notification_style_1_big_icon"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:scaleType="centerInside" />
<LinearLayout
android:id="@+id/push_notification_style_1_main_layout"
android:layout_toRightOf="@+id/push_notification_style_1_big_icon"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/push_notification_layout_time"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
style="@*android:style/TextAppearance.Material.Notification.Title"
android:id="@+id/push_notification_style_1_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="1"
android:layout_marginRight="8dp"
android:textSize="12sp"
android:textStyle="bold" />
<TextView
style="@*android:style/TextAppearance.Material.Notification.Time"
android:id="@+id/push_notification_style_1_date"
android:layout_height="wrap_content"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_marginRight="4dp"
android:gravity="right"
android:textSize="12sp" />
<TextView android:id="@+id/push_notification_null"
android:layout_width="24dp"
android:visibility="gone"
android:layout_height="20dp"/>
</LinearLayout>
<TextView
style="@*android:style/TextAppearance.Material.Notification.Info"
android:id="@+id/push_notification_style_1_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="4dp"
android:ellipsize="end"
android:layout_marginTop="1dp"
android:maxLines="1"
android:textSize="13sp" />
</LinearLayout>
<ImageView
android:id="@+id/push_notification_style_1_banner_icon"
android:layout_width="match_parent"
android:layout_height="96dp"
android:layout_alignParentBottom="true"
android:visibility="gone"
android:layout_below="@id/push_notification_style_1_main_layout"
android:scaleType="centerInside" />
</RelativeLayout>
<FrameLayout
android:id="@+id/push_notification_banner_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/push_notification_banner_img"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:visibility="gone" />
</FrameLayout>
<RelativeLayout
android:id="@+id/push_notification_header_neg_fb"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:visibility="gone">
<ImageView android:id="@+id/push_notification_header_expand"
android:layout_marginRight="2dp"
android:layout_marginTop="2dp"
android:layout_width="14dp"
android:layout_height="14dp"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:scaleType="centerInside"
android:background="#08000000"
android:src="@drawable/jpush_ic_action_close"
android:visibility="visible"/>
<LinearLayout
android:id="@+id/push_notification_fb_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="8dp"
android:layout_below="@id/push_notification_header_expand"
android:orientation="horizontal"
android:visibility="gone"
android:gravity="center">
<TextView
android:id="@+id/push_notification_fb_content_no_like1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#88000000"
android:background="#0f000000"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:textSize="14sp"
android:gravity="center"
android:maxLines="1"
android:layout_margin="5dp"
android:text="不感兴趣"/>
<TextView
android:id="@+id/push_notification_fb_content_no_like2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#88000000"
android:background="#0f000000"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:textSize="14sp"
android:gravity="center"
android:maxLines="1"
android:layout_margin="5dp"
android:text="重复收到"/>
<TextView
android:id="@+id/push_notification_fb_content_no_like3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#88000000"
android:background="#0f000000"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:textSize="14sp"
android:gravity="center"
android:maxLines="1"
android:layout_margin="5dp"
android:text="内容低质"/>
<TextView
android:id="@+id/push_notification_fb_content_no_like4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#88000000"
android:background="#0f000000"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:textSize="14sp"
android:gravity="center"
android:maxLines="1"
android:layout_margin="5dp"
android:text="内容不宜"/>
</LinearLayout>
</RelativeLayout>
</RelativeLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
android:id="@+id/push_root_view"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="256dp">
<FrameLayout
android:id="@+id/v"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<FrameLayout
android:id="@+id/layout_version_2"
android:layout_width="0dp"
android:layout_height="0dp" />
<RelativeLayout
android:id="@+id/push_notification_style_default"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone">
<LinearLayout
android:id="@+id/push_notification_layout_lefttop"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_toLeftOf="@+id/push_notification_big_icon"
android:gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:id="@+id/push_notification_small_icon"
android:layout_width="18dp"
android:layout_height="18dp"
android:scaleType="centerInside" />
<TextView
style="@*android:style/TextAppearance.Material.Notification.Title"
android:id="@+id/push_notification_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="4dp"
android:maxLines="1"
android:maxWidth="200dp"
android:maxLength="24"
android:textSize="12sp" />
<TextView
style="@*android:style/TextAppearance.Material.Notification.Info"
android:id="@+id/push_notification_dot"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="4dp"
android:textStyle="bold"
android:text="·"
android:textSize="16sp" />
<TextView
style="@*android:style/TextAppearance.Material.Notification.Time"
android:maxLines="1"
android:id="@+id/push_notification_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="12sp" />
</LinearLayout>
<FrameLayout
android:id="@+id/push_notification_for_bottom_margin"
android:layout_width="match_parent"
android:layout_alignParentBottom="true"
android:layout_height="0dp"/>
<ImageView
android:id="@+id/push_notification_banner_icon"
android:layout_width="match_parent"
android:layout_height="150dp"
android:layout_above="@+id/push_notification_for_bottom_margin"
android:layout_marginBottom="8dp"
android:visibility="gone"
android:scaleType="centerCrop" />
<LinearLayout
android:id="@+id/push_notification_main_layout"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/push_notification_banner_icon"
android:gravity="center_vertical"
android:layout_marginRight="4dp"
android:layout_marginBottom="5dp"
android:layout_toLeftOf="@+id/push_notification_big_icon"
android:layout_below="@id/push_notification_layout_lefttop">
<TextView
style="@*android:style/TextAppearance.Material.Notification.Title"
android:id="@+id/push_notification_sub_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="1dp"
android:maxLines="1"
android:ellipsize="end"
android:textSize="13sp"
android:visibility="gone" />
<TextView
style="@*android:style/TextAppearance.Material.Notification.Info"
android:id="@+id/push_notification_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:layout_marginTop="1dp"
android:maxLines="2"
android:textSize="13sp" />
<TextView
style="@*android:style/TextAppearance.Material.Notification.Info"
android:id="@+id/push_notification_content_one_line"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:layout_marginTop="1dp"
android:textSize="13sp"
android:maxLines="1"
android:visibility="gone" />
</LinearLayout>
<ImageView
android:id="@+id/push_notification_big_icon"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_alignParentRight="true"
android:layout_alignTop="@+id/push_notification_main_layout"
android:layout_alignBottom="@+id/push_notification_main_layout"
android:scaleType="centerInside" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/push_notification_style_1"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:visibility="gone">
<ImageView
android:id="@+id/push_notification_style_1_big_icon"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:scaleType="centerInside" />
<LinearLayout
android:id="@+id/push_notification_style_1_main_layout"
android:layout_toRightOf="@+id/push_notification_style_1_big_icon"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/push_notification_layout_time"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
style="@*android:style/TextAppearance.Material.Notification.Title"
android:id="@+id/push_notification_style_1_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="1"
android:layout_marginRight="8dp"
android:textSize="12sp"
android:textStyle="bold" />
<TextView
style="@*android:style/TextAppearance.Material.Notification.Time"
android:id="@+id/push_notification_style_1_date"
android:layout_height="wrap_content"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_marginRight="4dp"
android:gravity="right"
android:textSize="12sp" />
<TextView android:id="@+id/push_notification_null"
android:layout_width="24dp"
android:visibility="gone"
android:layout_height="20dp"/>
</LinearLayout>
<TextView
style="@*android:style/TextAppearance.Material.Notification.Info"
android:id="@+id/push_notification_style_1_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="4dp"
android:ellipsize="end"
android:layout_marginTop="1dp"
android:maxLines="1"
android:textSize="13sp" />
</LinearLayout>
<ImageView
android:id="@+id/push_notification_style_1_banner_icon"
android:layout_width="match_parent"
android:layout_height="150dp"
android:layout_alignParentBottom="true"
android:visibility="gone"
android:layout_below="@id/push_notification_style_1_main_layout"
android:scaleType="centerInside" />
</RelativeLayout>
<FrameLayout
android:id="@+id/push_notification_banner_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/push_notification_banner_img"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:visibility="gone" />
</FrameLayout>
<RelativeLayout
android:id="@+id/push_notification_header_neg_fb"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:visibility="gone">
<ImageView android:id="@+id/push_notification_header_expand"
android:layout_marginRight="2dp"
android:layout_marginTop="2dp"
android:layout_width="14dp"
android:layout_height="14dp"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:scaleType="centerInside"
android:background="#08000000"
android:src="@drawable/jpush_ic_action_close"
android:visibility="visible"/>
<LinearLayout
android:id="@+id/push_notification_fb_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="8dp"
android:layout_below="@id/push_notification_header_expand"
android:orientation="horizontal"
android:visibility="gone"
android:gravity="center">
<TextView
android:id="@+id/push_notification_fb_content_no_like1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#88000000"
android:background="#0f000000"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:textSize="14sp"
android:gravity="center"
android:maxLines="1"
android:layout_margin="5dp"
android:text="不感兴趣"/>
<TextView
android:id="@+id/push_notification_fb_content_no_like2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#88000000"
android:background="#0f000000"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:textSize="14sp"
android:gravity="center"
android:maxLines="1"
android:layout_margin="5dp"
android:text="重复收到"/>
<TextView
android:id="@+id/push_notification_fb_content_no_like3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#88000000"
android:background="#0f000000"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:textSize="14sp"
android:gravity="center"
android:maxLines="1"
android:layout_margin="5dp"
android:text="内容低质"/>
<TextView
android:id="@+id/push_notification_fb_content_no_like4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#88000000"
android:background="#0f000000"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:textSize="14sp"
android:gravity="center"
android:maxLines="1"
android:layout_margin="5dp"
android:text="内容不宜"/>
</LinearLayout>
</RelativeLayout>
</RelativeLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
android:id="@+id/push_root_view"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="202dp">
<FrameLayout
android:id="@+id/v"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<FrameLayout
android:id="@+id/layout_version_2"
android:layout_width="0dp"
android:layout_height="0dp" />
<RelativeLayout
android:id="@+id/push_notification_style_default"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone">
<LinearLayout
android:id="@+id/push_notification_layout_lefttop"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_toLeftOf="@+id/push_notification_big_icon"
android:gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:id="@+id/push_notification_small_icon"
android:layout_width="18dp"
android:layout_height="18dp"
android:scaleType="centerInside" />
<TextView
style="@*android:style/TextAppearance.Material.Notification.Title"
android:id="@+id/push_notification_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="4dp"
android:maxLines="1"
android:maxWidth="200dp"
android:maxLength="24"
android:textSize="12sp" />
<TextView
style="@*android:style/TextAppearance.Material.Notification.Info"
android:id="@+id/push_notification_dot"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="4dp"
android:textStyle="bold"
android:text="·"
android:textSize="16sp" />
<TextView
style="@*android:style/TextAppearance.Material.Notification.Time"
android:maxLines="1"
android:id="@+id/push_notification_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="12sp" />
</LinearLayout>
<FrameLayout
android:id="@+id/push_notification_for_bottom_margin"
android:layout_width="match_parent"
android:layout_alignParentBottom="true"
android:layout_height="0dp"/>
<ImageView
android:id="@+id/push_notification_banner_icon"
android:layout_width="match_parent"
android:layout_height="96dp"
android:layout_above="@+id/push_notification_for_bottom_margin"
android:layout_marginBottom="8dp"
android:visibility="gone"
android:scaleType="centerCrop" />
<LinearLayout
android:id="@+id/push_notification_main_layout"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/push_notification_banner_icon"
android:gravity="center_vertical"
android:layout_marginRight="4dp"
android:layout_marginBottom="5dp"
android:layout_toLeftOf="@+id/push_notification_big_icon"
android:layout_below="@id/push_notification_layout_lefttop">
<TextView
style="@*android:style/TextAppearance.Material.Notification.Title"
android:id="@+id/push_notification_sub_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="1dp"
android:maxLines="1"
android:ellipsize="end"
android:textSize="13sp"
android:visibility="gone" />
<TextView
style="@*android:style/TextAppearance.Material.Notification.Info"
android:id="@+id/push_notification_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:layout_marginTop="1dp"
android:maxLines="2"
android:textSize="13sp" />
<TextView
style="@*android:style/TextAppearance.Material.Notification.Info"
android:id="@+id/push_notification_content_one_line"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:layout_marginTop="1dp"
android:textSize="13sp"
android:maxLines="1"
android:visibility="gone" />
</LinearLayout>
<ImageView
android:id="@+id/push_notification_big_icon"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_alignParentRight="true"
android:layout_alignTop="@+id/push_notification_main_layout"
android:layout_alignBottom="@+id/push_notification_main_layout"
android:scaleType="centerInside" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/push_notification_style_1"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:visibility="gone">
<ImageView
android:id="@+id/push_notification_style_1_big_icon"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:scaleType="centerInside" />
<LinearLayout
android:id="@+id/push_notification_style_1_main_layout"
android:layout_toRightOf="@+id/push_notification_style_1_big_icon"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/push_notification_layout_time"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
style="@*android:style/TextAppearance.Material.Notification.Title"
android:id="@+id/push_notification_style_1_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="1"
android:layout_marginRight="8dp"
android:textSize="12sp"
android:textStyle="bold" />
<TextView
style="@*android:style/TextAppearance.Material.Notification.Time"
android:id="@+id/push_notification_style_1_date"
android:layout_height="wrap_content"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_marginRight="4dp"
android:gravity="right"
android:textSize="12sp" />
<TextView android:id="@+id/push_notification_null"
android:layout_width="24dp"
android:visibility="gone"
android:layout_height="20dp"/>
</LinearLayout>
<TextView
style="@*android:style/TextAppearance.Material.Notification.Info"
android:id="@+id/push_notification_style_1_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="4dp"
android:ellipsize="end"
android:layout_marginTop="1dp"
android:maxLines="1"
android:textSize="13sp" />
</LinearLayout>
<ImageView
android:id="@+id/push_notification_style_1_banner_icon"
android:layout_width="match_parent"
android:layout_height="96dp"
android:layout_alignParentBottom="true"
android:visibility="gone"
android:layout_below="@id/push_notification_style_1_main_layout"
android:scaleType="centerInside" />
</RelativeLayout>
<FrameLayout
android:id="@+id/push_notification_banner_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/push_notification_banner_img"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:visibility="gone" />
</FrameLayout>
<RelativeLayout
android:id="@+id/push_notification_header_neg_fb"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:visibility="gone">
<ImageView android:id="@+id/push_notification_header_expand"
android:layout_marginRight="2dp"
android:layout_marginTop="2dp"
android:layout_width="14dp"
android:layout_height="14dp"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:scaleType="centerInside"
android:background="#08000000"
android:src="@drawable/jpush_ic_action_close"
android:visibility="visible"/>
<LinearLayout
android:id="@+id/push_notification_fb_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="8dp"
android:layout_below="@id/push_notification_header_expand"
android:orientation="horizontal"
android:visibility="gone"
android:gravity="center">
<TextView
android:id="@+id/push_notification_fb_content_no_like1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#88000000"
android:background="#0f000000"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:textSize="14sp"
android:gravity="center"
android:maxLines="1"
android:layout_margin="5dp"
android:text="不感兴趣"/>
<TextView
android:id="@+id/push_notification_fb_content_no_like2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#88000000"
android:background="#0f000000"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:textSize="14sp"
android:gravity="center"
android:maxLines="1"
android:layout_margin="5dp"
android:text="重复收到"/>
<TextView
android:id="@+id/push_notification_fb_content_no_like3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#88000000"
android:background="#0f000000"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:textSize="14sp"
android:gravity="center"
android:maxLines="1"
android:layout_margin="5dp"
android:text="内容低质"/>
<TextView
android:id="@+id/push_notification_fb_content_no_like4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#88000000"
android:background="#0f000000"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:textSize="14sp"
android:gravity="center"
android:maxLines="1"
android:layout_margin="5dp"
android:text="内容不宜"/>
</LinearLayout>
</RelativeLayout>
</RelativeLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="jg_channel_name_p_min">不重要</string>
<string name="jg_channel_name_p_low">不重要</string>
<string name="jg_channel_name_p_default">普通</string>
<string name="jg_channel_name_p_high">重要</string>
</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="jg_channel_name_p_min">LOW</string>
<string name="jg_channel_name_p_low">LOW</string>
<string name="jg_channel_name_p_default">NORMAL</string>
<string name="jg_channel_name_p_high">HIGH</string>
</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="MyDialogStyle">
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowFrame">@null</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowIsFloating">true</item>
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowAnimationStyle">@android:style/Animation.Dialog</item>
<item name="android:backgroundDimEnabled">true</item>
</style>
<style name="JPushTheme">
<item name="android:windowNoTitle">true</item>
<item name="android:windowActionBar">false</item>
<item name="android:windowFullscreen">true</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:textAllCaps">false</item>
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
</style>
</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<paths>
<root-path name="jad_root_path" path="."/>
<external-path name="jad_external_path" path="JAdDownload" />
<external-files-path name="jad_external_files_path" path="JAdDownload" />
<files-path name="jad_files_path" path="JAdDownload" />
<cache-path name="jad_cache_path" path="JAdDownload" />
</paths>
</resources>
\ No newline at end of file
include ':app'
include ':app', ':library_jiguang'
rootProject.name='hooloo'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment