|
|
|
@ -1,5 +1,8 @@ |
|
|
|
package com.qhclh.ytzh.me; |
|
|
|
|
|
|
|
import android.graphics.drawable.Drawable; |
|
|
|
import android.widget.TextView; |
|
|
|
|
|
|
|
import com.qhclh.ytzh.R; |
|
|
|
import com.qhclh.ytzh.base.BaseFragment; |
|
|
|
|
|
|
|
@ -8,6 +11,8 @@ import com.qhclh.ytzh.base.BaseFragment; |
|
|
|
*/ |
|
|
|
|
|
|
|
public class MeFragment extends BaseFragment { |
|
|
|
private TextView me_msg,me_set; |
|
|
|
|
|
|
|
@Override |
|
|
|
protected int setLayout() { |
|
|
|
return R.layout.fragment_me; |
|
|
|
@ -15,6 +20,16 @@ public class MeFragment extends BaseFragment { |
|
|
|
|
|
|
|
@Override |
|
|
|
protected void initView() { |
|
|
|
me_msg = getActivity().findViewById(R.id.me_msg); |
|
|
|
me_set = getActivity().findViewById(R.id.me_set); |
|
|
|
Drawable message_icon = getResources().getDrawable(R.drawable.message_icon); |
|
|
|
Drawable setting_icon = getResources().getDrawable(R.drawable.setting_icon); |
|
|
|
Drawable zhankai_3x = getResources().getDrawable(R.drawable.zhankai_3x); |
|
|
|
message_icon.setBounds(0, 0, 40, 30);//第一0是距左边距离,第二0是距上边距离,40分别是长宽 |
|
|
|
setting_icon.setBounds(0, 0, 44, 40);//第一0是距左边距离,第二0是距上边距离,40分别是长宽 |
|
|
|
zhankai_3x.setBounds(0, 0, 20, 40);//第一0是距左边距离,第二0是距上边距离,40分别是长宽 |
|
|
|
me_msg.setCompoundDrawables(message_icon, null, zhankai_3x, null);//只放左边 右边 |
|
|
|
me_set.setCompoundDrawables(setting_icon, null, zhankai_3x, null);//只放左边 右边 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|