修改首页导航栏,签到成功UI
@ -1,6 +1,5 @@
|
|||||||
package com.yunbao.main.dialog;
|
package com.yunbao.main.dialog;
|
||||||
|
|
||||||
import static com.yunbao.common.utils.RouteUtil.PATH_REWARD;
|
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
@ -9,18 +8,14 @@ import android.view.Gravity;
|
|||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.Window;
|
import android.view.Window;
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
import android.widget.Button;
|
|
||||||
import android.widget.TextView;
|
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.dialog.AbsDialogFragment;
|
||||||
import com.yunbao.common.utils.DpUtil;
|
import com.yunbao.common.utils.DpUtil;
|
||||||
import com.yunbao.common.utils.WordUtil;
|
|
||||||
import com.yunbao.main.R;
|
import com.yunbao.main.R;
|
||||||
|
|
||||||
public class SigninDialog extends AbsDialogFragment {
|
public class SigninDialog extends AbsDialogFragment {
|
||||||
TextView gold, sign_day;
|
TextView gold;
|
||||||
private DialogInterface.OnDismissListener onDismissListener;
|
private DialogInterface.OnDismissListener onDismissListener;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -47,9 +42,9 @@ public class SigninDialog extends AbsDialogFragment {
|
|||||||
protected void setWindowAttributes(Window window) {
|
protected void setWindowAttributes(Window window) {
|
||||||
window.setWindowAnimations(com.yunbao.live.R.style.bottomToTopAnim);
|
window.setWindowAnimations(com.yunbao.live.R.style.bottomToTopAnim);
|
||||||
WindowManager.LayoutParams params = window.getAttributes();
|
WindowManager.LayoutParams params = window.getAttributes();
|
||||||
params.width = WindowManager.LayoutParams.MATCH_PARENT;
|
params.width = WindowManager.LayoutParams.WRAP_CONTENT;
|
||||||
params.height = DpUtil.dp2px(400);
|
params.height = DpUtil.dp2px(375);
|
||||||
params.gravity = Gravity.BOTTOM;
|
params.gravity = Gravity.CENTER_VERTICAL;
|
||||||
window.setAttributes(params);
|
window.setAttributes(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -58,33 +53,17 @@ public class SigninDialog extends AbsDialogFragment {
|
|||||||
public void onActivityCreated(Bundle savedInstanceState) {
|
public void onActivityCreated(Bundle savedInstanceState) {
|
||||||
super.onActivityCreated(savedInstanceState);
|
super.onActivityCreated(savedInstanceState);
|
||||||
gold = (TextView) findViewById(R.id.gold);
|
gold = (TextView) findViewById(R.id.gold);
|
||||||
sign_day = (TextView) findViewById(R.id.sign_day);
|
findViewById(R.id.confirm).setOnClickListener(new View.OnClickListener() {
|
||||||
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() {
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
dismiss();
|
dismiss();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Bundle bundle = getArguments();
|
Bundle bundle = getArguments();
|
||||||
if (bundle == null) {
|
if (bundle == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gold.setText(bundle.getString("send_gold") + "金豆+" + bundle.getString("send_exp") + "EXP");
|
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
|
@Override
|
||||||
|
9
main/src/main/res/drawable/sign_submit.xml
Normal 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>
|
@ -1,87 +1,56 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
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">
|
android:background="@mipmap/successfully">
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="375dp"
|
||||||
android:layout_centerInParent="true"
|
android:gravity="center_horizontal"
|
||||||
android:gravity="center"
|
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="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:text="@string/getting_it"
|
||||||
android:textColor="#ffc4c6ca"
|
android:textColor="#FF333333"
|
||||||
android:textSize="15sp" />
|
android:textSize="13sp" />
|
||||||
|
|
||||||
<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" />
|
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/gold"
|
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_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
android:orientation="horizontal">
|
android:text="200 金豆 + 2000 EXP"
|
||||||
|
android:textColor="#FFFF2D73"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
<Button
|
<TextView
|
||||||
android:id="@+id/goto_sign"
|
android:id="@+id/confirm"
|
||||||
android:layout_width="130dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="38dp"
|
android:layout_height="45dp"
|
||||||
android:layout_marginRight="10dp"
|
android:layout_marginStart="50dp"
|
||||||
android:background="@mipmap/btn_goto"
|
android:layout_marginTop="30dp"
|
||||||
android:text="@string/go_to_the_sign"
|
android:layout_marginEnd="50dp"
|
||||||
android:textColor="#C9CACE"
|
android:background="@drawable/sign_submit"
|
||||||
android:textSize="9sp" />
|
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>
|
</LinearLayout>
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
@ -15,20 +15,20 @@
|
|||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/rt_main_tab"
|
android:id="@+id/rt_main_tab"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="71dp"
|
android:background="@color/white"
|
||||||
|
android:layout_height="65dp"
|
||||||
android:layout_alignParentBottom="true">
|
android:layout_alignParentBottom="true">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/img_main_bg_tab"
|
android:id="@+id/img_main_bg_tab"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true" />
|
||||||
android:background="@mipmap/home_bar_bg" />
|
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/bottom"
|
android:id="@+id/bottom"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="45dp"
|
android:layout_height="60dp"
|
||||||
android:layout_alignParentBottom="true">
|
android:layout_alignParentBottom="true">
|
||||||
|
|
||||||
<com.yunbao.common.custom.TabButtonGroup
|
<com.yunbao.common.custom.TabButtonGroup
|
||||||
@ -44,19 +44,20 @@
|
|||||||
app:tbn_checked="true"
|
app:tbn_checked="true"
|
||||||
app:tbn_icon_array_id="@array/main_tab_home"
|
app:tbn_icon_array_id="@array/main_tab_home"
|
||||||
app:tbn_icon_size="28dp"
|
app:tbn_icon_size="28dp"
|
||||||
app:tbn_text_color_checked="@color/colorAccent"
|
app:tbn_tip="遇見"
|
||||||
app:tbn_text_color_unchecked="@color/gray1"
|
app:tbn_text_color_checked="#FFFF4598"
|
||||||
|
app:tbn_text_color_unchecked="#FF101420"
|
||||||
app:tbn_text_size="11sp" />
|
app:tbn_text_size="11sp" />
|
||||||
|
|
||||||
<com.yunbao.common.custom.TabButton
|
<com.yunbao.common.custom.TabButton
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginRight="60dp"
|
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
app:tbn_icon_array_id="@array/main_tab_video"
|
app:tbn_icon_array_id="@array/main_tab_video"
|
||||||
app:tbn_icon_size="28dp"
|
app:tbn_icon_size="28dp"
|
||||||
app:tbn_text_color_checked="@color/colorAccent"
|
app:tbn_tip="娛樂"
|
||||||
app:tbn_text_color_unchecked="@color/gray1"
|
app:tbn_text_color_checked="#FFFF4598"
|
||||||
|
app:tbn_text_color_unchecked="#FF101420"
|
||||||
app:tbn_text_size="11sp" />
|
app:tbn_text_size="11sp" />
|
||||||
|
|
||||||
<com.yunbao.common.custom.TabButton
|
<com.yunbao.common.custom.TabButton
|
||||||
@ -65,8 +66,9 @@
|
|||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
app:tbn_icon_array_id="@array/main_tab_list"
|
app:tbn_icon_array_id="@array/main_tab_list"
|
||||||
app:tbn_icon_size="28dp"
|
app:tbn_icon_size="28dp"
|
||||||
app:tbn_text_color_checked="@color/colorAccent"
|
app:tbn_tip="廣場"
|
||||||
app:tbn_text_color_unchecked="@color/gray1"
|
app:tbn_text_color_checked="#FFFF4598"
|
||||||
|
app:tbn_text_color_unchecked="#FF101420"
|
||||||
app:tbn_text_size="11sp" />
|
app:tbn_text_size="11sp" />
|
||||||
|
|
||||||
<com.yunbao.common.custom.TabButton
|
<com.yunbao.common.custom.TabButton
|
||||||
@ -75,8 +77,9 @@
|
|||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
app:tbn_icon_array_id="@array/main_tab_chat"
|
app:tbn_icon_array_id="@array/main_tab_chat"
|
||||||
app:tbn_icon_size="28dp"
|
app:tbn_icon_size="28dp"
|
||||||
app:tbn_text_color_checked="@color/colorAccent"
|
app:tbn_tip="我的"
|
||||||
app:tbn_text_color_unchecked="@color/gray1"
|
app:tbn_text_color_checked="#FFFF4598"
|
||||||
|
app:tbn_text_color_unchecked="#FF101420"
|
||||||
app:tbn_text_size="11sp" />
|
app:tbn_text_size="11sp" />
|
||||||
|
|
||||||
</com.yunbao.common.custom.TabButtonGroup>
|
</com.yunbao.common.custom.TabButtonGroup>
|
||||||
@ -137,16 +140,8 @@
|
|||||||
|
|
||||||
</RelativeLayout>
|
</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>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
||||||
<com.yunbao.main.views.FloatBannerView
|
<com.yunbao.main.views.FloatBannerView
|
||||||
android:id="@+id/float_banner_home"
|
android:id="@+id/float_banner_home"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@ -179,8 +174,8 @@
|
|||||||
android:layout_above="@id/rt_main_tab"
|
android:layout_above="@id/rt_main_tab"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_marginRight="12dp"
|
android:layout_marginRight="12dp"
|
||||||
android:visibility="gone"
|
android:layout_marginBottom="10dp"
|
||||||
android:layout_marginBottom="10dp" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
<include
|
<include
|
||||||
android:id="@+id/war_order"
|
android:id="@+id/war_order"
|
||||||
@ -189,8 +184,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_above="@id/rt_main_tab"
|
android:layout_above="@id/rt_main_tab"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_marginRight="25dp"
|
android:layout_marginRight="25dp" />
|
||||||
/>
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
Before Width: | Height: | Size: 1009 B |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 993 B |
Before Width: | Height: | Size: 970 B |
Before Width: | Height: | Size: 951 B |
Before Width: | Height: | Size: 908 B |
Before Width: | Height: | Size: 875 B |
Before Width: | Height: | Size: 859 B |
Before Width: | Height: | Size: 804 B |
Before Width: | Height: | Size: 760 B |
Before Width: | Height: | Size: 719 B |
Before Width: | Height: | Size: 689 B |
Before Width: | Height: | Size: 642 B |
Before Width: | Height: | Size: 587 B |
Before Width: | Height: | Size: 521 B |
Before Width: | Height: | Size: 477 B |
Before Width: | Height: | Size: 458 B |
Before Width: | Height: | Size: 369 B |
Before Width: | Height: | Size: 336 B |
Before Width: | Height: | Size: 269 B |
Before Width: | Height: | Size: 227 B |
Before Width: | Height: | Size: 99 B |
Before Width: | Height: | Size: 181 B |
Before Width: | Height: | Size: 294 B |
Before Width: | Height: | Size: 371 B |
Before Width: | Height: | Size: 467 B |
Before Width: | Height: | Size: 568 B |
Before Width: | Height: | Size: 612 B |
Before Width: | Height: | Size: 643 B |
Before Width: | Height: | Size: 743 B |
Before Width: | Height: | Size: 833 B |
Before Width: | Height: | Size: 898 B |
Before Width: | Height: | Size: 893 B |
Before Width: | Height: | Size: 979 B |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 665 B |
Before Width: | Height: | Size: 681 B |
Before Width: | Height: | Size: 647 B |
Before Width: | Height: | Size: 636 B |
Before Width: | Height: | Size: 600 B |
Before Width: | Height: | Size: 568 B |
Before Width: | Height: | Size: 576 B |
Before Width: | Height: | Size: 568 B |
Before Width: | Height: | Size: 524 B |
Before Width: | Height: | Size: 531 B |
Before Width: | Height: | Size: 522 B |
Before Width: | Height: | Size: 516 B |
Before Width: | Height: | Size: 510 B |
Before Width: | Height: | Size: 475 B |
Before Width: | Height: | Size: 429 B |
Before Width: | Height: | Size: 415 B |
Before Width: | Height: | Size: 418 B |
Before Width: | Height: | Size: 391 B |
Before Width: | Height: | Size: 369 B |
Before Width: | Height: | Size: 286 B |
Before Width: | Height: | Size: 336 B |
Before Width: | Height: | Size: 129 B |
Before Width: | Height: | Size: 261 B |
Before Width: | Height: | Size: 384 B |
Before Width: | Height: | Size: 480 B |
Before Width: | Height: | Size: 591 B |
Before Width: | Height: | Size: 681 B |
Before Width: | Height: | Size: 536 B |
Before Width: | Height: | Size: 646 B |
Before Width: | Height: | Size: 714 B |
Before Width: | Height: | Size: 737 B |
Before Width: | Height: | Size: 658 B |
Before Width: | Height: | Size: 843 B |
Before Width: | Height: | Size: 921 B |
Before Width: | Height: | Size: 1020 B |
Before Width: | Height: | Size: 1.0 KiB |