修改首页UI

This commit is contained in:
Martin 2024-09-10 15:04:44 +08:00
parent b9503b91f5
commit 98a0009019
254 changed files with 77 additions and 370 deletions

View File

@ -1,6 +1,5 @@
package com.yunbao.main.dialog;
import static com.yunbao.common.utils.RouteUtil.PATH_REWARD;
import android.annotation.SuppressLint;
import android.content.DialogInterface;
@ -9,18 +8,14 @@ import android.view.Gravity;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.TextView;
import com.alibaba.android.arouter.launcher.ARouter;
import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.dialog.AbsDialogFragment;
import com.yunbao.common.utils.DpUtil;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.main.R;
public class SigninDialog extends AbsDialogFragment {
TextView gold, sign_day;
TextView gold;
private DialogInterface.OnDismissListener onDismissListener;
@Override
@ -47,9 +42,9 @@ public class SigninDialog extends AbsDialogFragment {
protected void setWindowAttributes(Window window) {
window.setWindowAnimations(com.yunbao.live.R.style.bottomToTopAnim);
WindowManager.LayoutParams params = window.getAttributes();
params.width = WindowManager.LayoutParams.MATCH_PARENT;
params.height = DpUtil.dp2px(400);
params.gravity = Gravity.BOTTOM;
params.width = WindowManager.LayoutParams.WRAP_CONTENT;
params.height = DpUtil.dp2px(375);
params.gravity = Gravity.CENTER_VERTICAL;
window.setAttributes(params);
}
@ -58,33 +53,17 @@ public class SigninDialog extends AbsDialogFragment {
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
gold = (TextView) findViewById(R.id.gold);
sign_day = (TextView) findViewById(R.id.sign_day);
Button goto_sign = (Button) findViewById(R.id.goto_sign);
Button confirm = (Button) findViewById(R.id.confirm);
goto_sign.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
ARouter.getInstance().build(PATH_REWARD).withString("url", CommonAppConfig.HOST + "/index.php?g=Appapi&m=task&a=index" + "&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&isZh=" + (WordUtil.isNewZh() ? "1" : "0")).navigation();
dismiss();
}
});
confirm.setOnClickListener(new View.OnClickListener() {
findViewById(R.id.confirm).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
dismiss();
}
});
Bundle bundle = getArguments();
if (bundle == null) {
return;
}
gold.setText(bundle.getString("send_gold") + "金豆+" + bundle.getString("send_exp") + "EXP");
sign_day.setText(String.format(getString(R.string.this_month), bundle.getString("sign_day")));
}
@Override

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<corners android:radius="25dp" />
<solid android:color="#FFFF4598" />
</shape>
</item>
</selector>

View File

@ -1,87 +1,56 @@
<?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="match_parent"
android:layout_height="375dp"
android:layout_marginStart="45dp"
android:layout_marginEnd="45dp"
android:background="@mipmap/successfully">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:gravity="center"
android:layout_width="match_parent"
android:layout_height="375dp"
android:gravity="center_horizontal"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:layout_marginTop="170dp"
android:text="簽到成功"
android:textColor="#FF000000"
android:textSize="24sp"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:text="@string/getting_it"
android:textColor="#ffc4c6ca"
android:textSize="15sp" />
<pl.droidsonroids.gif.GifImageView
android:id="@+id/btn_live"
android:layout_width="150dp"
android:layout_height="150dp"
android:layout_alignParentBottom="true"
android:adjustViewBounds="true"
android:src="@mipmap/jindou" />
android:textColor="#FF333333"
android:textSize="13sp" />
<TextView
android:id="@+id/gold"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="200 金豆 + 2000 EXP"
android:textColor="#ffffbe41"
android:textSize="20sp" />
<TextView
android:id="@+id/sign_day"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:text="@string/this_month"
android:textColor="#ffc4c6ca"
android:textSize="12sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:text="@string/more_day_to"
android:textColor="#ffc4c6ca"
android:textSize="12sp" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="horizontal">
android:text="200 金豆 + 2000 EXP"
android:textColor="#FFFF2D73"
android:textSize="14sp"
android:textStyle="bold" />
<Button
android:id="@+id/goto_sign"
android:layout_width="130dp"
android:layout_height="38dp"
android:layout_marginRight="10dp"
android:background="@mipmap/btn_goto"
android:text="@string/go_to_the_sign"
android:textColor="#C9CACE"
android:textSize="9sp" />
<TextView
android:id="@+id/confirm"
android:layout_width="match_parent"
android:layout_height="45dp"
android:layout_marginStart="50dp"
android:layout_marginTop="30dp"
android:layout_marginEnd="50dp"
android:background="@drawable/sign_submit"
android:gravity="center"
android:text="@string/confirm_pick_up"
android:textColor="#fff"
android:textSize="14sp" />
<Button
android:id="@+id/confirm"
android:layout_width="130dp"
android:layout_height="38dp"
android:layout_marginLeft="10dp"
android:textColor="#fff"
android:textSize="9sp"
android:text="@string/confirm_pick_up"
android:background="@mipmap/btn_signin" />
</LinearLayout>
</LinearLayout>
</RelativeLayout>

View File

@ -15,20 +15,20 @@
<RelativeLayout
android:id="@+id/rt_main_tab"
android:layout_width="match_parent"
android:layout_height="71dp"
android:background="@color/white"
android:layout_height="65dp"
android:layout_alignParentBottom="true">
<ImageView
android:id="@+id/img_main_bg_tab"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentBottom="true"
android:background="@mipmap/home_bar_bg" />
android:layout_alignParentBottom="true" />
<RelativeLayout
android:id="@+id/bottom"
android:layout_width="match_parent"
android:layout_height="45dp"
android:layout_height="60dp"
android:layout_alignParentBottom="true">
<com.yunbao.common.custom.TabButtonGroup
@ -44,19 +44,20 @@
app:tbn_checked="true"
app:tbn_icon_array_id="@array/main_tab_home"
app:tbn_icon_size="28dp"
app:tbn_text_color_checked="@color/colorAccent"
app:tbn_text_color_unchecked="@color/gray1"
app:tbn_tip="遇見"
app:tbn_text_color_checked="#FFFF4598"
app:tbn_text_color_unchecked="#FF101420"
app:tbn_text_size="11sp" />
<com.yunbao.common.custom.TabButton
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginRight="60dp"
android:layout_weight="1"
app:tbn_icon_array_id="@array/main_tab_video"
app:tbn_icon_size="28dp"
app:tbn_text_color_checked="@color/colorAccent"
app:tbn_text_color_unchecked="@color/gray1"
app:tbn_tip="娛樂"
app:tbn_text_color_checked="#FFFF4598"
app:tbn_text_color_unchecked="#FF101420"
app:tbn_text_size="11sp" />
<com.yunbao.common.custom.TabButton
@ -65,8 +66,9 @@
android:layout_weight="1"
app:tbn_icon_array_id="@array/main_tab_list"
app:tbn_icon_size="28dp"
app:tbn_text_color_checked="@color/colorAccent"
app:tbn_text_color_unchecked="@color/gray1"
app:tbn_tip="廣場"
app:tbn_text_color_checked="#FFFF4598"
app:tbn_text_color_unchecked="#FF101420"
app:tbn_text_size="11sp" />
<com.yunbao.common.custom.TabButton
@ -75,8 +77,9 @@
android:layout_weight="1"
app:tbn_icon_array_id="@array/main_tab_chat"
app:tbn_icon_size="28dp"
app:tbn_text_color_checked="@color/colorAccent"
app:tbn_text_color_unchecked="@color/gray1"
app:tbn_tip="我的"
app:tbn_text_color_checked="#FFFF4598"
app:tbn_text_color_unchecked="#FF101420"
app:tbn_text_size="11sp" />
</com.yunbao.common.custom.TabButtonGroup>
@ -137,16 +140,8 @@
</RelativeLayout>
<ImageView
android:id="@+id/btn_start"
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_centerInParent="true"
android:onClick="mainClick"
android:src="@mipmap/icon_main_start" />
</RelativeLayout>
<com.yunbao.main.views.FloatBannerView
android:id="@+id/float_banner_home"
android:layout_width="wrap_content"
@ -179,8 +174,8 @@
android:layout_above="@id/rt_main_tab"
android:layout_alignParentRight="true"
android:layout_marginRight="12dp"
android:visibility="gone"
android:layout_marginBottom="10dp" />
android:layout_marginBottom="10dp"
android:visibility="gone" />
<include
android:id="@+id/war_order"
@ -189,8 +184,7 @@
android:layout_height="wrap_content"
android:layout_above="@id/rt_main_tab"
android:layout_alignParentRight="true"
android:layout_marginRight="25dp"
/>
android:layout_marginRight="25dp" />
<LinearLayout
android:layout_width="match_parent"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1009 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 993 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 970 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 951 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 908 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 875 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 859 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 804 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 760 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 719 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 689 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 642 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 587 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 521 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 477 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 458 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 369 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 336 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 269 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 227 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 99 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 181 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 294 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 371 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 467 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 568 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 612 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 643 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 743 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 833 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 898 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 893 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 979 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 665 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 681 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 647 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 636 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 600 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 568 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 576 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 568 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 524 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 531 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 522 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 516 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 510 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 475 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 429 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 415 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 418 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 391 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 369 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 286 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 336 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 129 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 261 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 384 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 480 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 591 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 681 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 536 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 646 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 714 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 737 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 658 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 843 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 921 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1020 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Some files were not shown because too many files have changed in this diff Show More