Commit f716b08b authored by 张释方's avatar 张释方

提交代码

parent b7526533
......@@ -72,6 +72,8 @@
android:theme="@style/AppTheme.NoneTranslucent">
</activity>
<activity android:name=".main.my.MoresettingsActivity"/>
<activity android:name=".main.my.AboutusActivity"/>
<!-- ShareSDK start -->
<activity
......
package com.mints.street.main.my
import android.graphics.Color
import android.os.Bundle
import android.view.View
import com.mints.street.databinding.ActivityAboutusBinding
import com.fry.base.base.BaseActivity
import com.mints.street.BR
import com.mints.street.R
import kotlinx.android.synthetic.main.activity_aboutus.*
import kotlinx.android.synthetic.main.header_layout.*
class AboutusActivity :BaseActivity<ActivityAboutusBinding, AboutusViewModel>() {
class AboutusActivity :BaseActivity<ActivityAboutusBinding, AboutusViewModel>(), View.OnClickListener {
override fun initVariableId() = BR.viewModel
override fun initContentView(savedInstanceState: Bundle?)= R.layout.activity_aboutus
override fun initData() {
super.initData()
initView()
}
private fun initView() {
tv_title.text="关于我们"
tv_title.setTextColor(Color.BLACK)
iv_left_icon.setImageResource(R.mipmap.iv_return)
tv_user.setOnClickListener(this)
tv_privacy.setOnClickListener(this)
}
override fun onClick(v: View?) {
when(v?.id){
R.id.tv_user->{
// startActivity(UseragreementActivity::class.java)
}
R.id.tv_privacy->{
// startActivity(PrivacypolicyActivity::class.java)
}
}
}
}
package com.mints.street.main.my
import android.graphics.Color
import android.os.Bundle
import com.fry.base.base.BaseActivity
import com.mints.street.BR
import com.mints.street.R
import com.mints.street.databinding.ActivityMoresettingsBinding
import kotlinx.android.synthetic.main.header_layout.*
class MoresettingsActivity: BaseActivity<ActivityMoresettingsBinding, MoresettingsViewModel>() {
override fun initVariableId() = BR.viewModel
override fun initContentView(savedInstanceState: Bundle?)= R.layout.activity_moresettings
override fun initData() {
super.initData()
initView()
}
private fun initView() {
tv_title.text="更多设置"
tv_title.setTextColor(Color.BLACK)
iv_left_icon.setImageResource(R.mipmap.iv_return)
}
}
......
package com.mints.street.main.my
import android.graphics.Color
import android.graphics.drawable.BitmapDrawable
import android.os.Bundle
import android.util.Log
import android.view.Gravity
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.PopupWindow
import android.widget.Toast
import androidx.activity.OnBackPressedCallback
import com.fry.base.base.BaseFragment
import com.mints.street.BR
import com.mints.street.R
import com.mints.street.databinding.FragmentMyBinding
import kotlinx.android.synthetic.main.fragment_my.*
import kotlinx.android.synthetic.main.header_layout.*
/**
......@@ -29,6 +33,13 @@ class MyFragment : BaseFragment<FragmentMyBinding, MyViewModel>(), View.OnClickL
override fun initVariableId() = BR.viewModel
override fun initData() {
super.initData()
binding.llMyLogin.setOnClickListener {
showPopwindow();
}
binding.btTry.setOnClickListener {
Toast.makeText(context,"点击事件响应了",Toast.LENGTH_SHORT).show()
}
ly_aboutus.setOnClickListener(this)
ly_moresettings.setOnClickListener(this)
requireActivity().onBackPressedDispatcher.addCallback(
......@@ -43,6 +54,7 @@ class MyFragment : BaseFragment<FragmentMyBinding, MyViewModel>(), View.OnClickL
})
}
override fun onClick(v: View?) {
when (v?.id) {
R.id.ly_aboutus -> {
......@@ -51,10 +63,6 @@ class MyFragment : BaseFragment<FragmentMyBinding, MyViewModel>(), View.OnClickL
R.id.ly_moresettings -> {
startActivity(MoresettingsActivity::class.java)
}
R.id.ll_my_login -> {
//这里需要加判断
showPopwindow();
}
}
}
......@@ -88,4 +96,5 @@ class MyFragment : BaseFragment<FragmentMyBinding, MyViewModel>(), View.OnClickL
popupWindow!!.showAtLocation(contentView, Gravity.BOTTOM, 0, 0)
}
}
\ No newline at end of file
}
package com.mints.street.main.my
import android.os.Bundle
import com.fry.base.base.BaseActivity
import com.mints.street.BR
import com.mints.street.R
import com.mints.street.databinding.ActivityMoresettingsBinding
import com.mints.street.databinding.ActivityPermissionsBinding
class PermissionsActivity : BaseActivity<ActivityPermissionsBinding, PermissionsViewModel>() {
override fun initVariableId() = BR.viewModel
override fun initContentView(savedInstanceState: Bundle?)= R.layout.activity_permissions
override fun initData() {
super.initData()
initView()
}
private fun initView() {
}
}
\ No newline at end of file
package com.mints.street.main.my
import android.app.Application
import me.goldze.mvvmhabit.base.BaseViewModel
class PermissionsViewModel (application: Application): BaseViewModel(application) {
}
package com.mints.street.main.my
class PrivacypolicyActivity {
}
package com.mints.street.main.my
class UseragreementActivity {
}
package com.mints.street.widget;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Bitmap;
import android.graphics.BitmapShader;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.ColorFilter;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.RectF;
import android.graphics.Shader;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.util.AttributeSet;
import android.widget.ImageView;
import com.mints.street.R;
public class CircleImageView extends ImageView {
private static final ScaleType SCALE_TYPE = ScaleType.CENTER_CROP;
private static final Bitmap.Config BITMAP_CONFIG = Bitmap.Config.ARGB_8888;
private static final int COLORDRAWABLE_DIMENSION = 2;
private static final int DEFAULT_BORDER_WIDTH = 0;
private int mBorderWidth = DEFAULT_BORDER_WIDTH;
private static final int DEFAULT_BORDER_COLOR = Color.BLACK;
private int mBorderColor = DEFAULT_BORDER_COLOR;
private final RectF mDrawableRect = new RectF();
private final RectF mBorderRect = new RectF();
private final Matrix mShaderMatrix = new Matrix();
private final Paint mBitmapPaint = new Paint();
private final Paint mBorderPaint = new Paint();
private Bitmap mBitmap;
private BitmapShader mBitmapShader;
private int mBitmapWidth;
private int mBitmapHeight;
private float mDrawableRadius;
private float mBorderRadius;
private ColorFilter mColorFilter;
private boolean mReady;
private boolean mSetupPending;
public CircleImageView(Context context) {
super(context);
init();
}
public CircleImageView(Context context, AttributeSet attrs) {
this(context, attrs, 0);
}
public CircleImageView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.CircleImageView, defStyle, 0);
mBorderWidth = a.getDimensionPixelSize(R.styleable.CircleImageView_border_width, DEFAULT_BORDER_WIDTH);
mBorderColor = a.getColor(R.styleable.CircleImageView_border_color, DEFAULT_BORDER_COLOR);
a.recycle();
init();
}
private void init() {
super.setScaleType(SCALE_TYPE);
mReady = true;
if (mSetupPending) {
setup();
mSetupPending = false;
}
}
@Override
public void setAdjustViewBounds(boolean adjustViewBounds) {
if (adjustViewBounds) {
throw new IllegalArgumentException("adjustViewBounds not supported.");
}
} @Override
public ScaleType getScaleType() {
return SCALE_TYPE;
}
@Override
public void setImageResource(int resId) {
super.setImageResource(resId);
mBitmap = getBitmapFromDrawable(getDrawable());
setup();
} @Override
public void setScaleType(ScaleType scaleType) {
if (scaleType != SCALE_TYPE) {
throw new IllegalArgumentException(String.format("ScaleType %s not supported.", scaleType));
}
}
@Override
public void setImageURI(Uri uri) {
super.setImageURI(uri);
mBitmap = getBitmapFromDrawable(getDrawable());
setup();
}
@Override
public void setImageDrawable(Drawable drawable) {
super.setImageDrawable(drawable);
mBitmap = getBitmapFromDrawable(drawable);
setup();
} @Override
protected void onDraw(Canvas canvas) {
if (getDrawable() == null) {
return;
}
canvas.drawCircle(getWidth() / 2, getHeight() / 2, mDrawableRadius, mBitmapPaint);
if (mBorderWidth != 0) {
canvas.drawCircle(getWidth() / 2, getHeight() / 2, mBorderRadius, mBorderPaint);
}
}
@Override
public void setImageBitmap(Bitmap bm) {
super.setImageBitmap(bm);
mBitmap = bm;
setup();
}
@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
super.onSizeChanged(w, h, oldw, oldh);
setup();
}
public int getBorderColor() {
return mBorderColor;
}
public void setBorderColor(int borderColor) {
if (borderColor == mBorderColor) {
return;
}
mBorderColor = borderColor;
mBorderPaint.setColor(mBorderColor);
invalidate();
}
public int getBorderWidth() {
return mBorderWidth;
}
public void setBorderWidth(int borderWidth) {
if (borderWidth == mBorderWidth) {
return;
}
mBorderWidth = borderWidth;
setup();
}
private Bitmap getBitmapFromDrawable(Drawable drawable) {
if (drawable == null) {
return null;
}
if (drawable instanceof BitmapDrawable) {
return ((BitmapDrawable) drawable).getBitmap();
}
try {
Bitmap bitmap;
if (drawable instanceof ColorDrawable) {
bitmap = Bitmap.createBitmap(COLORDRAWABLE_DIMENSION, COLORDRAWABLE_DIMENSION, BITMAP_CONFIG);
} else {
bitmap = Bitmap.createBitmap(drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight(), BITMAP_CONFIG);
}
Canvas canvas = new Canvas(bitmap);
drawable.setBounds(0, 0, canvas.getWidth(), canvas.getHeight());
drawable.draw(canvas);
return bitmap;
} catch (OutOfMemoryError e) {
return null;
}
}
private void setup() {
if (!mReady) {
mSetupPending = true;
return;
}
if (mBitmap == null) {
return;
}
mBitmapShader = new BitmapShader(mBitmap, Shader.TileMode.CLAMP, Shader.TileMode.CLAMP);
mBitmapPaint.setAntiAlias(true);
mBitmapPaint.setShader(mBitmapShader);
mBorderPaint.setStyle(Paint.Style.STROKE);
mBorderPaint.setAntiAlias(true);
mBorderPaint.setColor(mBorderColor);
mBorderPaint.setStrokeWidth(mBorderWidth);
mBitmapHeight = mBitmap.getHeight();
mBitmapWidth = mBitmap.getWidth();
mBorderRect.set(0, 0, getWidth(), getHeight());
mBorderRadius = Math.min((mBorderRect.height() - mBorderWidth) / 2, (mBorderRect.width() - mBorderWidth) / 2);
mDrawableRect.set(mBorderWidth, mBorderWidth, mBorderRect.width() - mBorderWidth, mBorderRect.height() - mBorderWidth);
mDrawableRadius = Math.min(mDrawableRect.height() / 2, mDrawableRect.width() / 2);
updateShaderMatrix();
invalidate();
}
private void updateShaderMatrix() {
float scale;
float dx = 0;
float dy = 0;
mShaderMatrix.set(null);
if (mBitmapWidth * mDrawableRect.height() > mDrawableRect.width() * mBitmapHeight) {
scale = mDrawableRect.height() / (float) mBitmapHeight;
dx = (mDrawableRect.width() - mBitmapWidth * scale) * 0.5f;
} else {
scale = mDrawableRect.width() / (float) mBitmapWidth;
dy = (mDrawableRect.height() - mBitmapHeight * scale) * 0.5f;
}
mShaderMatrix.setScale(scale, scale);
mShaderMatrix.postTranslate((int) (dx + 0.5f) + mBorderWidth, (int) (dy + 0.5f) + mBorderWidth);
mBitmapShader.setLocalMatrix(mShaderMatrix);
}
@Override
public void setColorFilter(ColorFilter cf) {
if (cf == mColorFilter) {
return;
}
mColorFilter = cf;
mBitmapPaint.setColorFilter(mColorFilter);
invalidate();
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#2196F3" />
<corners android:radius="21dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<!-- 边框的颜色和粗细 -->
<stroke
android:width="1dp"
android:color="#74000000"
/>
<solid android:color="#ffffffff" />
<corners android:radius="21dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<!-- android:radius 圆角的半径 -->
<corners
android:topLeftRadius="10dp"
android:topRightRadius="10dp"
android:bottomRightRadius="0dp"
android:bottomLeftRadius="0dp" />
<!-- 填充的颜色 -->
<solid android:color="@color/black" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<!-- 边框的颜色和粗细 -->
<stroke
android:width="1dp"
android:color="@color/blue"
/>
<solid android:color="#ffffffff" />
<corners android:radius="10dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<FrameLayout
android:id="@+id/splash_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:src="@drawable/bg_splash"
/>
<data>
......@@ -15,4 +8,55 @@
name="ViewModel"
type="com.mints.street.main.my.AboutusViewModel" />
</data>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<include
android:id="@+id/header"
layout="@layout/header_layout" />
<TextView
android:layout_below="@+id/header"
android:paddingTop="30dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="世界街景3D地图"
android:textColor="@color/black"
android:layout_centerInParent="true"/>
<ImageView
android:id="@+id/iv_app"
android:layout_width="120dp"
android:layout_height="120dp"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="65dp"
android:src="@mipmap/ic_avatar_ph" />
<LinearLayout
android:layout_centerHorizontal="true"
android:id="@+id/ly_text"
android:paddingTop="10dp"
android:layout_alignParentBottom="true"
android:layout_marginBottom="25dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_user"
android:layout_marginRight="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/black"
android:text="《用户协议》"/>
<TextView
android:id="@+id/tv_privacy"
android:layout_marginLeft="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/black"
android:text="《隐私政策》"/>
</LinearLayout>
</RelativeLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<FrameLayout
android:id="@+id/splash_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:src="@drawable/bg_splash"
/>
<data>
<variable
name="ViewModel"
type="com.mints.street.main.my.MoresettingsViewModel" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_marginTop="19dp"
android:layout_marginEnd="15dp"
android:background="@drawable/shape_gold_card"
android:elevation="5dp"
android:orientation="vertical">
<include layout="@layout/header_layout" />
<LinearLayout
android:id="@+id/ly_aboutus"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="10dp"
android:orientation="horizontal"
android:padding="10dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_weight="1"
android:text="用户协议"
android:textColor="@color/black"
android:textSize="18sp" />
<ImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_alignParentEnd="true"
android:src="@mipmap/bg_right" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:background="#979797" />
<LinearLayout
android:id="@+id/ly_moresettings"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="horizontal"
android:padding="10dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_weight="1"
android:text="隐私政策"
android:textColor="@color/black"
android:textSize="18sp" />
<ImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_alignParentEnd="true"
android:src="@mipmap/bg_right" />
</LinearLayout>
</LinearLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<data>
<variable
name="ViewModel"
type="com.mints.street.main.my.PermissionsViewModel" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="25dp"
android:text="世界街景3D地图"
android:textColor="@color/black"
android:textSizes="25dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="10dp"
android:layout_marginBottom="10pt"
android:text="为了提供一下服务"
android:textColor="#CD000000" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="110dp"
android:layout_margin="10dp"
android:background="@drawable/shape_gold_blue">
<ImageView
android:id="@+id/iv1"
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_centerVertical="true"
android:layout_marginLeft="10dp"
android:background="@color/black" />
<TextView
android:id="@+id/tv1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="@+id/iv1"
android:layout_toRightOf="@id/iv1"
android:text="提供精准定位及导航服务"
android:textColor="@color/black"
android:textSizes="18sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/iv1"
android:layout_toRightOf="@+id/iv1"
android:text="基于您当前位置...." />
<com.github.iielse.switchbutton.SwitchView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_marginRight="10dp" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="110dp"
android:layout_margin="10dp"
android:background="@drawable/shape_gold_blue">
<ImageView
android:id="@+id/iv2"
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_centerVertical="true"
android:layout_marginLeft="10dp"
android:background="@color/black" />
<TextView
android:id="@+id/tv2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="@+id/iv2"
android:layout_toRightOf="@id/iv2"
android:text="提供精准定位及导航服务"
android:textColor="@color/black"
android:textSizes="18sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/iv2"
android:layout_toRightOf="@+id/iv2"
android:text="基于您当前位置...." />
<com.github.iielse.switchbutton.SwitchView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_marginRight="10dp" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="110dp"
android:layout_margin="10dp"
android:background="@drawable/shape_gold_blue">
<ImageView
android:id="@+id/iv3"
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_centerVertical="true"
android:layout_marginLeft="10dp"
android:background="@color/black" />
<TextView
android:id="@+id/tv3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="@+id/iv3"
android:layout_toRightOf="@id/iv3"
android:text="提供精准定位及导航服务"
android:textColor="@color/black"
android:textSizes="18sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/iv3"
android:layout_toRightOf="@+id/iv3"
android:text="基于您当前位置...." />
<com.github.iielse.switchbutton.SwitchView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_marginRight="10dp" />
</RelativeLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="20pt"
android:orientation="horizontal">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="10dp"
android:background="@drawable/shape_bt_disagree"
android:paddingLeft="20pt"
android:paddingRight="20pt"
android:text="我不同意"
android:textColor="#43000000" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:background="@drawable/shape_bt_agree"
android:paddingLeft="20pt"
android:paddingRight="20pt"
android:text="同意并开始授权"
android:textColor="@color/white" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
/>
<LinearLayout
android:layout_gravity="center_horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="链接网络后可查看并同意完整的"
android:textColor="@color/black" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="《隐私协议》"
android:textColor="@color/black" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="《用户协议》"
android:textColor="@color/black" />
</LinearLayout>
</LinearLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<data>
<variable
name="ViewModel"
type="com.mints.street.main.my.MyViewModel" />
......@@ -15,7 +15,303 @@
android:layout_height="wrap_content"
android:orientation="vertical">
<include layout="@layout/item_fragment_main_my_title" />
<LinearLayout
android:id="@+id/ll_my_login"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_marginTop="15dp"
android:orientation="horizontal"
android:layout_marginBottom="15dp">
<com.mints.street.widget.CircleImageView
android:id="@+id/item_title_avatar"
android:layout_width="60dp"
android:layout_height="60dp"
android:src="@mipmap/ic_avatar_ph"/>
<TextView
android:id="@+id/item_title_id"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:ellipsize="end"
android:maxLength="10"
android:layout_gravity="center"
android:maxLines="1"
android:text="未登录"
android:textColor="@color/black"
android:textSize="20sp"
android:textStyle="bold"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_marginEnd="15dp"
android:background="@drawable/shape_gold_card"
android:elevation="5dp"
android:orientation="vertical">
<RelativeLayout
android:background="@drawable/shape_gold"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:paddingStart="10pt"
android:paddingEnd="10dp">
<ImageView
android:id="@+id/iv_flag"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_alignParentStart="true"
android:layout_centerVertical="true"
android:background="@color/blue" />
<TextView
android:id="@+id/tv_tips"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toRightOf="@id/iv_flag"
android:text="恭喜你被全球会员卡砸中~"
android:textColor="@color/white" />
<Button
android:id="@+id/bt_try"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_gravity="center_vertical"
android:layout_marginEnd="8dp"
android:background="@drawable/btn_friends_selectored"
android:text="立即领取"
android:textColor="@color/black"
android:textSize="10sp" />
</RelativeLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal">
<ImageView
android:id="@+id/imageView5"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_marginStart="28dp"
android:background="@color/blue"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/imageView4"
tools:srcCompat="@tools:sample/avatars" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="无线缩放"
android:textSize="10sp"
app:layout_constraintEnd_toEndOf="@+id/imageView5"
app:layout_constraintStart_toStartOf="@+id/imageView5"
app:layout_constraintTop_toBottomOf="@+id/imageView5" />
<ImageView
android:id="@+id/imageView4"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_marginStart="40dp"
android:layout_marginTop="20dp"
android:background="@color/blue"
app:layout_constraintStart_toEndOf="@+id/imageView5"
app:layout_constraintTop_toBottomOf="@+id/imageView16"
tools:srcCompat="@tools:sample/avatars" />
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="国内外街景"
android:textSize="10sp"
app:layout_constraintEnd_toEndOf="@+id/imageView4"
app:layout_constraintStart_toStartOf="@+id/imageView4"
app:layout_constraintTop_toBottomOf="@+id/imageView4" />
<ImageView
android:id="@+id/imageView6"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_marginStart="40dp"
android:background="@color/blue"
app:layout_constraintStart_toEndOf="@+id/imageView4"
app:layout_constraintTop_toTopOf="@+id/imageView4"
tools:srcCompat="@tools:sample/avatars" />
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="VR全景"
android:textSize="10sp"
app:layout_constraintEnd_toEndOf="@+id/imageView6"
app:layout_constraintStart_toStartOf="@+id/imageView6"
app:layout_constraintTop_toBottomOf="@+id/imageView6" />
<ImageView
android:id="@+id/imageView7"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_marginStart="40dp"
android:background="@color/blue"
app:layout_constraintStart_toEndOf="@+id/imageView6"
app:layout_constraintTop_toTopOf="@+id/imageView6"
tools:srcCompat="@tools:sample/avatars" />
<TextView
android:id="@+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="3D地图"
android:textSize="10sp"
app:layout_constraintEnd_toEndOf="@+id/imageView7"
app:layout_constraintStart_toStartOf="@+id/imageView7"
app:layout_constraintTop_toBottomOf="@+id/imageView7" />
<ImageView
android:id="@+id/imageView12"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_marginTop="20dp"
android:background="@color/blue"
app:layout_constraintEnd_toEndOf="@+id/imageView5"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toStartOf="@+id/imageView5"
app:layout_constraintTop_toBottomOf="@+id/textView2"
tools:srcCompat="@tools:sample/avatars" />
<TextView
android:id="@+id/textView9"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="国外搜索"
android:textSize="10sp"
app:layout_constraintEnd_toEndOf="@+id/imageView12"
app:layout_constraintStart_toStartOf="@+id/imageView12"
app:layout_constraintTop_toBottomOf="@+id/imageView12" />
<ImageView
android:id="@+id/imageView13"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_marginTop="20dp"
android:background="@color/blue"
app:layout_constraintEnd_toEndOf="@+id/imageView4"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="@+id/imageView4"
app:layout_constraintTop_toBottomOf="@+id/textView"
tools:srcCompat="@tools:sample/avatars" />
<ImageView
android:id="@+id/imageView14"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_marginTop="20dp"
android:background="@color/blue"
app:layout_constraintEnd_toEndOf="@+id/imageView6"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="@+id/imageView6"
app:layout_constraintTop_toBottomOf="@+id/textView3"
tools:srcCompat="@tools:sample/avatars" />
<TextView
android:id="@+id/textView10"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="高清地图"
android:textSize="10sp"
app:layout_constraintEnd_toEndOf="@+id/imageView13"
app:layout_constraintStart_toStartOf="@+id/imageView13"
app:layout_constraintTop_toBottomOf="@+id/imageView13" />
<TextView
android:id="@+id/textView11"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="历史影像"
android:textSize="10sp"
app:layout_constraintEnd_toEndOf="@+id/imageView14"
app:layout_constraintStart_toStartOf="@+id/imageView14"
app:layout_constraintTop_toBottomOf="@+id/imageView14" />
<ImageView
android:id="@+id/imageView15"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_marginTop="20dp"
android:background="@color/blue"
app:layout_constraintEnd_toEndOf="@+id/imageView7"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="@+id/imageView7"
app:layout_constraintTop_toBottomOf="@+id/textView4"
tools:srcCompat="@tools:sample/avatars" />
<TextView
android:id="@+id/textView12"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="景点推荐"
android:textSize="10sp"
app:layout_constraintEnd_toEndOf="@+id/imageView15"
app:layout_constraintStart_toStartOf="@+id/imageView15"
app:layout_constraintTop_toBottomOf="@+id/imageView15" />
<ImageView
android:id="@+id/imageView16"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_marginTop="20dp"
android:background="@color/blue"
app:layout_constraintStart_toEndOf="@+id/imageView5"
app:layout_constraintTop_toTopOf="parent"
tools:srcCompat="@tools:sample/avatars" />
<ImageView
android:id="@+id/imageView18"
android:layout_width="20dp"
android:layout_height="20dp"
android:background="@color/blue"
app:layout_constraintEnd_toStartOf="@+id/imageView7"
app:layout_constraintTop_toTopOf="@+id/imageView16"
tools:srcCompat="@tools:sample/avatars" />
<TextView
android:id="@+id/textView13"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginEnd="10dp"
android:text="享受8大特权"
android:textSize="10sp"
app:layout_constraintBottom_toBottomOf="@+id/imageView18"
app:layout_constraintEnd_toStartOf="@+id/imageView18"
app:layout_constraintStart_toEndOf="@+id/imageView16"
app:layout_constraintTop_toTopOf="@+id/imageView18" />
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
......@@ -24,27 +320,28 @@
android:layout_marginTop="19dp"
android:layout_marginEnd="15dp"
android:background="@drawable/shape_gold_card"
android:elevation="10dp"
android:elevation="5dp"
android:orientation="vertical">
<LinearLayout
android:id="@+id/ly_aboutus"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="horizontal"
android:padding="10dp">
<ImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_alignParentLeft="true"
android:layout_marginStart="15dp"
android:layout_marginTop="20dp"
android:src="@mipmap/iv_about_us" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginTop="18dp"
android:layout_weight="1"
android:text="关于我们"
android:textColor="@color/black"
......@@ -54,40 +351,35 @@
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_alignParentEnd="true"
android:layout_marginTop="20dp"
android:layout_marginEnd="11dp"
android:src="@mipmap/bg_right" />
</LinearLayout>
<View
android:layout_width="328pt"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginStart="13dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="14dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:background="#979797" />
<LinearLayout
android:id="@+id/ly_moresettings"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="horizontal"
android:padding="10dp">
<ImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_alignParentLeft="true"
android:layout_marginStart="15dp"
android:layout_marginTop="20dp"
android:src="@mipmap/iv_more_settings" />
<TextView
android:id="@+id/tv1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginTop="18dp"
android:layout_weight="1"
android:text="更多设置"
android:textColor="@color/black"
......@@ -97,11 +389,9 @@
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_alignParentEnd="true"
android:layout_marginTop="20dp"
android:layout_marginEnd="11dp"
android:layout_marginBottom="20dp"
android:src="@mipmap/bg_right" />
</LinearLayout>
</LinearLayout>
......
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/ll_my_login"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_marginTop="15dp"
android:layout_marginBottom="15dp">
<ImageView
android:id="@+id/item_title_avatar"
android:layout_width="60dp"
android:layout_height="60dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/item_title_id"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:ellipsize="end"
android:maxLength="10"
android:maxLines="1"
android:text="未登录"
android:textColor="@color/black"
android:textSize="20sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@+id/item_title_avatar"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_marginTop="19dp"
android:layout_marginEnd="15dp"
android:background="@drawable/shape_gold_card"
android:elevation="10dp"
android:orientation="vertical">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="20pt"
android:background="@color/black">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="恭喜你被全球会员卡砸中~"
android:textColor="@color/white" />
<Button
android:layout_width="30pt"
android:layout_height="30dp"
android:layout_gravity="end|center"
android:layout_marginRight="10dp"
android:background="@color/yellow"
android:text="立即领取"
android:textColor="@color/black" />
</FrameLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:orientation="horizontal">
<ImageView
android:id="@+id/imageView5"
android:layout_width="50dp"
android:layout_height="50dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/imageView4"
tools:srcCompat="@tools:sample/avatars" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="无线缩放"
app:layout_constraintEnd_toEndOf="@+id/imageView5"
app:layout_constraintStart_toStartOf="@+id/imageView5"
app:layout_constraintTop_toBottomOf="@+id/imageView5" />
<ImageView
android:id="@+id/imageView4"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_marginStart="40dp"
android:layout_marginTop="20dp"
app:layout_constraintStart_toEndOf="@+id/imageView5"
app:layout_constraintTop_toBottomOf="@+id/imageView16"
tools:srcCompat="@tools:sample/avatars" />
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="国内外街景"
app:layout_constraintEnd_toEndOf="@+id/imageView4"
app:layout_constraintStart_toStartOf="@+id/imageView4"
app:layout_constraintTop_toBottomOf="@+id/imageView4" />
<ImageView
android:id="@+id/imageView6"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_marginStart="40dp"
app:layout_constraintStart_toEndOf="@+id/imageView4"
app:layout_constraintTop_toTopOf="@+id/imageView4"
tools:srcCompat="@tools:sample/avatars" />
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="VR全景"
app:layout_constraintEnd_toEndOf="@+id/imageView6"
app:layout_constraintStart_toStartOf="@+id/imageView6"
app:layout_constraintTop_toBottomOf="@+id/imageView6" />
<ImageView
android:id="@+id/imageView7"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_marginStart="40dp"
app:layout_constraintStart_toEndOf="@+id/imageView6"
app:layout_constraintTop_toTopOf="@+id/imageView6"
tools:srcCompat="@tools:sample/avatars" />
<TextView
android:id="@+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="3D地图"
app:layout_constraintEnd_toEndOf="@+id/imageView7"
app:layout_constraintStart_toStartOf="@+id/imageView7"
app:layout_constraintTop_toBottomOf="@+id/imageView7" />
<ImageView
android:id="@+id/imageView12"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_marginTop="20dp"
app:layout_constraintEnd_toEndOf="@+id/imageView5"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toStartOf="@+id/imageView5"
app:layout_constraintTop_toBottomOf="@+id/textView2"
tools:srcCompat="@tools:sample/avatars" />
<TextView
android:id="@+id/textView9"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="国外搜索"
app:layout_constraintEnd_toEndOf="@+id/imageView12"
app:layout_constraintStart_toStartOf="@+id/imageView12"
app:layout_constraintTop_toBottomOf="@+id/imageView12" />
<ImageView
android:id="@+id/imageView13"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_marginTop="20dp"
app:layout_constraintEnd_toEndOf="@+id/imageView4"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="@+id/imageView4"
app:layout_constraintTop_toBottomOf="@+id/textView"
tools:srcCompat="@tools:sample/avatars" />
<ImageView
android:id="@+id/imageView14"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_marginTop="20dp"
app:layout_constraintEnd_toEndOf="@+id/imageView6"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="@+id/imageView6"
app:layout_constraintTop_toBottomOf="@+id/textView3"
tools:srcCompat="@tools:sample/avatars" />
<TextView
android:id="@+id/textView10"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="高清地图"
app:layout_constraintEnd_toEndOf="@+id/imageView13"
app:layout_constraintStart_toStartOf="@+id/imageView13"
app:layout_constraintTop_toBottomOf="@+id/imageView13" />
<TextView
android:id="@+id/textView11"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="历史影像"
app:layout_constraintEnd_toEndOf="@+id/imageView14"
app:layout_constraintStart_toStartOf="@+id/imageView14"
app:layout_constraintTop_toBottomOf="@+id/imageView14" />
<ImageView
android:id="@+id/imageView15"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_marginTop="20dp"
app:layout_constraintEnd_toEndOf="@+id/imageView7"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="@+id/imageView7"
app:layout_constraintTop_toBottomOf="@+id/textView4"
tools:srcCompat="@tools:sample/avatars" />
<TextView
android:id="@+id/textView12"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="景点推荐"
app:layout_constraintEnd_toEndOf="@+id/imageView15"
app:layout_constraintStart_toStartOf="@+id/imageView15"
app:layout_constraintTop_toBottomOf="@+id/imageView15" />
<ImageView
android:id="@+id/imageView16"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_marginTop="20dp"
app:layout_constraintStart_toEndOf="@+id/imageView5"
app:layout_constraintTop_toTopOf="parent"
tools:srcCompat="@tools:sample/avatars" />
<ImageView
android:id="@+id/imageView18"
android:layout_width="50dp"
android:layout_height="50dp"
app:layout_constraintEnd_toStartOf="@+id/imageView7"
app:layout_constraintTop_toTopOf="@+id/imageView16"
tools:srcCompat="@tools:sample/avatars" />
<TextView
android:id="@+id/textView13"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginEnd="10dp"
android:text="享受8大特权"
app:layout_constraintBottom_toBottomOf="@+id/imageView18"
app:layout_constraintEnd_toStartOf="@+id/imageView18"
app:layout_constraintStart_toEndOf="@+id/imageView16"
app:layout_constraintTop_toTopOf="@+id/imageView18" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.appcompat.widget.LinearLayoutCompat>
</merge>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name="CircleImageView">
<attr name="border_width" format="dimension" />
<attr name="border_color" format="color" />
</declare-styleable>
</resources>
\ No newline at end of file
#Fri Jul 09 14:43:55 CST 2021
VERSION_BUILD=2655
#Fri Jul 09 19:28:15 CST 2021
VERSION_BUILD=2687
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