网友通过本文主要向大家介绍了app4,app4code,app4 ff6666ff,app4 bd123789,app4 ww888999等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
仿拉手团购App4--我的模块,拉手团购app4--
fragment_me.xml
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:app="http://schemas.android.com/apk/res-auto" android:orientation="vertical" android:background="@color/app_bg" android:layout_width="match_parent" android:layout_height="match_parent"> <ScrollView android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/app_bg"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> <RelativeLayout android:id="@+id/me_login_layout" android:layout_width="match_parent" android:layout_height="@dimen/me_login_layout_height" android:paddingLeft="@dimen/me_login_layout_paddingLeft" android:background="@mipmap/my_login_bg" android:visibility="gone"> <com.facebook.drawee.view.SimpleDraweeView android:id="@+id/me_login_iv_head" android:layout_width="@dimen/me_login_head_width" android:layout_height="@dimen/me_login_head_height" android:layout_marginEnd="@dimen/me_login_head_marginEnd" android:layout_centerVertical="true" android:scaleType="fitXY" app:placeholderImage="@mipmap/user_head"/> <LinearLayout android:id="@+id/me_login_profile_layout" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_centerVertical="true" android:layout_toRightOf="@+id/me_login_iv_head" android:orientation="vertical"> <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginStart="@dimen/me_login_profile_layout_marginStart"> <TextView android:id="@+id/me_login_tv_username" android:layout_width="wrap_content" android:layout_height="wrap_content" tools:text="布拉拉" android:singleLine="true" android:ellipsize="end" android:textColor="@color/grad" android:textSize="@dimen/me_login_username_size"/> <ImageView android:id="@+id/me_login_iv_level" android:layout_width="@dimen/me_login_level_width" android:layout_height="@dimen/me_login_level_height" android:layout_marginStart="@dimen/me_login_level_marginStart" android:layout_toRightOf="@+id/me_login_tv_username" android:src="@mipmap/level_0"/> </RelativeLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="@dimen/me_login_balance_layout_marginTop" android:layout_marginStart="@dimen/me_login_profile_layout_marginStart"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/me_login_balance" android:textSize="@dimen/me_login_balance_size"/> <TextView android:id="@+id/me_login_tv_balance" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="00.00" android:textSize="@dimen/textSize_16"/> </LinearLayout> </LinearLayout> <ImageView android:id="@+id/me_login_iv_arrow_right" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_centerVertical="true" android:layout_marginEnd="@dimen/me_login_head_marginEnd" android:src="@mipmap/icon_user_arrow_more"/> </RelativeLayout> <LinearLayout android:id="@+id/me_nologin_layout" android:layout_width="match_parent" android:layout_height="@dimen/me_login_layout_height" android:orientation="vertical" android:gravity="center" android:background="@mipmap/my_login_bg"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/me_nologin_not_login" android:textSize="@dimen/me_nologin_textSize" android:textColor="@color/grad"/> <Button android:id="@+id/me_nologin_btn_login" android:layout_width="80dp" android:layout_height="30dp" android:layout_marginTop="10dp" android:text="@string/me_nologin_login" android:textSize="@dimen/me_nologin_textSize" android:textColor="@color/grad" android:background="@drawable/login_btn_bg_selector"/> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:padding="5dp" android:background="@drawable/white_quai_bg" android:orientation="horizontal"> <TextView android:id="@+id/me_user_tv_cart" >public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_me, null); initView(view); initUserLayout(); return view; } private void initUserLayout() { User user = User.getCurrentUser(User.class); if (user != null) { mLoginLayout.setVisibility(View.VISIBLE); mNologinLayout.setVisibility(View.GONE); mItemBankcardLayout.setVisibility(View.VISIBLE); mItemCouponsLayout.setVisibility(View.VISIBLE); mLoginTvUsername.setText(user.getUsername()); mLoginTvBalance.setText(user.getBalance() + ""); if (user.getHeadIcon() == null) { mLoginIvHead.setImageResource(R.mipmap.user_head); } else { mLoginIvHead.setImageURI(Uri.parse(user.getHeadIcon().getFileUrl())); } } else { mLoginLayout.setVisibility(View.GONE); mNologinLayout.setVisibility(View.VISIBLE); mItemBankcardLayout.setVisibility(View.GONE);