Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_highgold_pro
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_highgold_pro
Commits
8c7ded89
Commit
8c7ded89
authored
Mar 09, 2021
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新正式环境珊瑚配置,热门活动页样式修改
parent
994f9525
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
188 additions
and
123 deletions
+188
-123
40805.dat
app/src/main/assets/40805.dat
+0
-0
CoralDownload.java
...n/java/com/mints/goldspace/ad/download/CoralDownload.java
+6
-6
KsPreLoadExpressManager.kt
...com/mints/goldspace/ad/express/KsPreLoadExpressManager.kt
+4
-1
KsVideoAdManager.kt
...ain/java/com/mints/goldspace/ad/video/KsVideoAdManager.kt
+3
-2
ShVideoAdManager.kt
...ain/java/com/mints/goldspace/ad/video/ShVideoAdManager.kt
+0
-1
CpdSydManager.kt
...rc/main/java/com/mints/goldspace/manager/CpdSydManager.kt
+0
-62
TzManager.kt
app/src/main/java/com/mints/goldspace/manager/TzManager.kt
+3
-3
TaskPresenter.kt
.../java/com/mints/goldspace/mvp/presenters/TaskPresenter.kt
+0
-1
GuideActivity.kt
...in/java/com/mints/goldspace/ui/activitys/GuideActivity.kt
+5
-5
GvMyAdapter.java
...main/java/com/mints/goldspace/ui/adapter/GvMyAdapter.java
+23
-13
ViewPagerAdapter.java
...java/com/mints/goldspace/ui/adapter/ViewPagerAdapter.java
+8
-7
MyFragment.kt
...c/main/java/com/mints/goldspace/ui/fragment/MyFragment.kt
+64
-7
WrapViewPager.java
...in/java/com/mints/goldspace/ui/widgets/WrapViewPager.java
+33
-0
item_fragment_main_my_promotions.xml
app/src/main/res/layout/item_fragment_main_my_promotions.xml
+24
-14
item_fragment_main_my_promotions_gv.xml
...c/main/res/layout/item_fragment_main_my_promotions_gv.xml
+15
-0
native_item_video.xml
app/src/main/res/layout/native_item_video.xml
+0
-1
No files found.
app/src/main/assets/40805.dat
View file @
8c7ded89
No preview for this file type
app/src/main/java/com/mints/goldspace/ad/download/CoralDownload.java
View file @
8c7ded89
...
...
@@ -36,12 +36,12 @@ public final class CoralDownload {
public
void
pull
()
{
int
type
;
if
(
BuildConfig
.
DEBUG
)
{
type
=
RELEASE_TASK_TYPE_DEBUG
;
}
else
{
type
=
RELEASE_TASK_TYPE_RELEASE
;
}
//
type = RELEASE_TASK_TYPE_RELEASE;
//
if (BuildConfig.DEBUG) {
//
type = RELEASE_TASK_TYPE_DEBUG;
//
} else {
//
type = RELEASE_TASK_TYPE_RELEASE;
//
}
type
=
RELEASE_TASK_TYPE_RELEASE
;
new
ADLoader
(
MintsApplication
.
getContext
())
.
get
(
ADType
.
APP_DOWNLOAD
)
...
...
app/src/main/java/com/mints/goldspace/ad/express/KsPreLoadExpressManager.kt
View file @
8c7ded89
...
...
@@ -32,6 +32,8 @@ object KsPreLoadExpressManager {
}
fun
loadKsFrameLayout
(
parent
:
ViewGroup
)
{
parent
.
removeAllViews
()
try
{
var
ksNativeAd
:
KsNativeAd
?
val
scene
=
KsScene
...
...
@@ -95,13 +97,14 @@ object KsPreLoadExpressManager {
}
override
fun
onVideoPlayError
(
what
:
Int
,
extra
:
Int
)
{
LogUtil
.
d
(
what
)
}
})
// SDK默认渲染的视频view
val
videoPlayConfig
=
KsAdVideoPlayConfig
.
Builder
()
.
videoSoundEnable
(
true
)
// 有声播放
.
dataFlowAutoStart
(
fals
e
)
// 流量下自动播放
.
dataFlowAutoStart
(
tru
e
)
// 流量下自动播放
.
build
()
val
videoView
=
ksNativeAd
.
getVideoView
(
mContext
,
videoPlayConfig
)
if
(
videoView
!=
null
&&
videoView
.
parent
==
null
)
{
...
...
app/src/main/java/com/mints/goldspace/ad/video/KsVideoAdManager.kt
View file @
8c7ded89
...
...
@@ -47,7 +47,6 @@ class KsVideoAdManager private constructor() :
videoAdStatusListener
?.
adFail
()
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_KS
,
Constant
.
EVENT_TYPE_ONE
,
p0
.
toString
(),
p1
)
LogUtil
.
d
(
p1
)
}
override
fun
onRewardVideoAdLoad
(
p0
:
MutableList
<
KsRewardVideoAd
>?)
{
...
...
@@ -105,8 +104,10 @@ class KsVideoAdManager private constructor() :
}
})
videoAdStatusListener
?.
adSuccess
()
// PlayConfig默认竖屏播放,传null
mRewardVideoAd
!!
.
showRewardVideoAd
(
activity
,
null
)
//
mRewardVideoAd!!.showRewardVideoAd(activity, null)
}
}
...
...
app/src/main/java/com/mints/goldspace/ad/video/ShVideoAdManager.kt
View file @
8c7ded89
...
...
@@ -3,7 +3,6 @@ package com.mints.goldspace.ad.video
import
android.app.Activity
import
android.text.TextUtils
import
androidx.annotation.Nullable
import
com.mints.goldspace.BuildConfig
import
com.mints.goldspace.ad.video.base.BaseVideoAd
import
com.mints.goldspace.ad.video.base.VideoAdStatusListener
import
com.mints.goldspace.common.AppConfig
...
...
app/src/main/java/com/mints/goldspace/manager/CpdSydManager.kt
deleted
100644 → 0
View file @
994f9525
package
com.mints.goldspace.manager
import
com.mints.goldspace.MintsApplication
import
com.mints.goldspace.common.Constant
import
com.mints.goldspace.common.DeviceInfo
import
com.mints.goldspace.net.CpdService
import
com.mints.goldspace.utils.MD5
import
com.mints.library.net.netstatus.NetUtils
import
okhttp3.MediaType.Companion.toMediaTypeOrNull
import
okhttp3.RequestBody
import
org.json.JSONException
import
org.json.JSONObject
/**
* 圣于地Cpd下载
*/
object
CpdSydManager
{
const
val
BUSINESS_ID
=
"m8909"
const
val
KEY
=
"KVPCQQsS9AV68y9DA2S4gIk2orHY4xz6"
fun
getCpdUrl
():
String
{
val
currentTimeMillis
=
System
.
currentTimeMillis
().
toString
()
val
token
=
MD5
.
GetMD5Code
(
BUSINESS_ID
+
KEY
+
currentTimeMillis
)
// token=MD5(id + apikey+ timestamp)
return
CpdService
.
CPD_IP
+
"?businessId="
+
BUSINESS_ID
+
"&token="
+
token
+
"×tamp="
+
currentTimeMillis
}
fun
getCpdBody
(
ip
:
String
):
RequestBody
{
val
deviceInfo
=
DeviceInfo
.
instance
val
param
=
JSONObject
()
val
application
=
JSONObject
()
val
equipment
=
JSONObject
()
try
{
application
.
put
(
"app_pkg_name"
,
Constant
.
MINTS_PKG_NAME
)
application
.
put
(
"app_ver_code"
,
deviceInfo
.
versionCode
)
application
.
put
(
"app_ver_name"
,
deviceInfo
.
versionName
)
// 设备类型 4-手机
equipment
.
put
(
"type"
,
"4"
)
// 系统类型 1:android
equipment
.
put
(
"os_type"
,
"1"
)
equipment
.
put
(
"android_id"
,
deviceInfo
.
androidId
)
equipment
.
put
(
"imei"
,
deviceInfo
.
iMEI
)
equipment
.
put
(
"mac"
,
deviceInfo
.
getMacAddress
())
equipment
.
put
(
"net_type"
,
NetUtils
.
getNetworkStateForCpd
(
MintsApplication
.
getContext
()))
equipment
.
put
(
"ip"
,
ip
)
equipment
.
put
(
"brand"
,
deviceInfo
.
brand
)
equipment
.
put
(
"model"
,
deviceInfo
.
mobileModel
)
param
.
put
(
"application"
,
application
)
param
.
put
(
"equipment"
,
equipment
)
}
catch
(
e
:
JSONException
)
{
e
.
printStackTrace
()
}
return
RequestBody
.
create
(
"application/json"
.
toMediaTypeOrNull
(),
param
.
toString
())
}
}
\ No newline at end of file
app/src/main/java/com/mints/goldspace/manager/TzManager.kt
View file @
8c7ded89
...
...
@@ -24,9 +24,9 @@ object TzManager {
.
appKey
(
APP_KEY
)
.
appSecret
(
APP_SECRET
)
.
appChannel
(
CommonUtils
.
getAppMetaData
(
MintsApplication
.
getContext
(),
"CHANNEL_NAME"
))
.
forTest
(
tru
e
)
.
log
(
tru
e
)
.
verbose
(
tru
e
)
.
forTest
(
fals
e
)
.
log
(
fals
e
)
.
verbose
(
fals
e
)
.
build
(),
object
:
IADEngineState
{
override
fun
onIdle
()
{}
...
...
app/src/main/java/com/mints/goldspace/mvp/presenters/TaskPresenter.kt
View file @
8c7ded89
...
...
@@ -7,7 +7,6 @@ import com.mints.goldspace.BuildConfig
import
com.mints.goldspace.common.DeviceInfo
import
com.mints.goldspace.manager.AppHttpManager
import
com.mints.goldspace.manager.CpdManager
import
com.mints.goldspace.manager.CpdSydManager
import
com.mints.goldspace.mvp.model.BaseResponse
import
com.mints.goldspace.mvp.model.CpdModelBean
import
com.mints.goldspace.mvp.model.SydCpdListBean
...
...
app/src/main/java/com/mints/goldspace/ui/activitys/GuideActivity.kt
View file @
8c7ded89
...
...
@@ -20,7 +20,7 @@ import java.util.*
class
GuideActivity
:
BaseActivity
()
{
private
val
animatorSet
by
lazy
{
AnimatorSet
()
}
private
var
m
ImageViews
=
ArrayList
<
Image
View
>()
private
var
m
Views
=
ArrayList
<
View
>()
private
val
guideImgs
=
intArrayOf
(
R
.
mipmap
.
bg_guide1
,
R
.
mipmap
.
bg_guide2
,
R
.
mipmap
.
bg_guide3
,
R
.
mipmap
.
bg_guide4
)
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_guide
...
...
@@ -54,14 +54,14 @@ class GuideActivity : BaseActivity() {
}
private
fun
initView
()
{
m
Image
Views
.
clear
()
mViews
.
clear
()
for
(
i
in
guideImgs
.
indices
)
{
val
imageView
=
ImageView
(
this
)
imageView
.
setBackgroundResource
(
guideImgs
[
i
])
//把imageView添加到集合中
m
Image
Views
.
add
(
imageView
)
mViews
.
add
(
imageView
)
}
val
viewPagerAdapter
=
ViewPagerAdapter
(
m
Image
Views
)
val
viewPagerAdapter
=
ViewPagerAdapter
(
mViews
)
vp_guide_viewpager
.
adapter
=
viewPagerAdapter
vp_guide_viewpager
.
setOnPageChangeListener
(
mOnPagerChangeListener
)
}
...
...
@@ -73,7 +73,7 @@ class GuideActivity : BaseActivity() {
//当界面切换完成的时候调用的方法
override
fun
onPageSelected
(
position
:
Int
)
{
pageIndicatorView
.
selection
=
position
if
(
position
==
m
Image
Views
.
size
-
1
)
{
if
(
position
==
mViews
.
size
-
1
)
{
val
alphaAnimator
=
ObjectAnimator
.
ofFloat
(
btn_guide_start
,
"alpha"
,
0f
,
1f
)
alphaAnimator
.
repeatCount
=
0
animatorSet
.
play
(
alphaAnimator
)
...
...
app/src/main/java/com/mints/goldspace/ui/adapter/GvMyAdapter.java
View file @
8c7ded89
...
...
@@ -3,7 +3,6 @@ package com.mints.goldspace.ui.adapter;
import
android.annotation.SuppressLint
;
import
android.app.Activity
;
import
android.content.Context
;
import
android.text.TextUtils
;
import
android.view.LayoutInflater
;
import
android.view.View
;
...
...
@@ -18,7 +17,6 @@ import com.mints.goldspace.common.Constant;
import
com.mints.goldspace.manager.BxmManager
;
import
com.mints.goldspace.manager.UserManager
;
import
com.mints.goldspace.mvp.model.BannerBean
;
import
com.mints.goldspace.utils.ForegroundOrBackground
;
import
com.mints.library.utils.GlideUtils
;
import
java.util.List
;
...
...
@@ -32,28 +30,35 @@ import java.util.List;
public
class
GvMyAdapter
extends
BaseAdapter
{
private
List
<
BannerBean
.
ListBean
>
orders
;
private
Context
context
;
private
Activity
activity
;
public
GvMyAdapter
(
Context
context
,
Activity
activity
,
List
<
BannerBean
.
ListBean
>
orders
)
{
private
int
mCurrentIndex
;
private
int
mPageSize
;
public
GvMyAdapter
(
Activity
activity
,
List
<
BannerBean
.
ListBean
>
orders
,
int
currentIndex
,
int
pageSize
)
{
this
.
orders
=
orders
;
this
.
context
=
context
;
this
.
activity
=
activity
;
this
.
mCurrentIndex
=
currentIndex
;
this
.
mPageSize
=
pageSize
;
}
@Override
public
int
getCount
()
{
return
orders
==
null
?
0
:
orders
.
size
();
// return orders == null ? 0 : orders.size();
return
orders
.
size
()
>
(
mCurrentIndex
+
1
)
*
mPageSize
?
mPageSize
:
(
orders
.
size
()
-
mCurrentIndex
*
mPageSize
);
}
@Override
public
Object
getItem
(
int
position
)
{
return
orders
.
get
(
position
);
// return orders.get(position);
return
orders
.
get
(
position
+
mCurrentIndex
*
mPageSize
);
}
@Override
public
long
getItemId
(
int
position
)
{
return
position
;
// return position;
return
position
+
mCurrentIndex
*
mPageSize
;
}
@SuppressLint
(
"WrongViewCast"
)
...
...
@@ -63,7 +68,7 @@ public class GvMyAdapter extends BaseAdapter {
ViewHolder
viewHolder
;
if
(
convertView
==
null
)
{
LayoutInflater
inflater
=
LayoutInflater
.
from
(
context
);
LayoutInflater
inflater
=
LayoutInflater
.
from
(
activity
);
convertView
=
inflater
.
inflate
(
R
.
layout
.
item_list_my
,
null
);
viewHolder
=
new
ViewHolder
();
...
...
@@ -75,9 +80,15 @@ public class GvMyAdapter extends BaseAdapter {
}
else
{
viewHolder
=
(
ViewHolder
)
convertView
.
getTag
();
}
BannerBean
.
ListBean
data
=
orders
.
get
(
position
);
/**
* 在给View绑定显示的数据时,计算正确的position = position + curIndex * pageSize
*/
int
pos
=
position
+
mCurrentIndex
*
mPageSize
;
BannerBean
.
ListBean
data
=
orders
.
get
(
pos
);
if
(
data
!=
null
)
{
GlideUtils
.
loadImageView
(
context
,
data
.
getImgUrl
(),
viewHolder
.
ic_my_icon
);
GlideUtils
.
loadImageView
(
activity
,
data
.
getImgUrl
(),
viewHolder
.
ic_my_icon
);
viewHolder
.
tv_my_title
.
setText
(
data
.
getTitle
());
if
(
TextUtils
.
equals
(
data
.
getToUrl
(),
Constant
.
HOT_ACTIVITY_BXM
)
&&
UserManager
.
getInstance
().
userIsLogin
())
{
...
...
@@ -92,5 +103,4 @@ public class GvMyAdapter extends BaseAdapter {
public
FrameLayout
fl_my_icon
;
public
TextView
tv_my_title
;
}
}
}
\ No newline at end of file
app/src/main/java/com/mints/goldspace/ui/adapter/ViewPagerAdapter.java
View file @
8c7ded89
package
com
.
mints
.
goldspace
.
ui
.
adapter
;
import
androidx.viewpager.widget.PagerAdapter
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.widget.ImageView
;
...
...
@@ -15,16 +16,16 @@ import java.util.List;
*/
public
class
ViewPagerAdapter
extends
PagerAdapter
{
private
List
<
ImageView
>
mImage
Views
;
private
List
<
View
>
m
Views
;
public
ViewPagerAdapter
(
List
<
ImageView
>
mImageV
iews
)
{
this
.
m
ImageViews
=
mImageV
iews
;
public
ViewPagerAdapter
(
List
<
View
>
v
iews
)
{
this
.
m
Views
=
v
iews
;
}
//设置viewpager条目的个数
@Override
public
int
getCount
()
{
return
m
Image
Views
.
size
();
return
mViews
.
size
();
}
//判断Viewpager的页面的view对象是否和instantiateItem返回的object一致
...
...
@@ -36,8 +37,8 @@ public class ViewPagerAdapter extends PagerAdapter {
//添加viewpager条目的方法
@Override
public
Object
instantiateItem
(
ViewGroup
container
,
int
position
)
{
ImageView
imageView
=
mImage
Views
.
get
(
position
);
//将
image
view添加给viewpager
View
imageView
=
m
Views
.
get
(
position
);
//将view添加给viewpager
container
.
addView
(
imageView
);
return
imageView
;
}
...
...
@@ -48,4 +49,4 @@ public class ViewPagerAdapter extends PagerAdapter {
//super.destroyItem(container, position, object);
container
.
removeView
((
View
)
object
);
}
}
}
\ No newline at end of file
app/src/main/java/com/mints/goldspace/ui/fragment/MyFragment.kt
View file @
8c7ded89
...
...
@@ -6,8 +6,10 @@ import android.content.*
import
android.os.Bundle
import
android.text.TextUtils
import
android.view.Gravity
import
android.view.LayoutInflater
import
android.view.View
import
android.widget.AdapterView
import
android.widget.GridView
import
androidx.core.content.ContextCompat
import
androidx.recyclerview.widget.DividerItemDecoration
import
com.component.dly.xzzq_ywsdk.YwSDK_WebActivity.Companion.open
...
...
@@ -29,6 +31,7 @@ import com.mints.goldspace.service.AppInstallService
import
com.mints.goldspace.ui.activitys.*
import
com.mints.goldspace.ui.adapter.GvMyAdapter
import
com.mints.goldspace.ui.adapter.MainMyAdapter
import
com.mints.goldspace.ui.adapter.ViewPagerAdapter
import
com.mints.goldspace.ui.adapter.listener.OnItemChildClickListener
import
com.mints.goldspace.ui.fragment.base.BaseFragment
import
com.mints.goldspace.ui.widgets.CustomDialogAsApple
...
...
@@ -43,6 +46,7 @@ import com.mints.library.net.netstatus.NetUtils
import
com.mints.library.utils.CommonUtils
import
com.mints.library.utils.GlideUtils
import
com.mints.library.utils.nodoubleclick.AntiShake
import
com.rd.animation.type.AnimationType
import
com.scwang.smartrefresh.layout.api.RefreshLayout
import
com.scwang.smartrefresh.layout.listener.OnRefreshListener
import
com.tbruyelle.rxpermissions.RxPermissions
...
...
@@ -57,6 +61,7 @@ import net.grandcentrix.tray.AppPreferences
import
java.math.BigDecimal
import
java.util.*
import
kotlin.concurrent.schedule
import
kotlin.math.ceil
private
val
TAG
=
MyFragment
::
class
.
java
.
simpleName
...
...
@@ -79,8 +84,16 @@ class MyFragment : BaseFragment(),
private
lateinit
var
vedioAdingManager
:
VideoAdingManager
private
var
loadVedioFailCount
=
0
companion
object
{
// 热门活动每页展示数据
const
val
HOT_PAGE_SIZE
=
8
}
// 热门活动下标
private
var
mCurrentIndex
=
0
private
var
userConfig
:
MyInfo
?
=
null
private
va
r
hotList
:
List
<
BannerBean
.
ListBean
>?
=
array
ListOf
()
private
va
l
hotList
:
MutableList
<
BannerBean
.
ListBean
>
=
mutable
ListOf
()
// 当天签到金币
private
var
carrierType
=
""
...
...
@@ -204,20 +217,66 @@ class MyFragment : BaseFragment(),
srl_my
.
finishRefresh
(
false
)
userConfig
=
null
item_promotions_egv
.
visibility
=
View
.
GONE
vp_grid
.
visibility
=
View
.
GONE
setUserLoginStatus
()
}
override
fun
getMyHotActivitySuc
(
data
:
BannerBean
?)
{
if
(
activity
!=
null
&&
!
requireActivity
().
isFinishing
)
{
data
?.
let
{
item_promotions_egv
.
visibility
=
View
.
VISIBLE
hotList
=
it
.
list
item_promotions_egv
.
adapter
=
GvMyAdapter
(
mContext
,
requireActivity
(),
hotList
)
vp_grid
.
visibility
=
View
.
VISIBLE
hotList
.
clear
()
hotList
.
addAll
(
it
.
list
)
generateGridData
(
hotList
)
}
}
}
// 生成热门活动数据
private
fun
generateGridData
(
data
:
List
<
BannerBean
.
ListBean
>)
{
val
inflater
=
LayoutInflater
.
from
(
mContext
)
val
pageCount
=
ceil
(
data
.
size
*
1.0
/
HOT_PAGE_SIZE
).
toInt
()
val
pagerList
=
arrayListOf
<
View
>()
for
(
i
in
0
until
pageCount
)
{
val
gridView
=
inflater
.
inflate
(
R
.
layout
.
item_fragment_main_my_promotions_gv
,
vp_grid
,
false
)
as
GridView
gridView
.
adapter
=
GvMyAdapter
(
requireActivity
(),
data
,
i
,
HOT_PAGE_SIZE
)
pagerList
.
add
(
gridView
)
gridView
.
onItemClickListener
=
this
}
if
(
pageCount
<=
1
)
{
piv_grid
.
visibility
=
View
.
GONE
}
else
{
piv_grid
.
visibility
=
View
.
VISIBLE
piv_grid
.
count
=
pageCount
}
mCurrentIndex
=
0
piv_grid
.
count
=
pageCount
piv_grid
.
setAnimationType
(
AnimationType
.
THIN_WORM
)
vp_grid
.
adapter
=
ViewPagerAdapter
(
pagerList
)
// vp_grid.addOnPageChangeListener(object : ViewPager.OnPageChangeListener {
// override fun onPageScrollStateChanged(state: Int) {
// }
//
// override fun onPageScrolled(position: Int, positionOffset: Float, positionOffsetPixels: Int) {
// }
//
// override fun onPageSelected(position: Int) {
// mCurrentIndex = position
//
// piv_grid.selection = position
// }
//
// })
}
override
fun
getSignInHomePageMsgSuc
(
signBean
:
SignCardBean
?)
{
if
(
signBean
==
null
)
{
signCardBean
=
null
...
...
@@ -1075,8 +1134,6 @@ class MyFragment : BaseFragment(),
item_title_friends
.
setOnClickListener
(
this
)
ll_my_login
.
setOnClickListener
(
this
)
item_customer_service
.
setOnClickListener
(
this
)
item_promotions_egv
.
onItemClickListener
=
this
}
/**
...
...
app/src/main/java/com/mints/goldspace/ui/widgets/WrapViewPager.java
0 → 100644
View file @
8c7ded89
package
com
.
mints
.
goldspace
.
ui
.
widgets
;
import
android.content.Context
;
import
android.util.AttributeSet
;
import
android.view.View
;
import
androidx.viewpager.widget.ViewPager
;
public
class
WrapViewPager
extends
ViewPager
{
public
WrapViewPager
(
Context
context
)
{
super
(
context
);
}
public
WrapViewPager
(
Context
context
,
AttributeSet
attrs
)
{
super
(
context
,
attrs
);
}
@Override
protected
void
onMeasure
(
int
widthMeasureSpec
,
int
heightMeasureSpec
)
{
int
height
=
0
;
for
(
int
i
=
0
;
i
<
getChildCount
();
i
++)
{
View
child
=
getChildAt
(
i
);
child
.
measure
(
widthMeasureSpec
,
MeasureSpec
.
makeMeasureSpec
(
0
,
MeasureSpec
.
UNSPECIFIED
));
int
h
=
child
.
getMeasuredHeight
();
if
(
h
>
height
)
height
=
h
;
}
heightMeasureSpec
=
MeasureSpec
.
makeMeasureSpec
(
height
,
MeasureSpec
.
EXACTLY
);
super
.
onMeasure
(
widthMeasureSpec
,
heightMeasureSpec
);
}
}
app/src/main/res/layout/item_fragment_main_my_promotions.xml
View file @
8c7ded89
<?xml version="1.0" encoding="utf-8"?>
<com.mints.goldspace.ui.widgets.ExpandableGridView
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:id=
"@+id/item_promotions_egv"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:visibility=
"gone"
android:layout_marginTop=
"2dp"
android:layout_marginBottom=
"16dp"
android:columnWidth=
"85dp"
android:divider=
"@null"
android:dividerHeight=
"10dp"
android:listSelector=
"@color/color_0000"
android:numColumns=
"4"
android:scrollbars=
"none"
android:stretchMode=
"spacingWidthUniform"
/>
\ No newline at end of file
<merge
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:attrs=
"http://schemas.android.com/tools"
>
<com.mints.goldspace.ui.widgets.WrapViewPager
android:id=
"@+id/vp_grid"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
<com.rd.PageIndicatorView
android:id=
"@+id/piv_grid"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:layout_marginTop=
"8dp"
android:layout_marginBottom=
"8dp"
android:visibility=
"gone"
app:piv_count=
"2"
app:piv_selectedColor=
"@color/color_FF9837"
app:piv_unselectedColor=
"@color/color_20000000"
app:piv_viewPager=
"@id/vp_grid"
attrs:piv_padding=
"2dp"
attrs:piv_radius=
"4dp"
/>
</merge>
app/src/main/res/layout/item_fragment_main_my_promotions_gv.xml
0 → 100644
View file @
8c7ded89
<?xml version="1.0" encoding="utf-8"?>
<com.mints.goldspace.ui.widgets.ExpandableGridView
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:id=
"@+id/item_promotions_egv"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"2dp"
android:layout_marginBottom=
"16dp"
android:columnWidth=
"85dp"
android:divider=
"@null"
android:dividerHeight=
"10dp"
android:listSelector=
"@color/color_0000"
android:numColumns=
"4"
android:scrollbars=
"none"
android:stretchMode=
"spacingWidthUniform"
/>
app/src/main/res/layout/native_item_video.xml
View file @
8c7ded89
...
...
@@ -3,7 +3,6 @@
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/ad_score_color"
android:orientation=
"vertical"
tools:ignore=
"ContentDescription,SpUsage,RtlHardcoded"
>
...
...
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