Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_goodmoney
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
android
android_goodmoney
Commits
93a4e04d
Commit
93a4e04d
authored
Apr 07, 2021
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
e6ac82fb
Changes
9
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
706 additions
and
546 deletions
+706
-546
AndroidManifest.xml
GoodMoney/app/src/main/AndroidManifest.xml
+1
-1
MainActivity.kt
...ain/java/com/mints/goodmoney/ui/activitys/MainActivity.kt
+116
-94
FoodSubsidyFragment.kt
...va/com/mints/goodmoney/ui/fragment/FoodSubsidyFragment.kt
+112
-0
MyFragment.kt
...c/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
+297
-312
ForegroundOrBackground.java
...ava/com/mints/goodmoney/utils/ForegroundOrBackground.java
+29
-29
activity_main.xml
GoodMoney/app/src/main/res/layout/activity_main.xml
+72
-72
fragment_food_subsidy.xml
GoodMoney/app/src/main/res/layout/fragment_food_subsidy.xml
+46
-0
fragment_main_my.xml
GoodMoney/app/src/main/res/layout/fragment_main_my.xml
+31
-38
item_fragment_main_my_title.xml
...y/app/src/main/res/layout/item_fragment_main_my_title.xml
+2
-0
No files found.
GoodMoney/app/src/main/AndroidManifest.xml
View file @
93a4e04d
...
...
@@ -127,7 +127,7 @@
<!-- </activity>-->
<activity
android:name=
".ui.activitys.Splash
Ylh
Activity"
android:name=
".ui.activitys.SplashActivity"
android:screenOrientation=
"portrait"
android:theme=
"@style/NormalSplash"
>
<intent-filter>
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/MainActivity.kt
View file @
93a4e04d
This diff is collapsed.
Click to expand it.
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/FoodSubsidyFragment.kt
0 → 100644
View file @
93a4e04d
package
com.mints.goodmoney.ui.fragment
import
android.os.Bundle
import
com.mints.goodmoney.R
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.mvp.model.MealBean
import
com.mints.goodmoney.mvp.presenters.FoodSubsidyPresenter
import
com.mints.goodmoney.mvp.views.FoodSubsidyView
import
com.mints.goodmoney.ui.activitys.AwardActivity
import
com.mints.goodmoney.ui.fragment.base.BaseFragment
import
com.mints.goodmoney.ui.widgets.MealView
import
com.mints.goodmoney.ui.widgets.StepView
import
kotlinx.android.synthetic.main.fragment_food_subsidy.*
class
FoodSubsidyFragment
:
BaseFragment
(),
FoodSubsidyView
,
StepView
.
StepViewListener
,
MealView
.
MealViewListener
{
private
val
foodSubsidyPresenter
by
lazy
{
FoodSubsidyPresenter
()
}
private
var
curCoin
=
0
//点击的汽泡金币
private
var
buttonCoin
=
0
//点击的汽泡金币
private
var
isCanClickVideo
=
false
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
fragment_food_subsidy
override
fun
initViewsAndEvents
()
{
foodSubsidyPresenter
.
attachView
(
this
)
initListener
()
}
override
fun
onResume
()
{
super
.
onResume
()
// initExpress()
foodSubsidyPresenter
.
getMealMsg
()
}
override
fun
onDestroy
()
{
super
.
onDestroy
()
svWalk
?.
destoryAnim
()
// flSubsidykAd?.removeAllViews()
foodSubsidyPresenter
.
detachView
()
}
private
fun
initListener
()
{
svWalk
.
setMealViewListener
(
this
)
}
override
fun
clickWater
(
water
:
Int
,
waterCoin
:
String
)
{
if
(
water
==
0
)
{
val
bundle
=
Bundle
()
bundle
.
putInt
(
Constant
.
MAIN_CUR_COIN
,
buttonCoin
)
bundle
.
putString
(
Constant
.
MAIN_CARRIER_TYPE
,
Constant
.
CARRIER_EATMEAL
)
readyGo
(
AwardActivity
::
class
.
java
,
bundle
)
}
else
{
if
(
isCanClickVideo
)
{
val
bundle
=
Bundle
()
bundle
.
putInt
(
Constant
.
MAIN_CUR_COIN
,
curCoin
)
bundle
.
putString
(
Constant
.
MAIN_CARRIER_TYPE
,
Constant
.
CARRIER_EATMEAL_SUBSIDY
)
readyGo
(
AwardActivity
::
class
.
java
,
bundle
)
svWalk
.
setCancelAnim
(
water
)
}
else
{
val
bundle
=
Bundle
()
bundle
.
putString
(
Constant
.
MAIN_CARRIER_TYPE
,
Constant
.
CARRIER_EATMEAL_SUBSIDY_NOT
)
readyGo
(
AwardActivity
::
class
.
java
,
bundle
)
}
}
// 预加载信息流
// TTPreLoadCarrierExpressManager.getInstance().loadTtFrameLayout(TtCsjAdManager.TT_AD_NATIVEEXPRESS_EAT)
}
/**
* 初始化信息iyc
*/
private
fun
initExpress
()
{
// try {
// if (TTPreLoadCarrierExpressManager.getInstance().ttFrameLayout != null) {
// if (flSubsidykAd != null) {
// flSubsidykAd.removeAllViews()
// flSubsidykAd.addView(TTPreLoadCarrierExpressManager.getInstance().ttFrameLayout)
// }
// }
// } catch (e: Exception) {
// e.printStackTrace()
// }
}
override
fun
getFoodSubsidySuc
(
data
:
MealBean
)
{
svWalk
.
setThreeBtnGone
()
curCoin
=
data
.
vedioCoin
buttonCoin
=
data
.
buttonCoin
this
.
isCanClickVideo
=
data
.
isCanClickVedio
for
(
i
in
0
until
data
.
vedioCount
)
{
svWalk
.
setWaterTextviewLayout
(
i
+
1
,
0
)
}
// 是否可领取奖励
if
(
data
.
isCanClickButton
)
{
svWalk
.
setTvDrinkBtnEnable
()
}
else
{
svWalk
.
setTvDrinkBtnNone
()
}
svWalk
.
setTvDrinkBtnText
(
data
.
buttonMsg
)
}
}
\ No newline at end of file
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
View file @
93a4e04d
This diff is collapsed.
Click to expand it.
GoodMoney/app/src/main/java/com/mints/goodmoney/utils/ForegroundOrBackground.java
View file @
93a4e04d
...
...
@@ -101,37 +101,37 @@ public class ForegroundOrBackground implements Application.ActivityLifecycleCall
return
;
}
if
(
count
==
0
)
{
// LogUtil.d("ForegroundOrBackground", System.currentTimeMillis() - leaveTime + " onActivityStarted");
// 60秒后打开应用 显示开屏广告
if
(
System
.
currentTimeMillis
()
-
leaveTime
>=
60000
)
{
if
(
isYlhSplash
)
{
isYlhSplash
=
false
;
if
(
ylhIntent
==
null
)
{
// 优量汇广告
ylhIntent
=
new
Intent
(
activity
,
SplashADActivity
.
class
);
}
activity
.
startActivity
(
ylhIntent
);
}
else
{
isYlhSplash
=
true
;
if
(
csjIntent
==
null
)
{
// 快手广告
csjIntent
=
new
Intent
(
activity
,
SplashCsjADActivity
.
class
);
}
activity
.
startActivity
(
csjIntent
);
// if (ksIntent == null) {
// if (count == 0) {
//// LogUtil.d("ForegroundOrBackground", System.currentTimeMillis() - leaveTime + " onActivityStarted");
// // 60秒后打开应用 显示开屏广告
// if (System.currentTimeMillis() - leaveTime >= 60000) {
//
// if (isYlhSplash) {
// isYlhSplash = false;
//
// if (ylhIntent == null) {
// // 优量汇广告
// ylhIntent = new Intent(activity, SplashADActivity.class);
// }
// activity.startActivity(ylhIntent);
// } else {
// isYlhSplash = true;
//
// if (csjIntent == null) {
// // 快手广告
// ksIntent = new Intent(activity, SplashKsADActivity.class);
// csjIntent = new Intent(activity, SplashCsjADActivity.class);
// }
// activity.startActivity(csjIntent);
//
//// if (ksIntent == null) {
//// // 快手广告
//// ksIntent = new Intent(activity, SplashKsADActivity.class);
//// }
//// activity.startActivity(ksIntent);
// }
//
// }
// }
// activity.startActivity(ksIntent);
}
}
}
count
++;
}
...
...
GoodMoney/app/src/main/res/layout/activity_main.xml
View file @
93a4e04d
...
...
@@ -26,63 +26,63 @@
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
>
<
LinearLayout
android:id=
"@+id/tab_rl_one"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_weight=
"1.0"
android:gravity=
"center"
android:orientation=
"vertical"
>
<
!-- <LinearLayout-->
<!-- android:id="@+id/tab_rl_one"-->
<!-- android:layout_width="0dp"-->
<!-- android:layout_height="match_parent"-->
<!-- android:layout_weight="1.0"-->
<!-- android:gravity="center"-->
<!-- android:orientation="vertical">--
>
<ImageView
android:id=
"@+id/tab_iv_one"
android:layout_width=
"25dp"
android:layout_height=
"25dp"
android:src=
"@drawable/tab_loan_btn"
/
>
<!-- <ImageView-->
<!-- android:id="@+id/tab_iv_one"-->
<!-- android:layout_width="25dp"-->
<!-- android:layout_height="25dp"-->
<!-- android:src="@drawable/tab_loan_btn" />--
>
<TextView
android:id=
"@+id/tab_tv_one"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"@string/bottom_tab_main"
android:textColor=
"@drawable/item_txt_sel"
android:textSize=
"11sp"
/
>
<
/LinearLayout
>
<!-- <TextView-->
<!-- android:id="@+id/tab_tv_one"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:text="@string/bottom_tab_main"-->
<!-- android:textColor="@drawable/item_txt_sel"-->
<!-- android:textSize="11sp" />--
>
<
!-- </LinearLayout>--
>
<
LinearLayout
android:id=
"@+id/tab_rl_two"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_weight=
"1.0"
android:gravity=
"center"
android:orientation=
"vertical"
>
<
!-- <LinearLayout-->
<!-- android:id="@+id/tab_rl_two"-->
<!-- android:layout_width="0dp"-->
<!-- android:layout_height="match_parent"-->
<!-- android:layout_weight="1.0"-->
<!-- android:gravity="center"-->
<!-- android:orientation="vertical">--
>
<ImageView
android:id=
"@+id/tab_iv_two"
android:layout_width=
"25dp"
android:layout_height=
"25dp"
android:src=
"@drawable/tab_video_btn"
/
>
<!-- <ImageView-->
<!-- android:id="@+id/tab_iv_two"-->
<!-- android:layout_width="25dp"-->
<!-- android:layout_height="25dp"-->
<!-- android:src="@drawable/tab_video_btn" />--
>
<TextView
android:id=
"@+id/tab_tv_two"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"@string/bottom_tab_channel"
android:textColor=
"@drawable/item_txt_sel"
android:textSize=
"11sp"
/
>
<
/LinearLayout
>
<!-- <TextView-->
<!-- android:id="@+id/tab_tv_two"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:text="@string/bottom_tab_channel"-->
<!-- android:textColor="@drawable/item_txt_sel"-->
<!-- android:textSize="11sp" />--
>
<
!-- </LinearLayout>--
>
<
LinearLayout
android:id=
"@+id/tab_rl_three"
android:layout_width=
"0dp"
android:layout_height=
"75dp"
android:layout_gravity=
"bottom"
android:layout_weight=
"1.0"
>
<
!-- <LinearLayout-->
<!-- android:id="@+id/tab_rl_three"-->
<!-- android:layout_width="0dp"-->
<!-- android:layout_height="75dp"-->
<!-- android:layout_gravity="bottom"-->
<!-- android:layout_weight="1.0">--
>
<ImageView
android:layout_width=
"match_parent"
android:layout_height=
"70dp"
android:src=
"@mipmap/tab_pan_btn_big"
/
>
<!-- <ImageView-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="70dp"-->
<!-- android:src="@mipmap/tab_pan_btn_big" />--
>
<!-- <ImageView-->
<!-- android:id="@+id/tab_iv_pan"-->
...
...
@@ -97,7 +97,7 @@
<!-- android:text="@string/bottom_tab_pan"-->
<!-- android:textColor="@drawable/item_txt_sel"-->
<!-- android:textSize="11sp" />-->
<
/LinearLayout
>
<
!-- </LinearLayout>--
>
<LinearLayout
android:id=
"@+id/tab_rl_four"
...
...
GoodMoney/app/src/main/res/layout/fragment_food_subsidy.xml
0 → 100644
View file @
93a4e04d
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/white"
android:fadingEdge=
"none"
android:overScrollMode=
"never"
>
<LinearLayout
android:id=
"@+id/ll_food"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
<FrameLayout
android:layout_width=
"match_parent"
android:layout_height=
"360dp"
android:background=
"@mipmap/bg_eat"
>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:layout_marginTop=
"60dp"
android:src=
"@mipmap/ic_font_food"
android:visibility=
"gone"
/>
<com.mints.goodmoney.ui.widgets.MealView
android:id=
"@+id/svWalk"
android:layout_width=
"375dp"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:layout_marginTop=
"80dp"
/>
</FrameLayout>
<!-- <FrameLayout-->
<!-- android:id="@+id/flSubsidykAd"-->
<!-- android:layout_width="340dp"-->
<!-- android:layout_height="340dp"-->
<!-- android:layout_gravity="center_horizontal"-->
<!-- android:layout_marginTop="20dp"-->
<!-- android:background="@color/color_0000" />-->
</LinearLayout>
</ScrollView>
GoodMoney/app/src/main/res/layout/fragment_main_my.xml
View file @
93a4e04d
...
...
@@ -26,6 +26,11 @@
android:layout_height=
"wrap_content"
android:overScrollMode=
"never"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
<LinearLayout
android:id=
"@+id/llMyRoot"
android:layout_width=
"match_parent"
...
...
@@ -36,46 +41,34 @@
<include
layout=
"@layout/item_fragment_main_my_clock"
/>
<include
layout=
"@layout/item_divider_gray"
/>
<!-- <FrameLayout-->
<!-- android:id="@+id/fl_my_banner"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_marginStart="12dp"-->
<!-- android:layout_marginEnd="12dp"-->
<!-- android:background="@drawable/shape_bg_award"-->
<!-- android:visibility="gone" />-->
<include
layout=
"@layout/item_fragment_main_my_promotions"
/
>
<!-- <include layout="@layout/item_divider_gray" />--
>
<include
layout=
"@layout/item_divider_gray"
/
>
<!-- <include layout="@layout/item_fragment_main_my_promotions" />--
>
<FrameLayout
android:id=
"@+id/fl_my_banner"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"12dp"
android:layout_marginEnd=
"12dp"
android:background=
"@drawable/shape_bg_award"
android:visibility=
"gone"
/>
<!-- <include layout="@layout/item_divider_gray" />-->
<com.mints.goodmoney.ui.widgets.BannerView
android:id=
"@+id/banner_view"
android:layout_width=
"match_parent"
android:layout_height=
"150dp"
android:visibility=
"gone"
app:bannerAnimDuration=
"1500"
app:bannerAnimScroll=
"true"
app:bannerAutoScroll=
"true"
app:bannerPageAlpha=
"0"
app:bannerPageMargin=
"0dp"
app:bannerPagePercent=
"1"
app:bannerScrollDuration=
"5000"
/>
<include
layout=
"@layout/view_title"
/>
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/recy_my"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"15dp"
android:layout_marginEnd=
"15dp"
android:nestedScrollingEnabled=
"false"
app:layoutManager=
"androidx.recyclerview.widget.LinearLayoutManager"
/>
<!-- <include layout="@layout/view_title" />-->
</LinearLayout>
<!-- <androidx.recyclerview.widget.RecyclerView-->
<!-- android:id="@+id/recy_my"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_marginStart="15dp"-->
<!-- android:layout_marginEnd="15dp"-->
<!-- android:nestedScrollingEnabled="false"-->
<!-- app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />-->
<
include
layout=
"@layout/item_fragment_main_my_customer_service"
/
>
<
!-- <include layout="@layout/item_fragment_main_my_customer_service" />--
>
</LinearLayout>
...
...
GoodMoney/app/src/main/res/layout/item_fragment_main_my_title.xml
View file @
93a4e04d
...
...
@@ -35,6 +35,7 @@
app:layout_constraintTop_toTopOf=
"parent"
/>
<RelativeLayout
android:visibility=
"gone"
android:layout_width=
"wrap_content"
android:layout_height=
"50dp"
android:background=
"@drawable/btn_my_friends"
...
...
@@ -52,6 +53,7 @@
android:drawableTop=
"@mipmap/ic_friends"
android:text=
"平台分红"
android:textColor=
"@color/white"
android:textSize=
"14sp"
android:textStyle=
"bold"
/>
</RelativeLayout>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment