Browse Source

申请订阅

RaoMeng 9 years ago
parent
commit
b3411dfb97

+ 30 - 3
WeiChat/src/main/java/com/xzjmyk/pm/activity/adapter/AllSubscriptionAdapter.java

@@ -8,22 +8,26 @@ import android.widget.ImageView;
 import android.widget.TextView;
 
 import com.xzjmyk.pm.activity.R;
+import com.xzjmyk.pm.activity.bean.SubscriptionNumber;
 import com.xzjmyk.pm.activity.bean.message.AllSubscriptonKindMessage;
 import com.xzjmyk.pm.activity.view.MyListView;
 
+import java.util.ArrayList;
 import java.util.List;
 
 /**
- * Created by PROD on 2016/9/7.
+ * Created by RaoMeng on 2016/9/7.
  */
 public class AllSubscriptionAdapter extends BaseAdapter{
     private Context mContext;
     private List<AllSubscriptonKindMessage> mAllSubscriptonKindMessages;
     private AllSubscriptionNumbersAdapter mAllSubscriptionNumbersAdapter;
+    private List<SubscriptionNumber> subscriptionNumbers;
 
     public AllSubscriptionAdapter(Context mContext, List<AllSubscriptonKindMessage> mAllSubscriptonKindMessages) {
         this.mContext = mContext;
         this.mAllSubscriptonKindMessages = mAllSubscriptonKindMessages;
+        subscriptionNumbers = new ArrayList<>();
     }
 
 
@@ -57,8 +61,31 @@ public class AllSubscriptionAdapter extends BaseAdapter{
         }else {
             viewHolder = (ViewHolder) convertView.getTag();
         }
-
-
+        String subscriptionKind = mAllSubscriptonKindMessages.get(position).getSubscriptionKind();
+        viewHolder.kindNameTextView.setText(subscriptionKind);
+        switch (subscriptionKind){
+            case "财务管理":
+                viewHolder.kindImageView.setImageResource(R.drawable.ic_financial_statement);
+                break;
+            case "销售管理":
+                viewHolder.kindImageView.setImageResource(R.drawable.ic_sales);
+                break;
+            case "库存管理":
+                viewHolder.kindImageView.setImageResource(R.drawable.ic_reserve);
+                break;
+            case "采购管理":
+                viewHolder.kindImageView.setImageResource(R.drawable.ic_purchase);
+                break;
+            case "品质管理":
+                viewHolder.kindImageView.setImageResource(R.drawable.ic_quality);
+                break;
+            case "生产制造管理":
+                viewHolder.kindImageView.setImageResource(R.drawable.ic_production_plan);
+                break;
+        }
+        subscriptionNumbers = mAllSubscriptonKindMessages.get(position).getSubscriptionNumbers();
+        mAllSubscriptionNumbersAdapter = new AllSubscriptionNumbersAdapter(mContext,subscriptionNumbers);
+        viewHolder.numbersListView.setAdapter(mAllSubscriptionNumbersAdapter);
 
         return convertView;
     }

+ 82 - 7
WeiChat/src/main/java/com/xzjmyk/pm/activity/adapter/AllSubscriptionNumbersAdapter.java

@@ -1,35 +1,49 @@
 package com.xzjmyk.pm.activity.adapter;
 
+import android.annotation.TargetApi;
 import android.content.Context;
+import android.os.Build;
+import android.os.Handler;
+import android.os.Message;
+import android.util.Log;
 import android.view.View;
 import android.view.ViewGroup;
 import android.widget.BaseAdapter;
 import android.widget.TextView;
 
 import com.xzjmyk.pm.activity.R;
+import com.xzjmyk.pm.activity.bean.SubscriptionNumber;
+import com.xzjmyk.pm.activity.ui.erp.net.ViewUtil;
+import com.xzjmyk.pm.activity.ui.erp.util.CommonUtil;
+import com.xzjmyk.pm.activity.ui.erp.util.Constants;
+import com.xzjmyk.pm.activity.view.crouton.Crouton;
 
+import java.util.HashMap;
+import java.util.LinkedHashMap;
 import java.util.List;
+import java.util.Map;
 
 /**
  * Created by PROD on 2016/9/7.
  */
 public class AllSubscriptionNumbersAdapter extends BaseAdapter {
     private Context mContext;
-    private List<String > mStrings;
+    private List<SubscriptionNumber> mSubscriptionNumbers;
+    private int clickPosition;
 
-    public AllSubscriptionNumbersAdapter(Context mContext, List<String> mStrings) {
+    public AllSubscriptionNumbersAdapter(Context mContext, List<SubscriptionNumber> mSubscriptionNumbers) {
         this.mContext = mContext;
-        this.mStrings = mStrings;
+        this.mSubscriptionNumbers = mSubscriptionNumbers;
     }
 
     @Override
     public int getCount() {
-        return mStrings.size();
+        return mSubscriptionNumbers.size();
     }
 
     @Override
     public Object getItem(int position) {
-        return mStrings.get(position);
+        return mSubscriptionNumbers.get(position);
     }
 
     @Override
@@ -37,24 +51,85 @@ public class AllSubscriptionNumbersAdapter extends BaseAdapter {
         return position;
     }
 
+    @TargetApi(Build.VERSION_CODES.JELLY_BEAN)
     @Override
-    public View getView(int position, View convertView, ViewGroup parent) {
+    public View getView(final int position, View convertView, ViewGroup parent) {
         ViewHolder viewHolder = null;
         if (convertView == null){
             convertView = View.inflate(mContext, R.layout.layout_all_subscription_number_list,null);
             viewHolder = new ViewHolder();
 
             viewHolder.nameTextView = (TextView) convertView.findViewById(R.id.all_subscription_list_name_tv);
-
+            viewHolder.applyTextView = (TextView) convertView.findViewById(R.id.all_subscription_apply_tv);
             convertView.setTag(viewHolder);
         }else {
             viewHolder = (ViewHolder) convertView.getTag();
         }
 
+        boolean sub = mSubscriptionNumbers.get(position).isSub();
+        viewHolder.nameTextView.setText(mSubscriptionNumbers.get(position).getTitle());
+
+        if (sub){
+            viewHolder.nameTextView.setTextColor(mContext.getResources().getColor(R.color.gray));
+            viewHolder.nameTextView.setBackground(mContext.getResources().getDrawable(R.drawable.shape_subscribe_selet_bg));
+            viewHolder.applyTextView.setText("已订阅");
+            viewHolder.applyTextView.setEnabled(false);
+        }else {
+            viewHolder.nameTextView.setTextColor(mContext.getResources().getColor(R.color.white));
+            viewHolder.nameTextView.setBackground(mContext.getResources().getDrawable(R.drawable.shape_subscribe_bg));
+            viewHolder.applyTextView.setText("申请");
+            viewHolder.applyTextView.setEnabled(true);
+        }
+
+        viewHolder.applyTextView.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+//                Intent intent = new Intent();
+//                intent.setClass(mContext, ApplySubscribeActivity.class);
+//                mContext.startActivity(intent);
+                clickPosition = position;
+                sendApplySubs(clickPosition);
+            }
+        });
+
         return convertView;
     }
 
+    /**
+     * 申请订阅
+     */
+    private void sendApplySubs(int position) {
+        String applyUrl = Constants.getAppBaseUrl(mContext) + "common/charts/vastAddSubsApply.action";
+        Map<String,Object> params = new HashMap<>();
+        params.put("ids",mSubscriptionNumbers.get(position).getId());
+        params.put("caller","VastAddSubsApply");
+
+        LinkedHashMap<String,Object> headers = new LinkedHashMap<>();
+        headers.put("Cookie","JSESSIONID="+ CommonUtil.getSharedPreferences(mContext,"sessionId"));
+        ViewUtil.httpSendRequest(mContext,applyUrl,params,mHandler,headers,APPLY_SUBSCRIPTION,null,null,"post");
+    }
+
     class ViewHolder{
         TextView nameTextView;
+        TextView applyTextView;
     }
+
+    private final static int APPLY_SUBSCRIPTION = 101;
+    private Handler mHandler = new Handler(){
+        @TargetApi(Build.VERSION_CODES.JELLY_BEAN)
+        @Override
+        public void handleMessage(Message msg) {
+            switch (msg.what){
+                case APPLY_SUBSCRIPTION:
+                    Log.d("applysubscription", msg.getData().getString("result"));
+                    Crouton.makeText(mContext, "添加订阅成功");
+                    mSubscriptionNumbers.get(clickPosition).setSub(true);
+                    notifyDataSetChanged();
+                    break;
+                case Constants.APP_SOCKETIMEOUTEXCEPTION:
+                    Crouton.makeText(mContext,msg.getData().getString("result"));
+                    break;
+            }
+        }
+    };
 }

+ 2 - 2
WeiChat/src/main/java/com/xzjmyk/pm/activity/adapter/MySubscriptionAdapter.java

@@ -81,9 +81,9 @@ public class MySubscriptionAdapter extends BaseAdapter {
         }
         viewHolder.subscribeIv.setImageResource(mImageIds.get(i % 5));
         if ("private".equals(mPersonalSubscriptionBeans.get(i).getKIND())){
-            viewHolder.titleTv.setText(mPersonalSubscriptionBeans.get(i).getTITLE()+"私");
+            viewHolder.titleTv.setText(mPersonalSubscriptionBeans.get(i).getTITLE()+"()");
         }else {
-            viewHolder.titleTv.setText(mPersonalSubscriptionBeans.get(i).getTITLE()+"公");
+            viewHolder.titleTv.setText(mPersonalSubscriptionBeans.get(i).getTITLE()+"()");
         }
         viewHolder.contentTv.setText("该订阅号属于"+mPersonalSubscriptionBeans.get(i).getTYPE()+"类订阅号");
         return view;

+ 44 - 0
WeiChat/src/main/java/com/xzjmyk/pm/activity/bean/SubscriptionNumber.java

@@ -0,0 +1,44 @@
+package com.xzjmyk.pm.activity.bean;
+
+/**
+ * 订阅号实体类
+ * Created by RaoMeng on 2016/9/21.
+ */
+public class SubscriptionNumber {
+    private int id;
+    private String title;
+    private String kind;
+    private boolean sub;
+
+    public boolean isSub() {
+        return sub;
+    }
+
+    public void setSub(boolean sub) {
+        this.sub = sub;
+    }
+
+    public int getId() {
+        return id;
+    }
+
+    public void setId(int id) {
+        this.id = id;
+    }
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    public String getKind() {
+        return kind;
+    }
+
+    public void setKind(String kind) {
+        this.kind = kind;
+    }
+}

+ 8 - 4
WeiChat/src/main/java/com/xzjmyk/pm/activity/bean/message/AllSubscriptonKindMessage.java

@@ -1,13 +1,17 @@
 package com.xzjmyk.pm.activity.bean.message;
 
+import com.xzjmyk.pm.activity.bean.SubscriptionNumber;
+
 import java.util.List;
 
 /**
- * Created by PROD on 2016/9/7.
+ * 所有订阅类实体类
+ * Created by RaoMeng on 2016/9/7.
  */
 public class AllSubscriptonKindMessage {
     private String subscriptionKind;
-    private List<String> subscriptionNumbers;
+    private List<SubscriptionNumber> subscriptionNumbers;
+
 
     public String getSubscriptionKind() {
         return subscriptionKind;
@@ -17,11 +21,11 @@ public class AllSubscriptonKindMessage {
         this.subscriptionKind = subscriptionKind;
     }
 
-    public List<String> getSubscriptionNumbers() {
+    public List<SubscriptionNumber> getSubscriptionNumbers() {
         return subscriptionNumbers;
     }
 
-    public void setSubscriptionNumbers(List<String> subscriptionNumbers) {
+    public void setSubscriptionNumbers(List<SubscriptionNumber> subscriptionNumbers) {
         this.subscriptionNumbers = subscriptionNumbers;
     }
 }

+ 1 - 1
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/adapter/SubscribeManegeVpAdapter.java

@@ -8,7 +8,7 @@ import android.support.v4.app.FragmentPagerAdapter;
 import java.util.List;
 
 /**
- * Created by PROD on 2016/9/5.
+ * Created by RaoMeng on 2016/9/5.
  */
 public class SubscribeManegeVpAdapter extends FragmentPagerAdapter{
     private Context mContext;

+ 85 - 43
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/fragment/SubscriptionAllFragment.java

@@ -1,31 +1,40 @@
 package com.xzjmyk.pm.activity.ui.erp.fragment;
 
-import android.content.Intent;
-import android.view.View;
-import android.widget.AdapterView;
+import android.os.Handler;
+import android.os.Message;
+import android.util.Log;
 import android.widget.ListView;
 
 import com.handmark.pulltorefresh.library.PullToRefreshBase;
 import com.handmark.pulltorefresh.library.PullToRefreshListView;
-import com.xzjmyk.pm.activity.ApplySubscribeActivity;
 import com.xzjmyk.pm.activity.R;
 import com.xzjmyk.pm.activity.adapter.AllSubscriptionAdapter;
-import com.xzjmyk.pm.activity.adapter.AllSubscriptionNumbersAdapter;
+import com.xzjmyk.pm.activity.bean.SubscriptionNumber;
 import com.xzjmyk.pm.activity.bean.message.AllSubscriptonKindMessage;
+import com.xzjmyk.pm.activity.ui.erp.net.ViewUtil;
+import com.xzjmyk.pm.activity.ui.erp.util.CommonUtil;
+import com.xzjmyk.pm.activity.ui.erp.util.Constants;
 import com.xzjmyk.pm.activity.view.crouton.Crouton;
+import com.xzjmyk.pm.activity.view.crouton.Style;
+
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
 
 import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
 import java.util.List;
+import java.util.Map;
 
 /**
- * Created by PROD on 2016/9/5.
+ * Created by RaoMeng on 2016/9/5.
  */
 public class SubscriptionAllFragment extends BaseFragment {
     private PullToRefreshListView mPullToRefreshListView;
     private AllSubscriptionAdapter mAllSubscriptionAdapter;
     private List<AllSubscriptonKindMessage> mAllSubscriptonKindMessages;
-    private AllSubscriptionNumbersAdapter mAllSubscriptionNumbersAdapter;
-    private List<String> mStrings;
     @Override
     protected int getLayout() {
         return R.layout.fragment_all_subscription;
@@ -35,14 +44,6 @@ public class SubscriptionAllFragment extends BaseFragment {
     protected void initViews() {
         mPullToRefreshListView = (PullToRefreshListView) root.findViewById(R.id.subscription_all_ptlv);
         mAllSubscriptonKindMessages = new ArrayList<>();
-        mStrings = new ArrayList<>();
-
-        for (int i = 0; i < 10; i++) {
-            AllSubscriptonKindMessage allSubscriptonKindMessage = new AllSubscriptonKindMessage();
-            mAllSubscriptonKindMessages.add(allSubscriptonKindMessage);
-        }
-
-        mAllSubscriptionNumbersAdapter = new AllSubscriptionNumbersAdapter(getActivity(),mStrings);
         mAllSubscriptionAdapter = new AllSubscriptionAdapter(getActivity(),mAllSubscriptonKindMessages);
 
     }
@@ -54,28 +55,13 @@ public class SubscriptionAllFragment extends BaseFragment {
         mPullToRefreshListView.setOnRefreshListener(new PullToRefreshBase.OnRefreshListener2<ListView>() {
             @Override
             public void onPullDownToRefresh(PullToRefreshBase<ListView> refreshView) {
-                Crouton.makeText(getActivity(),"下拉刷新", 0xff99cc00,1500).show();
-                for (int i = 0; i < 10; i++) {
-                    AllSubscriptonKindMessage allSubscriptonKindMessage = new AllSubscriptonKindMessage();
-                    mAllSubscriptonKindMessages.add(allSubscriptonKindMessage);
-                }
-                mAllSubscriptionAdapter.notifyDataSetChanged();
-                mPullToRefreshListView.postDelayed(new Runnable() {
-                    @Override
-                    public void run() {
-                        mPullToRefreshListView.onRefreshComplete();
-
-                    }
-                },1000);
+                mAllSubscriptonKindMessages.clear();
+                sendAllSubscriptionRequest();
             }
 
             @Override
             public void onPullUpToRefresh(PullToRefreshBase<ListView> refreshView) {
-                Crouton.makeText(getActivity(),"上拉加载", 0xffff4444,1500).show();
-                AllSubscriptonKindMessage allSubscriptonKindMessage = new AllSubscriptonKindMessage();
-                mAllSubscriptonKindMessages.add(allSubscriptonKindMessage);
-
-                mAllSubscriptionAdapter.notifyDataSetChanged();
+                Crouton.makeText(getActivity(), "上拉加载", 0xffff4444, 1500).show();
                 mPullToRefreshListView.postDelayed(new Runnable() {
                     @Override
                     public void run() {
@@ -85,19 +71,75 @@ public class SubscriptionAllFragment extends BaseFragment {
                 }, 1000);
             }
         });
-
-        mPullToRefreshListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
-            @Override
-            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
-                Intent intent = new Intent();
-                intent.setClass(getActivity(), ApplySubscribeActivity.class);
-                startActivity(intent);
-            }
-        });
     }
 
     @Override
     protected void initDatas() {
+        sendAllSubscriptionRequest();
+    }
+
+    /**
+     * 获取全部订阅
+     */
+    private void sendAllSubscriptionRequest() {
+        String allSubsUrl = Constants.getAppBaseUrl(getActivity()) + "common/charts/getApplySubs.action";
+        Map<String, Object> params = new HashMap<>();
+        params.put("em_code", CommonUtil.getSharedPreferences(getActivity(),"erp_username"));
+
+        LinkedHashMap headers = new LinkedHashMap();
+        headers.put("Cookie","JSESSIONID="+CommonUtil.getSharedPreferences(getActivity(),"sessionId"));
+        ViewUtil.httpSendRequest(getActivity(),allSubsUrl,params,mHandler,headers,GET_ALL_SUBSCRIPTION,null,null,"post");
+    }
+
+    private final static int GET_ALL_SUBSCRIPTION = 44;
+    private Handler mHandler = new Handler(){
+        @Override
+        public void handleMessage(Message msg) {
+            switch (msg.what){
+                case GET_ALL_SUBSCRIPTION:
+                    String resultJson = msg.getData().getString("result");
+                    Log.d("allsubscriptionResult: ", resultJson);
+                    try {
+                        JSONObject resultObject = new JSONObject(resultJson);
+                        JSONArray datasArray = resultObject.getJSONArray("datas");
+                        JSONObject datasObject = datasArray.getJSONObject(0);
+                        Iterator<String> iterator = datasObject.keys();
+                        while (iterator.hasNext()){
+                            String key = iterator.next().toString();
+                            Log.d("allsubskeys: ",key);
+                            AllSubscriptonKindMessage subscriptonKindMessage = new AllSubscriptonKindMessage();
+                            subscriptonKindMessage.setSubscriptionKind(key);
+                            List<SubscriptionNumber> subscriptionNumbers = new ArrayList<>();
+                            JSONArray subsArray = datasObject.getJSONArray(key);
+                            Log.d("allsubsarray: ", subsArray.toString());
+                            for (int i = 0; i < subsArray.length(); i++) {
+                                JSONObject subsObject = subsArray.getJSONObject(i);
+                                SubscriptionNumber subscriptionNumber = new SubscriptionNumber();
+                                subscriptionNumber.setId(subsObject.getInt("id"));
+                                subscriptionNumber.setTitle(subsObject.getString("title"));
+                                subscriptionNumber.setKind(subsObject.getString("kind"));
+                                subscriptionNumbers.add(subscriptionNumber);
+                            }
+                            subscriptonKindMessage.setSubscriptionNumbers(subscriptionNumbers);
+                            mAllSubscriptonKindMessages.add(subscriptonKindMessage);
+                            mAllSubscriptionAdapter.notifyDataSetChanged();
+                            if (mPullToRefreshListView.isRefreshing()){
+                                mPullToRefreshListView.onRefreshComplete();
+                                Crouton.makeText(getActivity(),"刷新成功", 0xff99cc00,1500).show();
+                            }
+                        }
+                    } catch (JSONException e) {
+                        e.printStackTrace();
+                    }
+                    break;
+                case Constants.APP_SOCKETIMEOUTEXCEPTION:
+                    Crouton.makeText(getActivity(),msg.getData().getString("result"), Style.ALERT).show();
+                    break;
+            }
+        }
+    };
 
+    public interface OnRefreshAllSubsListener{
+        public void onRefreshAllSubs();
     }
 }

+ 1 - 1
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/fragment/SubscriptionMyFragment.java

@@ -200,9 +200,9 @@ public class SubscriptionMyFragment extends BaseFragment {
                             mPersonalSubscriptionBeans.add(personalSubscriptionBean);
                         }
                         mMySubscriptionAdapter.notifyDataSetChanged();
-                        Crouton.makeText(getActivity(),"刷新成功", Style.CONFIRM).show();
                         if (mPullToRefreshScrollView.isRefreshing()){
                             mPullToRefreshScrollView.onRefreshComplete();
+                            Crouton.makeText(getActivity(),"刷新成功", Style.CONFIRM).show();
                         }
                     } catch (JSONException e) {
                         e.printStackTrace();

+ 7 - 0
WeiChat/src/main/res/drawable/shape_subscribe_bg.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle">
+
+    <corners android:radius="5dp"/>
+    <solid android:color="#885BA1D1"/>
+</shape>

+ 7 - 0
WeiChat/src/main/res/drawable/shape_subscribe_selet_bg.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle">
+
+    <corners android:radius="5dp"/>
+    <solid android:color="#88CECECE"/>
+</shape>

+ 17 - 4
WeiChat/src/main/res/layout/layout_all_subscription_number_list.xml

@@ -1,14 +1,27 @@
 <?xml version="1.0" encoding="utf-8"?>
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
-    android:layout_height="40dp"
+    android:layout_height="36dp"
     android:padding="5dp">
 
     <TextView
         android:id="@+id/all_subscription_list_name_tv"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
+        android:layout_width="200dp"
+        android:layout_height="35dp"
         android:layout_centerInParent="true"
         android:text="XXXXXX"
-        android:textSize="18sp"/>
+        android:textColor="@color/white"
+        android:gravity="center_vertical"
+        android:paddingLeft="10dp"
+        android:singleLine="true"
+        android:background="@drawable/shape_subscribe_bg"
+        android:textSize="16sp"/>
+    <TextView
+        android:id="@+id/all_subscription_apply_tv"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_toRightOf="@id/all_subscription_list_name_tv"
+        android:text="添加"
+        android:layout_centerVertical="true"
+        android:layout_marginLeft="12dp"/>
 </RelativeLayout>

+ 2 - 5
WeiChat/src/main/res/layout/layout_my_subscribe_list.xml

@@ -9,7 +9,6 @@
         android:id="@+id/my_subscribe_iv"
         android:layout_width="60dp"
         android:layout_height="60dp"
-        android:src="@drawable/f_static_000"
         android:scaleType="fitXY"
         />
 
@@ -19,8 +18,7 @@
         android:layout_height="wrap_content"
         android:layout_toRightOf="@id/my_subscribe_iv"
         android:layout_marginLeft="10dp"
-        android:textSize="22sp"
-        android:text="xxxxx"/>
+        android:textSize="18sp"/>
 
     <TextView
         android:id="@+id/my_subscribe_content_tv"
@@ -30,8 +28,7 @@
         android:layout_alignParentBottom="true"
         android:layout_marginLeft="10dp"
         android:layout_marginBottom="5dp"
-        android:textSize="16sp"
-        android:text="YYYYYYYYYYY"/>
+        android:textSize="14sp"/>
 
     <ImageView
         android:id="@+id/my_subscribe_lock_iv"