Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_youyou
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_youyou
Commits
ee838a8a
Commit
ee838a8a
authored
Mar 31, 2021
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改成饭补页面
parent
4ca626ff
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
475 additions
and
301 deletions
+475
-301
build.gradle
app/build.gradle
+2
-2
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+9
-16
MainActivity.kt
.../main/java/com/wenshu/youyou/ui/activitys/MainActivity.kt
+102
-110
FoodSubsidyFragment.kt
...java/com/wenshu/youyou/ui/fragment/FoodSubsidyFragment.kt
+112
-0
MyFragment.kt
...src/main/java/com/wenshu/youyou/ui/fragment/MyFragment.kt
+103
-70
activity_main.xml
app/src/main/res/layout/activity_main.xml
+72
-74
activity_splash.xml
app/src/main/res/layout/activity_splash.xml
+1
-2
fragment_food_subsidy.xml
app/src/main/res/layout/fragment_food_subsidy.xml
+46
-0
fragment_main_my.xml
app/src/main/res/layout/fragment_main_my.xml
+21
-21
item_fragment_main_my_title.xml
app/src/main/res/layout/item_fragment_main_my_title.xml
+7
-6
No files found.
app/build.gradle
View file @
ee838a8a
...
...
@@ -9,8 +9,8 @@ android {
applicationId
"com.wenshu.youyou"
minSdkVersion
rootProject
.
ext
.
androidMinSdkVersion
targetSdkVersion
rootProject
.
ext
.
androidTargetSdkVersion
versionCode
1
versionName
"1.0.
0
"
versionCode
2
versionName
"1.0.
1
"
flavorDimensions
"default"
// dex突破65535的限制
...
...
app/src/main/AndroidManifest.xml
View file @
ee838a8a
...
...
@@ -36,6 +36,7 @@
<uses-permission
android:name=
"android.permission.ANSWER_PHONE_CALLS"
/>
<uses-permission
android:name=
"android.permission.SYSTEM_ALERT_WINDOW"
/>
<uses-permission
android:name=
"com.wenshu.youyou.permission"
/>
<permission
android:name=
"com.wenshu.youyou.permission"
android:protectionLevel=
"normal"
/>
...
...
@@ -96,7 +97,7 @@
android:value=
"${JPUSH_CHANNEL}"
/>
<activity
android:name=
"com.wenshu.youyou.ui.activitys.Splash
Ylh
Activity"
android:name=
"com.wenshu.youyou.ui.activitys.SplashActivity"
android:screenOrientation=
"portrait"
android:theme=
"@style/NormalSplash"
>
<intent-filter>
...
...
@@ -105,6 +106,11 @@
<category
android:name=
"android.intent.category.LAUNCHER"
/>
</intent-filter>
</activity>
<activity
android:name=
"com.wenshu.youyou.ui.activitys.SplashYlhActivity"
android:screenOrientation=
"portrait"
android:theme=
"@style/NormalSplash"
/>
<activity
android:name=
"com.wenshu.youyou.ui.activitys.MainActivity"
android:configChanges=
"orientation|keyboardHidden|screenSize"
...
...
@@ -198,10 +204,10 @@
android:screenOrientation=
"portrait"
/>
<activity
android:name=
"com.wenshu.youyou.call.permission.PermissionActivity"
android:screenOrientation=
"portrait"
/>
android:screenOrientation=
"portrait"
/>
<activity
android:name=
"com.wenshu.youyou.call.detail.DetailApplyActivity"
android:screenOrientation=
"portrait"
/>
android:screenOrientation=
"portrait"
/>
<service
android:name=
"com.wenshu.youyou.service.UpdateService"
...
...
@@ -271,19 +277,6 @@
tools:replace=
"android:resource"
/>
</provider>
<!-- 鱼丸盒子广告 -->
<provider
android:name=
"com.component.dly.xzzq_ywsdk.YwFileProvider"
android:authorities=
"${applicationId}.YwFileProvider"
android:exported=
"false"
android:grantUriPermissions=
"true"
>
<meta-data
android:name=
"android.support.FILE_PROVIDER_PATHS"
android:resource=
"@xml/ywsdk_file_paths"
/>
</provider>
<!-- 穿山甲广告 -->
<provider
android:name=
"com.bytedance.sdk.openadsdk.multipro.TTMultiProvider"
...
...
app/src/main/java/com/wenshu/youyou/ui/activitys/MainActivity.kt
View file @
ee838a8a
This diff is collapsed.
Click to expand it.
app/src/main/java/com/wenshu/youyou/ui/fragment/FoodSubsidyFragment.kt
0 → 100644
View file @
ee838a8a
package
com.wenshu.youyou.ui.fragment
import
android.os.Bundle
import
com.wenshu.youyou.R
import
com.wenshu.youyou.common.Constant
import
com.wenshu.youyou.mvp.model.MealBean
import
com.wenshu.youyou.mvp.presenters.FoodSubsidyPresenter
import
com.wenshu.youyou.mvp.views.FoodSubsidyView
import
com.wenshu.youyou.ui.activitys.AwardActivity
import
com.wenshu.youyou.ui.fragment.base.BaseFragment
import
com.wenshu.youyou.ui.widgets.MealView
import
com.wenshu.youyou.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
app/src/main/java/com/wenshu/youyou/ui/fragment/MyFragment.kt
View file @
ee838a8a
This diff is collapsed.
Click to expand it.
app/src/main/res/layout/activity_main.xml
View file @
ee838a8a
...
...
@@ -26,80 +26,78 @@
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
>
<LinearLayout
android:visibility=
"gone"
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"
/>
<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:visibility=
"gone"
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"
/>
<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"
>
<ImageView
android:layout_width=
"match_parent"
android:layout_height=
"70dp"
android:src=
"@mipmap/tab_pan_btn_big"
/>
<!-- <ImageView-->
<!-- android:id="@+id/tab_iv_pan"-->
<!-- android:layout_width="25dp"-->
<!-- android:layout_height="25dp"-->
<!-- android:src="@drawable/tab_pan_btn" />-->
<!-- <TextView-->
<!-- android:id="@+id/tab_tv_pan"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:text="@string/bottom_tab_pan"-->
<!-- android:textColor="@drawable/item_txt_sel"-->
<!-- android:textSize="11sp" />-->
</LinearLayout>
<!-- <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" />-->
<!-- <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">-->
<!-- <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>-->
<!-- <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:id="@+id/tab_iv_pan"-->
<!-- android:layout_width="25dp"-->
<!-- android:layout_height="25dp"-->
<!-- android:src="@drawable/tab_pan_btn" />-->
<!-- <TextView-->
<!-- android:id="@+id/tab_tv_pan"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:text="@string/bottom_tab_pan"-->
<!-- android:textColor="@drawable/item_txt_sel"-->
<!-- android:textSize="11sp" />-->
<!-- </LinearLayout>-->
<LinearLayout
android:id=
"@+id/tab_rl_four"
...
...
app/src/main/res/layout/activity_splash.xml
View file @
ee838a8a
...
...
@@ -13,10 +13,9 @@
android:layout_marginBottom=
"30dp"
android:drawableTop=
"@mipmap/ic_launcher_main"
android:drawablePadding=
"14dp"
android:text=
"尤友—边看边玩边赚钱"
android:textColor=
"@color/black"
android:textSize=
"14sp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
></TextView
>
app:layout_constraintRight_toRightOf=
"parent"
/
>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
app/src/main/res/layout/fragment_food_subsidy.xml
0 → 100644
View file @
ee838a8a
<?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.wenshu.youyou.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>
app/src/main/res/layout/fragment_main_my.xml
View file @
ee838a8a
...
...
@@ -41,34 +41,34 @@
<include
layout=
"@layout/item_fragment_main_my_clock"
/>
<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"
/
>
<!-- <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"
/
>
<!-- <include layout="@layout/item_divider_gray" />--
>
<include
layout=
"@layout/item_fragment_main_my_promotions"
/
>
<!-- <include layout="@layout/item_fragment_main_my_promotions" />--
>
<include
layout=
"@layout/item_divider_gray"
/
>
<!-- <include layout="@layout/item_divider_gray" />--
>
<include
layout=
"@layout/view_title"
/
>
<!-- <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"
/
>
<!-- <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>
...
...
app/src/main/res/layout/item_fragment_main_my_title.xml
View file @
ee838a8a
...
...
@@ -5,10 +5,10 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:id=
"@+id/ll_my_login"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"15dp"
android:layout_marginTop=
"15dp"
android:layout_marginBottom=
"15dp"
android:layout_height=
"wrap_content"
>
android:layout_marginBottom=
"15dp"
>
<com.wenshu.youyou.ui.widgets.CircleImageView
android:id=
"@+id/item_title_avatar"
...
...
@@ -37,9 +37,10 @@
<RelativeLayout
android:layout_width=
"wrap_content"
android:layout_height=
"50dp"
android:background=
"@drawable/btn_my_friends"
android:paddingLeft=
"16dp"
android:paddingRight=
"10dp"
android:
background=
"@drawable/btn_my_friends
"
android:
visibility=
"gone
"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
>
...
...
@@ -48,12 +49,12 @@
android:id=
"@+id/item_title_friends"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:drawableTop=
"@mipmap/ic_friends"
android:text=
"平台分红"
android:textStyle=
"bold"
android:layout_centerVertical=
"true"
android:textColor=
"@color/white"
android:textSize=
"14sp"
/>
android:textSize=
"14sp"
android:textStyle=
"bold"
/>
</RelativeLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
...
...
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