Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
RvApp
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
1
Merge Requests
1
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
lify
RvApp
Commits
493bec0a
Commit
493bec0a
authored
Aug 01, 2019
by
linfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面优化和bug修复
parent
a6bae431
Changes
54
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
54 changed files
with
2072 additions
and
378 deletions
+2072
-378
build.gradle
RvClient/build.gradle
+1
-0
AndroidManifest.xml
RvClient/src/main/AndroidManifest.xml
+6
-1
MainActivity.java
RvClient/src/main/java/com/xxfc/rv/MainActivity.java
+13
-2
WelcomeActivity.java
RvClient/src/main/java/com/xxfc/rv/WelcomeActivity.java
+10
-1
BaseWrapperActivity.java
.../java/com/ruiwenliu/wrapper/base/BaseWrapperActivity.java
+12
-0
OSUtils.java
...rc/main/java/com/ruiwenliu/wrapper/statusbar/OSUtils.java
+118
-0
StatusBarHeightView.java
.../com/ruiwenliu/wrapper/statusbar/StatusBarHeightView.java
+63
-0
StatusBarUtil.java
...n/java/com/ruiwenliu/wrapper/statusbar/StatusBarUtil.java
+212
-0
SystemBarTintManager.java
...com/ruiwenliu/wrapper/statusbar/SystemBarTintManager.java
+543
-0
attrs.xml
RvWrapper/src/main/res/values/attrs.xml
+9
-0
BottomPromptDialog.java
...main/java/com/rv/component/dialog/BottomPromptDialog.java
+26
-0
PaymentTypeSelection.java
...in/java/com/rv/component/dialog/PaymentTypeSelection.java
+1
-1
dialog_prompt_bottom.xml
...onent_dialog/src/main/res/layout/dialog_prompt_bottom.xml
+49
-0
rv_dialog_paymant_type_selection.xml
.../src/main/res/layout/rv_dialog_paymant_type_selection.xml
+10
-11
rv_map_shop.png
...nent_resource/src/main/res/drawable-xhdpi/rv_map_shop.png
+0
-0
rv_max_map_shop.png
..._resource/src/main/res/drawable-xhdpi/rv_max_map_shop.png
+0
-0
build.gradle
module_camp/build.gradle
+1
-0
CampFragment.java
module_camp/src/main/java/com/rv/camp/CampFragment.java
+21
-9
CampListAdapter.java
...mp/src/main/java/com/rv/camp/adapter/CampListAdapter.java
+1
-1
CampListBean.java
module_camp/src/main/java/com/rv/camp/bean/CampListBean.java
+24
-6
CampShopShowActivity.java
.../src/main/java/com/rv/camp/camp/CampShopShowActivity.java
+370
-0
activity_camp.xml
module_camp/src/main/res/layout/activity_camp.xml
+10
-2
rv_item_camp_list.xml
module_camp/src/main/res/layout/rv_item_camp_list.xml
+2
-3
DiscoveryRecommendAdapter.java
...com/xxfc/discovery/adapter/DiscoveryRecommendAdapter.java
+0
-3
PatFragment.java
...rc/main/java/com/xxfc/discovery/fragment/PatFragment.java
+54
-24
RecommendFragment.java
...n/java/com/xxfc/discovery/fragment/RecommendFragment.java
+88
-12
PostPatActivity.java
...c/main/java/com/xxfc/discovery/other/PostPatActivity.java
+32
-2
fragment_discovery.xml
module_discovery/src/main/res/layout/fragment_discovery.xml
+8
-1
rv_item_discovery_recommend.xml
...overy/src/main/res/layout/rv_item_discovery_recommend.xml
+2
-2
ConfirmOrderActivity.java
.../rv/home/rv/module/ui/main/home/ConfirmOrderActivity.java
+5
-6
HomeFragment.java
...java/com/rv/home/rv/module/ui/main/home/HomeFragment.java
+0
-2
AllOrderFragment.java
...v/home/rv/module/ui/main/home/order/AllOrderFragment.java
+8
-3
ForPaymentFragment.java
...home/rv/module/ui/main/home/order/ForPaymentFragment.java
+5
-5
MemberOrderDetailsActivity.java
...module/ui/main/home/order/MemberOrderDetailsActivity.java
+6
-3
OrderDetailActivity.java
...ome/rv/module/ui/main/home/order/OrderDetailActivity.java
+5
-5
TravelOrderDetailsActivity.java
...module/ui/main/home/order/TravelOrderDetailsActivity.java
+5
-5
home_button_select_car.png
...me/src/main/res/drawable-xhdpi/home_button_select_car.png
+0
-0
fragment_home.xml
module_home/src/main/res/layout/fragment_home.xml
+23
-13
MineFragment.java
module_mine/src/main/java/com/rv/rvmine/MineFragment.java
+1
-0
activity_mine.xml
module_mine/src/main/res/layout/activity_mine.xml
+56
-48
TourismFragment.java
...tourism/src/main/java/com/rv/tourism/TourismFragment.java
+52
-11
AllPopularAdapter.java
...c/main/java/com/rv/tourism/adapter/AllPopularAdapter.java
+1
-1
PopularBrigadeAdapter.java
...in/java/com/rv/tourism/adapter/PopularBrigadeAdapter.java
+1
-1
RecommendedRouteAdapter.java
.../java/com/rv/tourism/adapter/RecommendedRouteAdapter.java
+1
-1
PopularTourListActivity.java
...in/java/com/rv/tourism/other/PopularTourListActivity.java
+26
-11
TravelerConfirmOrderActivity.java
...va/com/rv/tourism/other/TravelerConfirmOrderActivity.java
+5
-6
activity_popular_tour_list.xml
...ourism/src/main/res/layout/activity_popular_tour_list.xml
+2
-2
activity_tourism.xml
module_tourism/src/main/res/layout/activity_tourism.xml
+159
-165
rv_item_all_popular.xml
module_tourism/src/main/res/layout/rv_item_all_popular.xml
+1
-1
rv_item_popular_brigade.xml
...e_tourism/src/main/res/layout/rv_item_popular_brigade.xml
+1
-0
MemberCenterActivity.java
...ber/src/main/java/com/rv.member/MemberCenterActivity.java
+6
-6
activity_travel_search.xml
plugin_search/src/main/res/layout/activity_travel_search.xml
+1
-2
WalletActivity.java
...rc/main/java/com/xxrv/wallet/activity/WalletActivity.java
+7
-0
activity_wallet.xml
plugin_wallet/src/main/res/layout/activity_wallet.xml
+9
-0
No files found.
RvClient/build.gradle
View file @
493bec0a
...
@@ -75,6 +75,7 @@ dependencies {
...
@@ -75,6 +75,7 @@ dependencies {
annotationProcessor
'com.jakewharton:butterknife-compiler:9.0.0-rc1'
annotationProcessor
'com.jakewharton:butterknife-compiler:9.0.0-rc1'
implementation
'com.android.support.constraint:constraint-layout:1.1.3'
implementation
'com.android.support.constraint:constraint-layout:1.1.3'
// api project(path: ':RvTravel')
// api project(path: ':RvTravel')
api
project
(
':component_resource'
)
api
project
(
path:
':module_home'
)
api
project
(
path:
':module_home'
)
api
project
(
path:
':module_mine'
)
api
project
(
path:
':module_mine'
)
api
project
(
path:
':module_camp'
)
api
project
(
path:
':module_camp'
)
...
...
RvClient/src/main/AndroidManifest.xml
View file @
493bec0a
...
@@ -359,7 +359,12 @@
...
@@ -359,7 +359,12 @@
<activity
<activity
android:name=
"com.rv.camp.camp.CampDetailActivity"
android:name=
"com.rv.camp.camp.CampDetailActivity"
android:launchMode=
"singleTask"
android:launchMode=
"singleTask"
android:screenOrientation=
"portrait"
/>
<!-- ============================旅游========================================== -->
android:screenOrientation=
"portrait"
/>
<activity
android:name=
"com.rv.camp.camp.CampShopShowActivity"
android:launchMode=
"singleTask"
android:screenOrientation=
"portrait"
/>
<activity
android:name=
".WakeUpActivity"
>
<activity
android:name=
".WakeUpActivity"
>
<intent-filter>
<intent-filter>
...
...
RvClient/src/main/java/com/xxfc/rv/MainActivity.java
View file @
493bec0a
...
@@ -4,17 +4,21 @@ import android.content.ComponentName;
...
@@ -4,17 +4,21 @@ import android.content.ComponentName;
import
android.content.Context
;
import
android.content.Context
;
import
android.content.Intent
;
import
android.content.Intent
;
import
android.content.pm.PackageManager
;
import
android.content.pm.PackageManager
;
import
android.os.Build
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.support.annotation.NonNull
;
import
android.support.annotation.NonNull
;
import
android.support.annotation.Nullable
;
import
android.support.annotation.Nullable
;
import
android.support.v4.content.ContextCompat
;
import
android.support.v4.content.ContextCompat
;
import
android.support.v4.view.ViewPager
;
import
android.text.TextUtils
;
import
android.text.TextUtils
;
import
android.view.KeyEvent
;
import
android.view.KeyEvent
;
import
android.view.View
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.view.Window
;
import
android.view.WindowManager
;
import
android.widget.ImageView
;
import
android.widget.ImageView
;
import
android.widget.TextView
;
import
android.widget.TextView
;
import
android.widget.Toast
;
import
android.widget.Toast
;
import
com.alibaba.android.arouter.launcher.ARouter
;
import
com.alibaba.android.arouter.launcher.ARouter
;
import
com.frame.base.url.Constance
;
import
com.frame.base.url.Constance
;
import
com.frame.rv.config.RvFrameConfig
;
import
com.frame.rv.config.RvFrameConfig
;
...
@@ -23,6 +27,7 @@ import com.ruiwenliu.wrapper.base.BaseActivity;
...
@@ -23,6 +27,7 @@ import com.ruiwenliu.wrapper.base.BaseActivity;
import
com.ruiwenliu.wrapper.base.BaseBean
;
import
com.ruiwenliu.wrapper.base.BaseBean
;
import
com.ruiwenliu.wrapper.base.BaseWrapperFragment
;
import
com.ruiwenliu.wrapper.base.BaseWrapperFragment
;
import
com.ruiwenliu.wrapper.bean.ActBean
;
import
com.ruiwenliu.wrapper.bean.ActBean
;
import
com.ruiwenliu.wrapper.statusbar.StatusBarUtil
;
import
com.ruiwenliu.wrapper.util.listener.SwitchFragment
;
import
com.ruiwenliu.wrapper.util.listener.SwitchFragment
;
import
com.ruiwenliu.wrapper.weight.CustomScrollViewPager
;
import
com.ruiwenliu.wrapper.weight.CustomScrollViewPager
;
import
com.ruiwenliu.wrapper.weight.TitleView
;
import
com.ruiwenliu.wrapper.weight.TitleView
;
...
@@ -52,6 +57,7 @@ import butterknife.BindView;
...
@@ -52,6 +57,7 @@ import butterknife.BindView;
import
butterknife.OnClick
;
import
butterknife.OnClick
;
public
class
MainActivity
extends
BaseActivity
<
CommonPresenter
>
{
public
class
MainActivity
extends
BaseActivity
<
CommonPresenter
>
{
// @BindView(R2.id.pager_view_fragment)
// @BindView(R2.id.pager_view_fragment)
...
@@ -96,6 +102,12 @@ public class MainActivity extends BaseActivity<CommonPresenter> {
...
@@ -96,6 +102,12 @@ public class MainActivity extends BaseActivity<CommonPresenter> {
return
R
.
layout
.
activity_main
;
return
R
.
layout
.
activity_main
;
}
}
@Override
protected
void
onCreate
(
@Nullable
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
StatusBarUtil
.
setRootViewFitsSystemWindows
(
mActivity
,
false
);
}
@Override
@Override
protected
void
initView
(
Bundle
savedInstanceState
,
TitleView
titleView
,
Intent
intent
)
{
protected
void
initView
(
Bundle
savedInstanceState
,
TitleView
titleView
,
Intent
intent
)
{
updateAppUtils
=
UpdateAppUtils
.
from
(
MainActivity
.
this
);
updateAppUtils
=
UpdateAppUtils
.
from
(
MainActivity
.
this
);
...
@@ -121,7 +133,6 @@ public class MainActivity extends BaseActivity<CommonPresenter> {
...
@@ -121,7 +133,6 @@ public class MainActivity extends BaseActivity<CommonPresenter> {
getActivityPopup
();
getActivityPopup
();
checkVersion
();
checkVersion
();
}
}
@Override
@Override
...
...
RvClient/src/main/java/com/xxfc/rv/WelcomeActivity.java
View file @
493bec0a
...
@@ -2,10 +2,13 @@ package com.xxfc.rv;
...
@@ -2,10 +2,13 @@ package com.xxfc.rv;
import
android.content.Intent
;
import
android.content.Intent
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.support.annotation.Nullable
;
import
android.text.TextUtils
;
import
android.text.TextUtils
;
import
android.view.View
;
import
com.ruiwenliu.wrapper.base.BaseActivity
;
import
com.ruiwenliu.wrapper.base.BaseActivity
;
import
com.ruiwenliu.wrapper.base.BaseBean
;
import
com.ruiwenliu.wrapper.base.BaseBean
;
import
com.ruiwenliu.wrapper.statusbar.StatusBarUtil
;
import
com.ruiwenliu.wrapper.util.UtilsManager
;
import
com.ruiwenliu.wrapper.util.UtilsManager
;
import
com.ruiwenliu.wrapper.weight.TitleView
;
import
com.ruiwenliu.wrapper.weight.TitleView
;
import
com.rv.component.utils.LogUtil
;
import
com.rv.component.utils.LogUtil
;
...
@@ -57,7 +60,7 @@ public class WelcomeActivity extends BaseActivity<CommonPresenter> {
...
@@ -57,7 +60,7 @@ public class WelcomeActivity extends BaseActivity<CommonPresenter> {
* 计时器
* 计时器
*/
*/
private
void
interval
()
{
private
void
interval
()
{
mDisposable
=
Flowable
.
interval
(
3
,
TimeUnit
.
SECONDS
)
mDisposable
=
Flowable
.
interval
(
2
,
TimeUnit
.
SECONDS
)
.
doOnNext
(
new
Consumer
<
Long
>()
{
.
doOnNext
(
new
Consumer
<
Long
>()
{
@Override
@Override
public
void
accept
(
@NonNull
Long
aLong
)
throws
Exception
{
public
void
accept
(
@NonNull
Long
aLong
)
throws
Exception
{
...
@@ -94,4 +97,10 @@ public class WelcomeActivity extends BaseActivity<CommonPresenter> {
...
@@ -94,4 +97,10 @@ public class WelcomeActivity extends BaseActivity<CommonPresenter> {
mDisposable
.
dispose
();
mDisposable
.
dispose
();
}
}
}
}
@Override
protected
void
onCreate
(
@Nullable
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
getWindow
().
getDecorView
().
setSystemUiVisibility
(
View
.
SYSTEM_UI_FLAG_FULLSCREEN
);
}
}
}
RvWrapper/src/main/java/com/ruiwenliu/wrapper/base/BaseWrapperActivity.java
View file @
493bec0a
...
@@ -15,6 +15,7 @@ import android.widget.Toast;
...
@@ -15,6 +15,7 @@ import android.widget.Toast;
import
com.alibaba.android.arouter.launcher.ARouter
;
import
com.alibaba.android.arouter.launcher.ARouter
;
import
com.ruiwenliu.wrapper.R
;
import
com.ruiwenliu.wrapper.R
;
import
com.ruiwenliu.wrapper.statusbar.StatusBarUtil
;
import
com.ruiwenliu.wrapper.weight.TitleView
;
import
com.ruiwenliu.wrapper.weight.TitleView
;
import
com.ruiwenliu.wrapper.weight.ToastView
;
import
com.ruiwenliu.wrapper.weight.ToastView
;
...
@@ -55,6 +56,17 @@ public abstract class BaseWrapperActivity extends SupportActivity {
...
@@ -55,6 +56,17 @@ public abstract class BaseWrapperActivity extends SupportActivity {
ButterKnife
.
bind
(
this
);
ButterKnife
.
bind
(
this
);
initView
(
savedInstanceState
,
titleView
,
getIntent
());
initView
(
savedInstanceState
,
titleView
,
getIntent
());
//当FitsSystemWindows设置 true 时,会在屏幕最上方预留出状态栏高度的 padding
StatusBarUtil
.
setRootViewFitsSystemWindows
(
this
,
true
);
//设置状态栏透明
StatusBarUtil
.
setTranslucentStatus
(
this
);
//一般的手机的状态栏文字和图标都是白色的, 可如果你的应用也是纯白色的, 或导致状态栏文字看不清
//所以如果你是这种情况,请使用以下代码, 设置状态使用深色文字图标风格, 否则你可以选择性注释掉这个if内容
if
(!
StatusBarUtil
.
setStatusBarDarkTheme
(
this
,
true
))
{
//如果不支持设置深色风格 为了兼容总不能让状态栏白白的看不清, 于是设置一个状态栏颜色为半透明,
//这样半透明+白=灰, 状态栏的文字能看得清
StatusBarUtil
.
setStatusBarColor
(
this
,
0x55000000
);
}
}
}
...
...
RvWrapper/src/main/java/com/ruiwenliu/wrapper/statusbar/OSUtils.java
0 → 100644
View file @
493bec0a
package
com
.
ruiwenliu
.
wrapper
.
statusbar
;
import
android.os.Build
;
import
android.text.TextUtils
;
import
java.io.BufferedReader
;
import
java.io.IOException
;
import
java.io.InputStreamReader
;
public
class
OSUtils
{
public
static
final
String
ROM_MIUI
=
"MIUI"
;
public
static
final
String
ROM_EMUI
=
"EMUI"
;
public
static
final
String
ROM_FLYME
=
"FLYME"
;
public
static
final
String
ROM_OPPO
=
"OPPO"
;
public
static
final
String
ROM_SMARTISAN
=
"SMARTISAN"
;
public
static
final
String
ROM_VIVO
=
"VIVO"
;
public
static
final
String
ROM_QIKU
=
"QIKU"
;
private
static
final
String
KEY_VERSION_MIUI
=
"ro.miui.ui.version.name"
;
private
static
final
String
KEY_VERSION_EMUI
=
"ro.build.version.emui"
;
private
static
final
String
KEY_VERSION_OPPO
=
"ro.build.version.opporom"
;
private
static
final
String
KEY_VERSION_SMARTISAN
=
"ro.smartisan.version"
;
private
static
final
String
KEY_VERSION_VIVO
=
"ro.vivo.os.version"
;
private
static
String
sName
;
private
static
String
sVersion
;
public
static
boolean
isEmui
()
{
return
check
(
ROM_EMUI
);
}
public
static
boolean
isMiui
()
{
return
check
(
ROM_MIUI
);
}
public
static
boolean
isVivo
()
{
return
check
(
ROM_VIVO
);
}
public
static
boolean
isOppo
()
{
return
check
(
ROM_OPPO
);
}
public
static
boolean
isFlyme
()
{
return
check
(
ROM_FLYME
);
}
public
static
boolean
is360
()
{
return
check
(
ROM_QIKU
)
||
check
(
"360"
);
}
public
static
boolean
isSmartisan
()
{
return
check
(
ROM_SMARTISAN
);
}
public
static
String
getName
()
{
if
(
sName
==
null
)
{
check
(
""
);
}
return
sName
;
}
public
static
String
getVersion
()
{
if
(
sVersion
==
null
)
{
check
(
""
);
}
return
sVersion
;
}
public
static
boolean
check
(
String
rom
)
{
if
(
sName
!=
null
)
{
return
sName
.
equals
(
rom
);
}
if
(!
TextUtils
.
isEmpty
(
sVersion
=
getProp
(
KEY_VERSION_MIUI
)))
{
sName
=
ROM_MIUI
;
}
else
if
(!
TextUtils
.
isEmpty
(
sVersion
=
getProp
(
KEY_VERSION_EMUI
)))
{
sName
=
ROM_EMUI
;
}
else
if
(!
TextUtils
.
isEmpty
(
sVersion
=
getProp
(
KEY_VERSION_OPPO
)))
{
sName
=
ROM_OPPO
;
}
else
if
(!
TextUtils
.
isEmpty
(
sVersion
=
getProp
(
KEY_VERSION_VIVO
)))
{
sName
=
ROM_VIVO
;
}
else
if
(!
TextUtils
.
isEmpty
(
sVersion
=
getProp
(
KEY_VERSION_SMARTISAN
)))
{
sName
=
ROM_SMARTISAN
;
}
else
{
sVersion
=
Build
.
DISPLAY
;
if
(
sVersion
.
toUpperCase
().
contains
(
ROM_FLYME
))
{
sName
=
ROM_FLYME
;
}
else
{
sVersion
=
Build
.
UNKNOWN
;
sName
=
Build
.
MANUFACTURER
.
toUpperCase
();
}
}
return
sName
.
equals
(
rom
);
}
public
static
String
getProp
(
String
name
)
{
String
line
=
null
;
BufferedReader
input
=
null
;
try
{
Process
p
=
Runtime
.
getRuntime
().
exec
(
"getprop "
+
name
);
input
=
new
BufferedReader
(
new
InputStreamReader
(
p
.
getInputStream
()),
1024
);
line
=
input
.
readLine
();
input
.
close
();
}
catch
(
IOException
ex
)
{
return
null
;
}
finally
{
if
(
input
!=
null
)
{
try
{
input
.
close
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
}
return
line
;
}
}
RvWrapper/src/main/java/com/ruiwenliu/wrapper/statusbar/StatusBarHeightView.java
0 → 100644
View file @
493bec0a
package
com
.
ruiwenliu
.
wrapper
.
statusbar
;
import
android.content.Context
;
import
android.content.res.TypedArray
;
import
android.os.Build
;
import
android.support.annotation.Nullable
;
import
android.util.AttributeSet
;
import
android.widget.LinearLayout
;
import
com.ruiwenliu.wrapper.R
;
public
class
StatusBarHeightView
extends
LinearLayout
{
private
int
statusBarHeight
;
private
int
type
;
public
StatusBarHeightView
(
Context
context
,
@Nullable
AttributeSet
attrs
)
{
super
(
context
,
attrs
);
init
(
attrs
);
}
public
StatusBarHeightView
(
Context
context
,
@Nullable
AttributeSet
attrs
,
int
defStyleAttr
)
{
super
(
context
,
attrs
,
defStyleAttr
);
init
(
attrs
);
}
public
StatusBarHeightView
(
Context
context
,
@Nullable
AttributeSet
attrs
,
int
defStyleAttr
,
int
defStyleRes
)
{
super
(
context
,
attrs
,
defStyleAttr
);
init
(
attrs
);
}
private
void
init
(
@Nullable
AttributeSet
attrs
)
{
int
resourceId
=
getResources
().
getIdentifier
(
"status_bar_height"
,
"dimen"
,
"android"
);
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
KITKAT
)
{
if
(
resourceId
>
0
)
{
statusBarHeight
=
getResources
().
getDimensionPixelSize
(
resourceId
);
}
}
else
{
//低版本 直接设置0
statusBarHeight
=
0
;
}
if
(
attrs
!=
null
)
{
TypedArray
typedArray
=
getContext
().
obtainStyledAttributes
(
attrs
,
R
.
styleable
.
StatusBarHeightView
);
type
=
typedArray
.
getInt
(
R
.
styleable
.
StatusBarHeightView_use_type
,
0
);
typedArray
.
recycle
();
}
if
(
type
==
1
)
{
setPadding
(
getPaddingLeft
(),
statusBarHeight
,
getPaddingRight
(),
getPaddingBottom
());
}
}
@Override
protected
void
onMeasure
(
int
widthMeasureSpec
,
int
heightMeasureSpec
)
{
if
(
type
==
0
)
{
setMeasuredDimension
(
getDefaultSize
(
getSuggestedMinimumWidth
(),
widthMeasureSpec
),
statusBarHeight
);
}
else
{
super
.
onMeasure
(
widthMeasureSpec
,
heightMeasureSpec
);
}
}
}
RvWrapper/src/main/java/com/ruiwenliu/wrapper/statusbar/StatusBarUtil.java
0 → 100644
View file @
493bec0a
package
com
.
ruiwenliu
.
wrapper
.
statusbar
;
import
android.annotation.SuppressLint
;
import
android.annotation.TargetApi
;
import
android.app.Activity
;
import
android.content.Context
;
import
android.graphics.Color
;
import
android.os.Build
;
import
android.support.annotation.IntDef
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.view.Window
;
import
android.view.WindowManager
;
import
java.lang.annotation.Retention
;
import
java.lang.annotation.RetentionPolicy
;
import
java.lang.reflect.Field
;
import
java.lang.reflect.Method
;
public
class
StatusBarUtil
{
public
final
static
int
TYPE_MIUI
=
0
;
public
final
static
int
TYPE_FLYME
=
1
;
public
final
static
int
TYPE_M
=
3
;
//6.0
@IntDef
({
TYPE_MIUI
,
TYPE_FLYME
,
TYPE_M
})
@Retention
(
RetentionPolicy
.
SOURCE
)
@interface
ViewType
{
}
/**
* 修改状态栏颜色,支持4.4以上版本
*
* @param colorId 颜色
*/
public
static
void
setStatusBarColor
(
Activity
activity
,
int
colorId
)
{
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
LOLLIPOP
)
{
Window
window
=
activity
.
getWindow
();
window
.
setStatusBarColor
(
colorId
);
}
else
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
KITKAT
)
{
//使用SystemBarTintManager,需要先将状态栏设置为透明
setTranslucentStatus
(
activity
);
SystemBarTintManager
systemBarTintManager
=
new
SystemBarTintManager
(
activity
);
systemBarTintManager
.
setStatusBarTintEnabled
(
true
);
//显示状态栏
systemBarTintManager
.
setStatusBarTintColor
(
colorId
);
//设置状态栏颜色
}
}
/**
* 设置状态栏透明
*/
@TargetApi
(
19
)
public
static
void
setTranslucentStatus
(
Activity
activity
)
{
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
LOLLIPOP
)
{
//5.x开始需要把颜色设置透明,否则导航栏会呈现系统默认的浅灰色
Window
window
=
activity
.
getWindow
();
View
decorView
=
window
.
getDecorView
();
//两个 flag 要结合使用,表示让应用的主体内容占用系统状态栏的空间
int
option
=
View
.
SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
|
View
.
SYSTEM_UI_FLAG_LAYOUT_STABLE
;
decorView
.
setSystemUiVisibility
(
option
);
window
.
addFlags
(
WindowManager
.
LayoutParams
.
FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS
);
window
.
setStatusBarColor
(
Color
.
TRANSPARENT
);
//导航栏颜色也可以正常设置
//window.setNavigationBarColor(Color.TRANSPARENT);
}
else
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
KITKAT
)
{
Window
window
=
activity
.
getWindow
();
WindowManager
.
LayoutParams
attributes
=
window
.
getAttributes
();
int
flagTranslucentStatus
=
WindowManager
.
LayoutParams
.
FLAG_TRANSLUCENT_STATUS
;
attributes
.
flags
|=
flagTranslucentStatus
;
//int flagTranslucentNavigation = WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION;
//attributes.flags |= flagTranslucentNavigation;
window
.
setAttributes
(
attributes
);
}
}
/**
* 代码实现android:fitsSystemWindows
*
* @param activity
*/
public
static
void
setRootViewFitsSystemWindows
(
Activity
activity
,
boolean
fitSystemWindows
)
{
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
KITKAT
)
{
ViewGroup
winContent
=
(
ViewGroup
)
activity
.
findViewById
(
android
.
R
.
id
.
content
);
if
(
winContent
.
getChildCount
()
>
0
)
{
ViewGroup
rootView
=
(
ViewGroup
)
winContent
.
getChildAt
(
0
);
if
(
rootView
!=
null
)
{
rootView
.
setFitsSystemWindows
(
fitSystemWindows
);
}
}
}
}
/**
* 设置状态栏深色浅色切换
*/
public
static
boolean
setStatusBarDarkTheme
(
Activity
activity
,
boolean
dark
)
{
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
KITKAT
)
{
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
M
)
{
setStatusBarFontIconDark
(
activity
,
TYPE_M
,
dark
);
}
else
if
(
OSUtils
.
isMiui
())
{
setStatusBarFontIconDark
(
activity
,
TYPE_MIUI
,
dark
);
}
else
if
(
OSUtils
.
isFlyme
())
{
setStatusBarFontIconDark
(
activity
,
TYPE_FLYME
,
dark
);
}
else
{
//其他情况
return
false
;
}
return
true
;
}
return
false
;
}
/**
* 设置 状态栏深色浅色切换
*/
public
static
boolean
setStatusBarFontIconDark
(
Activity
activity
,
@ViewType
int
type
,
boolean
dark
)
{
switch
(
type
)
{
case
TYPE_MIUI:
return
setMiuiUI
(
activity
,
dark
);
case
TYPE_FLYME:
return
setFlymeUI
(
activity
,
dark
);
case
TYPE_M:
default
:
return
setCommonUI
(
activity
,
dark
);
}
}
//设置6.0 状态栏深色浅色切换
public
static
boolean
setCommonUI
(
Activity
activity
,
boolean
dark
)
{
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
M
)
{
View
decorView
=
activity
.
getWindow
().
getDecorView
();
if
(
decorView
!=
null
)
{
int
vis
=
decorView
.
getSystemUiVisibility
();
if
(
dark
)
{
vis
|=
View
.
SYSTEM_UI_FLAG_LIGHT_STATUS_BAR
;
}
else
{
vis
&=
~
View
.
SYSTEM_UI_FLAG_LIGHT_STATUS_BAR
;
}
if
(
decorView
.
getSystemUiVisibility
()
!=
vis
)
{
decorView
.
setSystemUiVisibility
(
vis
);
}
return
true
;
}
}
return
false
;
}
//设置Flyme 状态栏深色浅色切换
public
static
boolean
setFlymeUI
(
Activity
activity
,
boolean
dark
)
{
try
{
Window
window
=
activity
.
getWindow
();
WindowManager
.
LayoutParams
lp
=
window
.
getAttributes
();
Field
darkFlag
=
WindowManager
.
LayoutParams
.
class
.
getDeclaredField
(
"MEIZU_FLAG_DARK_STATUS_BAR_ICON"
);
Field
meizuFlags
=
WindowManager
.
LayoutParams
.
class
.
getDeclaredField
(
"meizuFlags"
);
darkFlag
.
setAccessible
(
true
);
meizuFlags
.
setAccessible
(
true
);
int
bit
=
darkFlag
.
getInt
(
null
);
int
value
=
meizuFlags
.
getInt
(
lp
);
if
(
dark
)
{
value
|=
bit
;
}
else
{
value
&=
~
bit
;
}
meizuFlags
.
setInt
(
lp
,
value
);
window
.
setAttributes
(
lp
);
return
true
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
false
;
}
}
//设置MIUI 状态栏深色浅色切换
public
static
boolean
setMiuiUI
(
Activity
activity
,
boolean
dark
)
{
try
{
Window
window
=
activity
.
getWindow
();
Class
<?>
clazz
=
activity
.
getWindow
().
getClass
();
@SuppressLint
(
"PrivateApi"
)
Class
<?>
layoutParams
=
Class
.
forName
(
"android.view.MiuiWindowManager$LayoutParams"
);
Field
field
=
layoutParams
.
getField
(
"EXTRA_FLAG_STATUS_BAR_DARK_MODE"
);
int
darkModeFlag
=
field
.
getInt
(
layoutParams
);
Method
extraFlagField
=
clazz
.
getDeclaredMethod
(
"setExtraFlags"
,
int
.
class
,
int
.
class
);
extraFlagField
.
setAccessible
(
true
);
if
(
dark
)
{
//状态栏亮色且黑色字体
extraFlagField
.
invoke
(
window
,
darkModeFlag
,
darkModeFlag
);
}
else
{
extraFlagField
.
invoke
(
window
,
0
,
darkModeFlag
);
}
return
true
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
false
;
}
}
//获取状态栏高度
public
static
int
getStatusBarHeight
(
Context
context
)
{
int
result
=
0
;
int
resourceId
=
context
.
getResources
().
getIdentifier
(
"status_bar_height"
,
"dimen"
,
"android"
);
if
(
resourceId
>
0
)
{
result
=
context
.
getResources
().
getDimensionPixelSize
(
resourceId
);
}
return
result
;
}
}
RvWrapper/src/main/java/com/ruiwenliu/wrapper/statusbar/SystemBarTintManager.java
0 → 100644
View file @
493bec0a
This diff is collapsed.
Click to expand it.
RvWrapper/src/main/res/values/attrs.xml
0 → 100644
View file @
493bec0a
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable
name=
"StatusBarHeightView"
>
<attr
name=
"use_type"
format=
"integer"
>
<enum
name=
"use_height"
value=
"0"
/>
<enum
name=
"use_padding_top"
value=
"1"
/>
</attr>
</declare-styleable>
</resources>
component_dialog/src/main/java/com/rv/component/dialog/BottomPromptDialog.java
0 → 100644
View file @
493bec0a
package
com
.
rv
.
component
.
dialog
;
import
android.content.Context
;
import
android.support.annotation.NonNull
;
import
android.view.Gravity
;
import
android.view.ViewGroup
;
import
com.ruiwenliu.wrapper.dialog.BaseDialog
;
/**
* 提示
*/
public
class
BottomPromptDialog
extends
BaseDialog
{
public
BottomPromptDialog
(
@NonNull
Context
context
)
{
super
(
context
);
setDialogParams
(
ViewGroup
.
LayoutParams
.
MATCH_PARENT
,
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
,
Gravity
.
BOTTOM
);
}
@Override
public
int
getViewLayout
()
{
return
R
.
layout
.
dialog_prompt_bottom
;
}
}
component_dialog/src/main/java/com/rv/component/dialog/PaymentTypeSelection.java
View file @
493bec0a
...
@@ -13,7 +13,7 @@ public class PaymentTypeSelection extends BaseDialog {
...
@@ -13,7 +13,7 @@ public class PaymentTypeSelection extends BaseDialog {
public
PaymentTypeSelection
(
@NonNull
Context
context
)
{
public
PaymentTypeSelection
(
@NonNull
Context
context
)
{
super
(
context
);
super
(
context
);
setDialogParams
(
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
,
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
,
Gravity
.
BOTTOM
);
setDialogParams
(
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
,
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
,
Gravity
.
BOTTOM
);
findViewById
(
R
.
id
.
rb_alipay
).
setEnabled
(
fals
e
);
findViewById
(
R
.
id
.
iv_wx_select
).
setSelected
(
tru
e
);
}
}
@Override
@Override
...
...
component_dialog/src/main/res/layout/dialog_prompt_bottom.xml
0 → 100644
View file @
493bec0a
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:gravity=
"bottom"
android:orientation=
"vertical"
tools:ignore=
"MissingDefaultResource"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
<Button
android:id=
"@+id/btn1"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/colorWrite"
android:padding=
"13dp"
android:text=
""
android:textColor=
"@color/text_Main"
android:textSize=
"16sp"
/>
<include
layout=
"@layout/common_line"
/>
<Button
android:id=
"@+id/btn2"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/colorWrite"
android:padding=
"13dp"
android:text=
""
android:textColor=
"@color/text_Main"
android:textSize=
"16sp"
/>
<include
layout=
"@layout/common_line"
/>
<Button
android:id=
"@+id/btn3"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/colorWrite"
android:padding=
"13dp"
android:text=
""
android:textColor=
"@color/text_Main"
android:textSize=
"16sp"
/>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
component_dialog/src/main/res/layout/rv_dialog_paymant_type_selection.xml
View file @
493bec0a
...
@@ -74,12 +74,11 @@
...
@@ -74,12 +74,11 @@
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:layout_weight=
"1"
/>
android:layout_weight=
"1"
/>
<CheckBox
<ImageView
android:id=
"@+id/rb_wechat"
android:id=
"@+id/iv_wx_select"
android:layout_width=
"wrap_content"
android:layout_width=
"@dimen/size_16"
android:layout_height=
"wrap_content"
android:layout_height=
"@dimen/size_16"
android:checked=
"true"
android:src=
"@drawable/selector_rv_icon_mark"
/>
android:button=
"@drawable/selector_rv_check"
/>
</LinearLayout>
</LinearLayout>
...
@@ -112,11 +111,11 @@
...
@@ -112,11 +111,11 @@
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:layout_weight=
"1"
/>
android:layout_weight=
"1"
/>
<
CheckBox
<
ImageView
android:id=
"@+id/
rb_alipay
"
android:id=
"@+id/
iv_alipy_select
"
android:layout_width=
"
wrap_content
"
android:layout_width=
"
@dimen/size_16
"
android:layout_height=
"
wrap_content
"
android:layout_height=
"
@dimen/size_16
"
android:
button=
"@drawable/selector_rv_chec
k"
/>
android:
src=
"@drawable/selector_rv_icon_mar
k"
/>
</LinearLayout>
</LinearLayout>
<View
<View
...
...
module_hom
e/src/main/res/drawable-xhdpi/rv_map_shop.png
→
component_resourc
e/src/main/res/drawable-xhdpi/rv_map_shop.png
View file @
493bec0a
File moved
module_hom
e/src/main/res/drawable-xhdpi/rv_max_map_shop.png
→
component_resourc
e/src/main/res/drawable-xhdpi/rv_max_map_shop.png
View file @
493bec0a
File moved
module_camp/build.gradle
View file @
493bec0a
...
@@ -40,6 +40,7 @@ dependencies {
...
@@ -40,6 +40,7 @@ dependencies {
api
project
(
':RvWrapper'
)
api
project
(
':RvWrapper'
)
api
project
(
':component_control'
)
api
project
(
':component_control'
)
api
project
(
':component_resource'
)
api
project
(
':component_resource'
)
api
project
(
':component_dialog'
)
}
}
module_camp/src/main/java/com/rv/camp/CampFragment.java
View file @
493bec0a
...
@@ -28,6 +28,7 @@ import com.rv.camp.api.CampApi;
...
@@ -28,6 +28,7 @@ import com.rv.camp.api.CampApi;
import
com.rv.camp.bean.CampListBean
;
import
com.rv.camp.bean.CampListBean
;
import
com.rv.camp.bean.CampTypeBean
;
import
com.rv.camp.bean.CampTypeBean
;
import
com.rv.camp.camp.CampDetailActivity
;
import
com.rv.camp.camp.CampDetailActivity
;
import
com.rv.camp.camp.CampShopShowActivity
;
import
com.rv.camp.presenter.CampPresenter
;
import
com.rv.camp.presenter.CampPresenter
;
import
java.util.LinkedHashMap
;
import
java.util.LinkedHashMap
;
...
@@ -86,7 +87,7 @@ public class CampFragment extends BaseFragment<CampPresenter> implements BaseQui
...
@@ -86,7 +87,7 @@ public class CampFragment extends BaseFragment<CampPresenter> implements BaseQui
permissionProcess
();
permissionProcess
();
campAdapter
=
new
CampListAdapter
();
campAdapter
=
new
CampListAdapter
();
rvContent
.
setLayoutManager
(
new
GridLayoutManager
(
_mActivity
,
2
));
rvContent
.
setLayoutManager
(
new
GridLayoutManager
(
_mActivity
,
2
));
rvContent
.
addItemDecoration
(
new
AbSpacesItemDecoration
(
15
));
// 分割线。
rvContent
.
addItemDecoration
(
new
AbSpacesItemDecoration
(
20
,
10
));
// 分割线。
rvContent
.
setNestedScrollingEnabled
(
false
);
rvContent
.
setNestedScrollingEnabled
(
false
);
rvContent
.
setAdapter
(
campAdapter
);
rvContent
.
setAdapter
(
campAdapter
);
...
@@ -155,7 +156,7 @@ public class CampFragment extends BaseFragment<CampPresenter> implements BaseQui
...
@@ -155,7 +156,7 @@ public class CampFragment extends BaseFragment<CampPresenter> implements BaseQui
isOpen
=
!
isOpen
;
isOpen
=
!
isOpen
;
}
else
if
(
id
==
R
.
id
.
iv_camp_map
)
{
}
else
if
(
id
==
R
.
id
.
iv_camp_map
)
{
//地图
//地图
showToast
(
"亲,该功能还在开发中。。。"
);
startActivity
(
CampShopShowActivity
.
getIntent
(
_mActivity
)
);
}
else
if
(
id
==
R
.
id
.
v_shadow
)
{
}
else
if
(
id
==
R
.
id
.
v_shadow
)
{
rvType
.
setVisibility
(
View
.
GONE
);
rvType
.
setVisibility
(
View
.
GONE
);
vShadow
.
setVisibility
(
View
.
GONE
);
vShadow
.
setVisibility
(
View
.
GONE
);
...
@@ -296,20 +297,31 @@ public class CampFragment extends BaseFragment<CampPresenter> implements BaseQui
...
@@ -296,20 +297,31 @@ public class CampFragment extends BaseFragment<CampPresenter> implements BaseQui
}
}
public
class
AbSpacesItemDecoration
extends
RecyclerView
.
ItemDecoration
{
public
class
AbSpacesItemDecoration
extends
RecyclerView
.
ItemDecoration
{
private
int
space
;
private
int
left
;
private
int
right
;
public
AbSpacesItemDecoration
(
int
space
)
{
public
AbSpacesItemDecoration
(
int
left
,
int
right
)
{
this
.
space
=
space
;
this
.
left
=
left
;
this
.
right
=
right
;
}
}
@Override
@Override
public
void
getItemOffsets
(
Rect
outRect
,
View
view
,
RecyclerView
parent
,
RecyclerView
.
State
state
)
{
public
void
getItemOffsets
(
Rect
outRect
,
View
view
,
RecyclerView
parent
,
RecyclerView
.
State
state
)
{
outRect
.
left
=
space
;
int
childCount
=
parent
.
getChildCount
();
outRect
.
right
=
space
;
if
((
childCount
-
1
)
%
2
==
0
){
outRect
.
bottom
=
space
;
outRect
.
left
=
left
;
outRect
.
top
=
space
;
outRect
.
right
=
right
;
outRect
.
bottom
=
right
;
outRect
.
top
=
right
;
}
else
{
outRect
.
left
=
right
;
outRect
.
right
=
left
;
outRect
.
bottom
=
right
;
outRect
.
top
=
right
;
}
}
}
}
}
...
...
module_camp/src/main/java/com/rv/camp/adapter/CampListAdapter.java
View file @
493bec0a
...
@@ -18,7 +18,7 @@ public class CampListAdapter extends BaseQuickAdapter<CampListBean.DataBeanX.Dat
...
@@ -18,7 +18,7 @@ public class CampListAdapter extends BaseQuickAdapter<CampListBean.DataBeanX.Dat
}
}
@Override
@Override
protected
void
convert
(
BaseViewHolder
helper
,
final
CampListBean
.
DataBeanX
.
DataBean
item
)
{
protected
void
convert
(
BaseViewHolder
helper
,
final
CampListBean
.
DataBeanX
.
DataBean
item
)
{
GlideManager
.
getInstance
(
mContext
).
load
Image
(
item
.
getLogo
(),
(
ImageView
)
helper
.
getView
(
R
.
id
.
iv_icon
)
);
GlideManager
.
getInstance
(
mContext
).
load
RoundImage
(
item
.
getLogo
(),
(
ImageView
)
helper
.
getView
(
R
.
id
.
iv_icon
),
8
);
helper
.
setText
(
R
.
id
.
tv_type
,
item
.
getStoreTypeName
());
helper
.
setText
(
R
.
id
.
tv_type
,
item
.
getStoreTypeName
());
helper
.
setText
(
R
.
id
.
tv_name
,
item
.
getName
());
helper
.
setText
(
R
.
id
.
tv_name
,
item
.
getName
());
helper
.
setText
(
R
.
id
.
tv_city
,
item
.
getCityName
());
helper
.
setText
(
R
.
id
.
tv_city
,
item
.
getCityName
());
...
...
module_camp/src/main/java/com/rv/camp/bean/CampListBean.java
View file @
493bec0a
...
@@ -79,8 +79,10 @@ public class CampListBean extends BaseBean {
...
@@ -79,8 +79,10 @@ public class CampListBean extends BaseBean {
private
String
cityName
;
//": "广州市",
private
String
cityName
;
//": "广州市",
private
String
storeTypeName
;
//": "上海游", --->店铺类型
private
String
storeTypeName
;
//": "上海游", --->店铺类型
private
String
storeld
;
//": "1", ---->店铺类型id
private
String
storeld
;
//": "1", ---->店铺类型id
private
String
longitude
;
//": 116.308479,--->经度
private
double
longitude
;
//": 116.308479,--->经度
private
String
latitude
;
//": 39.983171---->纬度
private
double
latitude
;
//": 39.983171---->纬度
private
String
phone
;
private
String
address
;
public
String
getId
()
{
public
String
getId
()
{
...
@@ -147,21 +149,37 @@ public class CampListBean extends BaseBean {
...
@@ -147,21 +149,37 @@ public class CampListBean extends BaseBean {
this
.
storeld
=
storeld
;
this
.
storeld
=
storeld
;
}
}
public
String
getLongitude
()
{
public
double
getLongitude
()
{
return
longitude
;
return
longitude
;
}
}
public
void
setLongitude
(
String
longitude
)
{
public
void
setLongitude
(
double
longitude
)
{
this
.
longitude
=
longitude
;
this
.
longitude
=
longitude
;
}
}
public
String
getLatitude
()
{
public
double
getLatitude
()
{
return
latitude
;
return
latitude
;
}
}
public
void
setLatitude
(
String
latitude
)
{
public
void
setLatitude
(
double
latitude
)
{
this
.
latitude
=
latitude
;
this
.
latitude
=
latitude
;
}
}
public
String
getPhone
()
{
return
phone
;
}
public
void
setPhone
(
String
phone
)
{
this
.
phone
=
phone
;
}
public
String
getAddress
()
{
return
address
;
}
public
void
setAddress
(
String
address
)
{
this
.
address
=
address
;
}
}
}
}
}
}
}
module_camp/src/main/java/com/rv/camp/camp/CampShopShowActivity.java
0 → 100644
View file @
493bec0a
This diff is collapsed.
Click to expand it.
module_camp/src/main/res/layout/activity_camp.xml
View file @
493bec0a
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<LinearLayout
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=
"match_parent"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<LinearLayout
<LinearLayout
...
@@ -12,6 +13,13 @@
...
@@ -12,6 +13,13 @@
android:background=
"@color/colorWrite"
android:background=
"@color/colorWrite"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<com.ruiwenliu.wrapper.statusbar.StatusBarHeightView
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/colorWrite"
android:orientation=
"vertical"
app:use_type=
"use_padding_top"
>
<RelativeLayout
<RelativeLayout
android:background=
"@color/colorWrite"
android:background=
"@color/colorWrite"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
...
@@ -42,6 +50,8 @@
...
@@ -42,6 +50,8 @@
</RelativeLayout>
</RelativeLayout>
</com.ruiwenliu.wrapper.statusbar.StatusBarHeightView>
<include
layout=
"@layout/common_line"
/>
<include
layout=
"@layout/common_line"
/>
<RelativeLayout
<RelativeLayout
...
@@ -57,8 +67,6 @@
...
@@ -57,8 +67,6 @@
<android.support.v7.widget.RecyclerView
<android.support.v7.widget.RecyclerView
android:id=
"@+id/rv_content"
android:id=
"@+id/rv_content"
android:paddingLeft=
"@dimen/size_12"
android:paddingRight=
"@dimen/size_12"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
android:layout_height=
"match_parent"
/>
...
...
module_camp/src/main/res/layout/rv_item_camp_list.xml
View file @
493bec0a
...
@@ -7,12 +7,12 @@
...
@@ -7,12 +7,12 @@
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<RelativeLayout
<RelativeLayout
android:layout_width=
"
@dimen/size_150
"
android:layout_width=
"
match_parent
"
android:layout_height=
"@dimen/size_180"
>
android:layout_height=
"@dimen/size_180"
>
<ImageView
<ImageView
android:id=
"@+id/iv_icon"
android:id=
"@+id/iv_icon"
android:layout_width=
"
@dimen/size_150
"
android:layout_width=
"
match_parent
"
android:layout_height=
"@dimen/size_180"
android:layout_height=
"@dimen/size_180"
android:scaleType=
"centerCrop"
/>
android:scaleType=
"centerCrop"
/>
...
@@ -43,7 +43,6 @@
...
@@ -43,7 +43,6 @@
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/size_5"
android:layout_marginTop=
"@dimen/size_5"
android:layout_marginBottom=
"@dimen/size_10"
android:paddingLeft=
"@dimen/size_5"
android:paddingLeft=
"@dimen/size_5"
android:drawablePadding=
"@dimen/size_5"
android:drawablePadding=
"@dimen/size_5"
android:drawableLeft=
"@drawable/campsite_icon_citylocation"
android:drawableLeft=
"@drawable/campsite_icon_citylocation"
...
...
module_discovery/src/main/java/com/xxfc/discovery/adapter/DiscoveryRecommendAdapter.java
View file @
493bec0a
package
com
.
xxfc
.
discovery
.
adapter
;
package
com
.
xxfc
.
discovery
.
adapter
;
import
android.view.View
;
import
android.widget.ImageView
;
import
android.widget.ImageView
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.ruiwenliu.wrapper.util.glide.GlideManager
;
import
com.ruiwenliu.wrapper.util.glide.GlideManager
;
...
@@ -19,7 +17,6 @@ public class DiscoveryRecommendAdapter extends BaseQuickAdapter<DiscoveryRecomme
...
@@ -19,7 +17,6 @@ public class DiscoveryRecommendAdapter extends BaseQuickAdapter<DiscoveryRecomme
super
(
R
.
layout
.
rv_item_discovery_recommend
);
super
(
R
.
layout
.
rv_item_discovery_recommend
);
}
}
@Override
@Override
protected
void
convert
(
BaseViewHolder
helper
,
DiscoveryRecommendBean
.
DataBeanX
.
DataBean
item
)
{
protected
void
convert
(
BaseViewHolder
helper
,
DiscoveryRecommendBean
.
DataBeanX
.
DataBean
item
)
{
if
(
item
==
null
)
{
if
(
item
==
null
)
{
...
...
module_discovery/src/main/java/com/xxfc/discovery/fragment/PatFragment.java
View file @
493bec0a
...
@@ -4,6 +4,8 @@ import android.graphics.Rect;
...
@@ -4,6 +4,8 @@ import android.graphics.Rect;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.support.v7.widget.GridLayoutManager
;
import
android.support.v7.widget.GridLayoutManager
;
import
android.support.v7.widget.RecyclerView
;
import
android.support.v7.widget.RecyclerView
;
import
android.support.v7.widget.StaggeredGridLayoutManager
;
import
android.util.TypedValue
;
import
android.view.View
;
import
android.view.View
;
import
com.alibaba.android.arouter.launcher.ARouter
;
import
com.alibaba.android.arouter.launcher.ARouter
;
...
@@ -37,7 +39,7 @@ import io.reactivex.schedulers.Schedulers;
...
@@ -37,7 +39,7 @@ import io.reactivex.schedulers.Schedulers;
/**
/**
* 拍拍
* 拍拍
*/
*/
public
class
PatFragment
extends
BaseFragment
<
DiscoveryPresenter
>
implements
SimpleRefreshLayout
.
OnSimpleRefreshListener
{
public
class
PatFragment
extends
BaseFragment
<
DiscoveryPresenter
>
implements
SimpleRefreshLayout
.
OnSimpleRefreshListener
{
@BindView
(
R2
.
id
.
rv_content
)
@BindView
(
R2
.
id
.
rv_content
)
RecyclerView
rvContent
;
RecyclerView
rvContent
;
...
@@ -70,8 +72,25 @@ public class PatFragment extends BaseFragment<DiscoveryPresenter> implements Si
...
@@ -70,8 +72,25 @@ public class PatFragment extends BaseFragment<DiscoveryPresenter> implements Si
mSimpleRefreshLayout
.
setOnSimpleRefreshListener
(
this
);
mSimpleRefreshLayout
.
setOnSimpleRefreshListener
(
this
);
initRxbus
();
initRxbus
();
mAdapter
=
new
DiscoveryRecommendAdapter
();
mAdapter
=
new
DiscoveryRecommendAdapter
();
rvContent
.
setLayoutManager
(
new
GridLayoutManager
(
_mActivity
,
2
));
rvContent
.
addItemDecoration
(
new
AbSpacesItemDecoration
(
15
));
// 分割线。
StaggeredGridLayoutManager
staggeredGridLayoutManager
=
new
StaggeredGridLayoutManager
(
2
,
StaggeredGridLayoutManager
.
VERTICAL
);
rvContent
.
setItemAnimator
(
null
);
rvContent
.
addOnScrollListener
(
new
RecyclerView
.
OnScrollListener
()
{
@Override
public
void
onScrollStateChanged
(
RecyclerView
recyclerView
,
int
newState
)
{
super
.
onScrollStateChanged
(
recyclerView
,
newState
);
int
[]
first
=
new
int
[
2
];
staggeredGridLayoutManager
.
findFirstCompletelyVisibleItemPositions
(
first
);
if
(
newState
==
RecyclerView
.
SCROLL_STATE_IDLE
&&
(
first
[
0
]
==
1
||
first
[
1
]
==
1
))
{
recyclerView
.
invalidateItemDecorations
();
}
}
});
rvContent
.
setLayoutManager
(
staggeredGridLayoutManager
);
// rvContent.setLayoutManager(new GridLayoutManager(_mActivity, 2));
rvContent
.
addItemDecoration
(
new
AbSpacesItemDecoration
(
20
,
10
));
// 分割线。
rvContent
.
setAdapter
(
mAdapter
);
rvContent
.
setAdapter
(
mAdapter
);
mAdapter
.
bindToRecyclerView
(
rvContent
);
mAdapter
.
bindToRecyclerView
(
rvContent
);
mAdapter
.
setEnableLoadMore
(
true
);
mAdapter
.
setEnableLoadMore
(
true
);
...
@@ -92,7 +111,8 @@ public class PatFragment extends BaseFragment<DiscoveryPresenter> implements Si
...
@@ -92,7 +111,8 @@ public class PatFragment extends BaseFragment<DiscoveryPresenter> implements Si
});
});
mAdapter
.
setOnLoadMoreListener
(
new
BaseQuickAdapter
.
RequestLoadMoreListener
()
{
mAdapter
.
setOnLoadMoreListener
(
new
BaseQuickAdapter
.
RequestLoadMoreListener
()
{
@Override
public
void
onLoadMoreRequested
()
{
@Override
public
void
onLoadMoreRequested
()
{
if
(
rvContent
!=
null
)
{
if
(
rvContent
!=
null
)
{
rvContent
.
postDelayed
(
new
Runnable
()
{
rvContent
.
postDelayed
(
new
Runnable
()
{
@Override
@Override
...
@@ -110,14 +130,13 @@ public class PatFragment extends BaseFragment<DiscoveryPresenter> implements Si
...
@@ -110,14 +130,13 @@ public class PatFragment extends BaseFragment<DiscoveryPresenter> implements Si
},
rvContent
);
},
rvContent
);
mAdapter
.
setOnItemChildClickListener
(
new
BaseQuickAdapter
.
OnItemChildClickListener
()
{
mAdapter
.
setOnItemChildClickListener
(
new
BaseQuickAdapter
.
OnItemChildClickListener
()
{
@Override
@Override
public
void
onItemChildClick
(
BaseQuickAdapter
adapter
,
View
view
,
int
position
)
{
public
void
onItemChildClick
(
BaseQuickAdapter
adapter
,
View
view
,
int
position
)
{
itemDatabean
=
(
DiscoveryRecommendBean
.
DataBeanX
.
DataBean
)
adapter
.
getItem
(
position
);
itemDatabean
=
(
DiscoveryRecommendBean
.
DataBeanX
.
DataBean
)
adapter
.
getItem
(
position
);
int
id
=
view
.
getId
();
int
id
=
view
.
getId
();
if
(
id
==
R
.
id
.
ll_item_islike
){
if
(
id
==
R
.
id
.
ll_item_islike
)
{
isLike
();
isLike
();
}
}
}
}
});
});
...
@@ -126,8 +145,8 @@ public class PatFragment extends BaseFragment<DiscoveryPresenter> implements Si
...
@@ -126,8 +145,8 @@ public class PatFragment extends BaseFragment<DiscoveryPresenter> implements Si
private
void
isLike
()
{
private
void
isLike
()
{
if
(
OkGoUtil
.
getToken
()
!=
null
)
{
if
(
OkGoUtil
.
getToken
()
!=
null
)
{
Map
<
String
,
Object
>
headMap
=
new
LinkedHashMap
<>();
Map
<
String
,
Object
>
headMap
=
new
LinkedHashMap
<>();
headMap
.
put
(
"Authorization"
,
OkGoUtil
.
getToken
());
headMap
.
put
(
"Authorization"
,
OkGoUtil
.
getToken
());
mPresenter
.
postData
(
RvFrameConfig
.
HOST
,
2
,
DiscoveryApi
.
DISCOVERY_IM_LOGIN
,
DiscoveryIMTokenBean
.
class
,
headMap
,
headMap
,
true
);
mPresenter
.
postData
(
RvFrameConfig
.
HOST
,
2
,
DiscoveryApi
.
DISCOVERY_IM_LOGIN
,
DiscoveryIMTokenBean
.
class
,
headMap
,
headMap
,
true
);
}
}
}
}
...
@@ -168,13 +187,13 @@ public class PatFragment extends BaseFragment<DiscoveryPresenter> implements Si
...
@@ -168,13 +187,13 @@ public class PatFragment extends BaseFragment<DiscoveryPresenter> implements Si
Map
<
String
,
Object
>
map
=
new
LinkedHashMap
<>();
Map
<
String
,
Object
>
map
=
new
LinkedHashMap
<>();
map
.
put
(
"page"
,
page
);
map
.
put
(
"page"
,
page
);
map
.
put
(
"type"
,
2
);
map
.
put
(
"type"
,
2
);
mPresenter
.
postData
(
RvFrameConfig
.
HOST
,
0
,
DiscoveryApi
.
DISCOVERY_UNAUTH_LIST
,
DiscoveryRecommendBean
.
class
,
map
,
headMap
,
page
==
1
?
false
:
false
);
mPresenter
.
postData
(
RvFrameConfig
.
HOST
,
0
,
DiscoveryApi
.
DISCOVERY_UNAUTH_LIST
,
DiscoveryRecommendBean
.
class
,
map
,
headMap
,
page
==
1
?
false
:
false
);
}
}
@Override
@Override
public
void
onShowResult
(
int
requestType
,
BaseBean
result
)
{
public
void
onShowResult
(
int
requestType
,
BaseBean
result
)
{
mSimpleRefreshLayout
.
onRefreshComplete
();
mSimpleRefreshLayout
.
onRefreshComplete
();
switch
(
requestType
){
switch
(
requestType
)
{
case
0
:
case
0
:
processData
((
DiscoveryRecommendBean
)
result
);
processData
((
DiscoveryRecommendBean
)
result
);
break
;
break
;
...
@@ -195,14 +214,14 @@ public class PatFragment extends BaseFragment<DiscoveryPresenter> implements Si
...
@@ -195,14 +214,14 @@ public class PatFragment extends BaseFragment<DiscoveryPresenter> implements Si
private
void
setIMData
(
DiscoveryIMTokenBean
bean
)
{
private
void
setIMData
(
DiscoveryIMTokenBean
bean
)
{
if
(
"0"
.
equals
(
itemDatabean
.
getIsPraise
()))
{
//0:未点赞 1:已点赞
if
(
"0"
.
equals
(
itemDatabean
.
getIsPraise
()))
{
//0:未点赞 1:已点赞
Map
<
String
,
Object
>
map
=
new
LinkedHashMap
<>();
Map
<
String
,
Object
>
map
=
new
LinkedHashMap
<>();
map
.
put
(
"access_token"
,
bean
.
getData
());
map
.
put
(
"access_token"
,
bean
.
getData
());
map
.
put
(
"messageId"
,
itemDatabean
.
getMsgId
());
map
.
put
(
"messageId"
,
itemDatabean
.
getMsgId
());
mPresenter
.
postData
(
3
,
DiscoveryApi
.
DISCOVERY_PRAISE_ADD
,
BaseBean
.
class
,
map
,
true
);
mPresenter
.
postData
(
3
,
DiscoveryApi
.
DISCOVERY_PRAISE_ADD
,
BaseBean
.
class
,
map
,
true
);
}
else
{
}
else
{
Map
<
String
,
Object
>
map
=
new
LinkedHashMap
<>();
Map
<
String
,
Object
>
map
=
new
LinkedHashMap
<>();
map
.
put
(
"access_token"
,
bean
.
getData
());
map
.
put
(
"access_token"
,
bean
.
getData
());
map
.
put
(
"messageId"
,
itemDatabean
.
getMsgId
());
map
.
put
(
"messageId"
,
itemDatabean
.
getMsgId
());
mPresenter
.
postData
(
4
,
DiscoveryApi
.
DISCOVERY_PRAISE_DELETE
,
BaseBean
.
class
,
map
,
true
);
mPresenter
.
postData
(
4
,
DiscoveryApi
.
DISCOVERY_PRAISE_DELETE
,
BaseBean
.
class
,
map
,
true
);
}
}
}
}
...
@@ -239,18 +258,29 @@ public class PatFragment extends BaseFragment<DiscoveryPresenter> implements Si
...
@@ -239,18 +258,29 @@ public class PatFragment extends BaseFragment<DiscoveryPresenter> implements Si
public
class
AbSpacesItemDecoration
extends
RecyclerView
.
ItemDecoration
{
public
class
AbSpacesItemDecoration
extends
RecyclerView
.
ItemDecoration
{
private
int
space
;
private
int
left
;
private
int
right
;
public
AbSpacesItemDecoration
(
int
space
)
{
public
AbSpacesItemDecoration
(
int
left
,
int
right
)
{
this
.
space
=
space
;
this
.
left
=
left
;
this
.
right
=
right
;
}
}
@Override
@Override
public
void
getItemOffsets
(
Rect
outRect
,
View
view
,
RecyclerView
parent
,
RecyclerView
.
State
state
)
{
public
void
getItemOffsets
(
Rect
outRect
,
View
view
,
RecyclerView
parent
,
RecyclerView
.
State
state
)
{
outRect
.
left
=
space
;
int
position
=
parent
.
getChildAdapterPosition
(
view
);
outRect
.
right
=
space
;
StaggeredGridLayoutManager
.
LayoutParams
lp
=
(
StaggeredGridLayoutManager
.
LayoutParams
)
view
.
getLayoutParams
();
outRect
.
bottom
=
space
;
outRect
.
top
=
space
;
if
(
lp
.
getSpanIndex
()
%
2
==
0
)
{
outRect
.
left
=
left
;
outRect
.
right
=
right
;
}
else
{
outRect
.
left
=
right
;
outRect
.
right
=
left
;
}
outRect
.
top
=
left
;
}
}
}
}
}
}
module_discovery/src/main/java/com/xxfc/discovery/fragment/RecommendFragment.java
View file @
493bec0a
...
@@ -4,6 +4,7 @@ import android.graphics.Rect;
...
@@ -4,6 +4,7 @@ import android.graphics.Rect;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.support.v7.widget.GridLayoutManager
;
import
android.support.v7.widget.GridLayoutManager
;
import
android.support.v7.widget.RecyclerView
;
import
android.support.v7.widget.RecyclerView
;
import
android.support.v7.widget.StaggeredGridLayoutManager
;
import
android.view.View
;
import
android.view.View
;
import
com.alibaba.android.arouter.launcher.ARouter
;
import
com.alibaba.android.arouter.launcher.ARouter
;
...
@@ -18,6 +19,7 @@ import com.xxfc.discovery.R;
...
@@ -18,6 +19,7 @@ import com.xxfc.discovery.R;
import
com.xxfc.discovery.R2
;
import
com.xxfc.discovery.R2
;
import
com.xxfc.discovery.adapter.DiscoveryRecommendAdapter
;
import
com.xxfc.discovery.adapter.DiscoveryRecommendAdapter
;
import
com.xxfc.discovery.api.DiscoveryApi
;
import
com.xxfc.discovery.api.DiscoveryApi
;
import
com.xxfc.discovery.bean.DiscoveryIMTokenBean
;
import
com.xxfc.discovery.bean.DiscoveryRecommendBean
;
import
com.xxfc.discovery.bean.DiscoveryRecommendBean
;
import
com.xxfc.discovery.presenter.DiscoveryPresenter
;
import
com.xxfc.discovery.presenter.DiscoveryPresenter
;
import
com.yuyife.okgo.OkGoUtil
;
import
com.yuyife.okgo.OkGoUtil
;
...
@@ -41,6 +43,8 @@ public class RecommendFragment extends BaseFragment<DiscoveryPresenter> implemen
...
@@ -41,6 +43,8 @@ public class RecommendFragment extends BaseFragment<DiscoveryPresenter> implemen
private
int
countPage
;
private
int
countPage
;
private
int
mPage
;
private
int
mPage
;
private
DiscoveryRecommendBean
.
DataBeanX
.
DataBean
itemDatabean
;
public
static
RecommendFragment
getInstance
(
int
type
)
{
public
static
RecommendFragment
getInstance
(
int
type
)
{
Bundle
bundl
=
new
Bundle
();
Bundle
bundl
=
new
Bundle
();
bundl
.
putInt
(
"type"
,
type
);
bundl
.
putInt
(
"type"
,
type
);
...
@@ -59,8 +63,24 @@ public class RecommendFragment extends BaseFragment<DiscoveryPresenter> implemen
...
@@ -59,8 +63,24 @@ public class RecommendFragment extends BaseFragment<DiscoveryPresenter> implemen
mSimpleRefreshLayout
.
setHeaderView
(
new
SimpleRefreshView
(
_mActivity
));
mSimpleRefreshLayout
.
setHeaderView
(
new
SimpleRefreshView
(
_mActivity
));
mSimpleRefreshLayout
.
setOnSimpleRefreshListener
(
this
);
mSimpleRefreshLayout
.
setOnSimpleRefreshListener
(
this
);
mRecommendAdapter
=
new
DiscoveryRecommendAdapter
();
mRecommendAdapter
=
new
DiscoveryRecommendAdapter
();
rvContent
.
setLayoutManager
(
new
GridLayoutManager
(
_mActivity
,
2
));
rvContent
.
addItemDecoration
(
new
AbSpacesItemDecoration
(
15
));
// 分割线。
StaggeredGridLayoutManager
staggeredGridLayoutManager
=
new
StaggeredGridLayoutManager
(
2
,
StaggeredGridLayoutManager
.
VERTICAL
);
rvContent
.
setItemAnimator
(
null
);
rvContent
.
addOnScrollListener
(
new
RecyclerView
.
OnScrollListener
()
{
@Override
public
void
onScrollStateChanged
(
RecyclerView
recyclerView
,
int
newState
)
{
super
.
onScrollStateChanged
(
recyclerView
,
newState
);
int
[]
first
=
new
int
[
2
];
staggeredGridLayoutManager
.
findFirstCompletelyVisibleItemPositions
(
first
);
if
(
newState
==
RecyclerView
.
SCROLL_STATE_IDLE
&&
(
first
[
0
]
==
1
||
first
[
1
]
==
1
))
{
recyclerView
.
invalidateItemDecorations
();
}
}
});
rvContent
.
setLayoutManager
(
staggeredGridLayoutManager
);
rvContent
.
addItemDecoration
(
new
AbSpacesItemDecoration
(
20
,
10
));
// 分割线。
rvContent
.
setAdapter
(
mRecommendAdapter
);
rvContent
.
setAdapter
(
mRecommendAdapter
);
mRecommendAdapter
.
bindToRecyclerView
(
rvContent
);
mRecommendAdapter
.
bindToRecyclerView
(
rvContent
);
mRecommendAdapter
.
setEnableLoadMore
(
true
);
mRecommendAdapter
.
setEnableLoadMore
(
true
);
...
@@ -111,7 +131,27 @@ public class RecommendFragment extends BaseFragment<DiscoveryPresenter> implemen
...
@@ -111,7 +131,27 @@ public class RecommendFragment extends BaseFragment<DiscoveryPresenter> implemen
}
}
},
rvContent
);
},
rvContent
);
mRecommendAdapter
.
setOnItemChildClickListener
(
new
BaseQuickAdapter
.
OnItemChildClickListener
()
{
@Override
public
void
onItemChildClick
(
BaseQuickAdapter
adapter
,
View
view
,
int
position
)
{
itemDatabean
=
(
DiscoveryRecommendBean
.
DataBeanX
.
DataBean
)
adapter
.
getItem
(
position
);
int
id
=
view
.
getId
();
if
(
id
==
R
.
id
.
ll_item_islike
){
isLike
();
}
}
});
}
private
void
isLike
()
{
if
(
OkGoUtil
.
getToken
()
!=
null
)
{
Map
<
String
,
Object
>
headMap
=
new
LinkedHashMap
<>();
headMap
.
put
(
"Authorization"
,
OkGoUtil
.
getToken
());
mPresenter
.
postData
(
RvFrameConfig
.
HOST
,
2
,
DiscoveryApi
.
DISCOVERY_IM_LOGIN
,
DiscoveryIMTokenBean
.
class
,
headMap
,
headMap
,
true
);
}
}
}
...
@@ -142,9 +182,38 @@ public class RecommendFragment extends BaseFragment<DiscoveryPresenter> implemen
...
@@ -142,9 +182,38 @@ public class RecommendFragment extends BaseFragment<DiscoveryPresenter> implemen
@Override
@Override
public
void
onShowResult
(
int
requestType
,
BaseBean
result
)
{
public
void
onShowResult
(
int
requestType
,
BaseBean
result
)
{
mSimpleRefreshLayout
.
onRefreshComplete
();
mSimpleRefreshLayout
.
onRefreshComplete
();
processData
((
DiscoveryRecommendBean
)
result
);
switch
(
requestType
){
case
0
:
processData
((
DiscoveryRecommendBean
)
result
);
break
;
case
2
:
DiscoveryIMTokenBean
intokenBean
=
(
DiscoveryIMTokenBean
)
result
;
setIMData
(
intokenBean
);
break
;
case
3
:
onFresh
();
break
;
case
4
:
onFresh
();
break
;
}
}
}
private
void
setIMData
(
DiscoveryIMTokenBean
bean
)
{
if
(
"0"
.
equals
(
itemDatabean
.
getIsPraise
()))
{
//0:未点赞 1:已点赞
Map
<
String
,
Object
>
map
=
new
LinkedHashMap
<>();
map
.
put
(
"access_token"
,
bean
.
getData
());
map
.
put
(
"messageId"
,
itemDatabean
.
getMsgId
());
mPresenter
.
postData
(
3
,
DiscoveryApi
.
DISCOVERY_PRAISE_ADD
,
BaseBean
.
class
,
map
,
true
);
}
else
{
Map
<
String
,
Object
>
map
=
new
LinkedHashMap
<>();
map
.
put
(
"access_token"
,
bean
.
getData
());
map
.
put
(
"messageId"
,
itemDatabean
.
getMsgId
());
mPresenter
.
postData
(
4
,
DiscoveryApi
.
DISCOVERY_PRAISE_DELETE
,
BaseBean
.
class
,
map
,
true
);
}
}
private
void
processData
(
DiscoveryRecommendBean
bean
)
{
private
void
processData
(
DiscoveryRecommendBean
bean
)
{
if
(
mPage
==
1
)
{
if
(
mPage
==
1
)
{
countPage
=
bean
.
getData
().
getTotalPage
();
countPage
=
bean
.
getData
().
getTotalPage
();
...
@@ -177,20 +246,27 @@ public class RecommendFragment extends BaseFragment<DiscoveryPresenter> implemen
...
@@ -177,20 +246,27 @@ public class RecommendFragment extends BaseFragment<DiscoveryPresenter> implemen
public
class
AbSpacesItemDecoration
extends
RecyclerView
.
ItemDecoration
{
public
class
AbSpacesItemDecoration
extends
RecyclerView
.
ItemDecoration
{
private
int
space
;
private
int
left
;
private
int
right
;
public
AbSpacesItemDecoration
(
int
space
)
{
public
AbSpacesItemDecoration
(
int
left
,
int
right
)
{
this
.
space
=
space
;
this
.
left
=
left
;
this
.
right
=
right
;
}
}
@Override
@Override
public
void
getItemOffsets
(
Rect
outRect
,
View
view
,
RecyclerView
parent
,
RecyclerView
.
State
state
)
{
public
void
getItemOffsets
(
Rect
outRect
,
View
view
,
RecyclerView
parent
,
RecyclerView
.
State
state
)
{
int
childCount
=
parent
.
getChildCount
();
int
position
=
parent
.
getChildAdapterPosition
(
view
);
outRect
.
left
=
space
;
StaggeredGridLayoutManager
.
LayoutParams
lp
=
(
StaggeredGridLayoutManager
.
LayoutParams
)
view
.
getLayoutParams
();
outRect
.
right
=
space
;
outRect
.
bottom
=
space
;
if
(
lp
.
getSpanIndex
()
%
2
==
0
)
{
outRect
.
top
=
space
;
outRect
.
left
=
left
;
outRect
.
right
=
right
;
}
else
{
outRect
.
left
=
right
;
outRect
.
right
=
left
;
}
outRect
.
top
=
left
;
}
}
}
}
}
}
module_discovery/src/main/java/com/xxfc/discovery/other/PostPatActivity.java
View file @
493bec0a
...
@@ -33,11 +33,14 @@ import com.frame.rv.config.RvFrameConfig;
...
@@ -33,11 +33,14 @@ import com.frame.rv.config.RvFrameConfig;
import
com.ruiwenliu.wrapper.base.BaseBean
;
import
com.ruiwenliu.wrapper.base.BaseBean
;
import
com.ruiwenliu.wrapper.base.BaseStatusActivity
;
import
com.ruiwenliu.wrapper.base.BaseStatusActivity
;
import
com.ruiwenliu.wrapper.util.LocationManager
;
import
com.ruiwenliu.wrapper.util.LocationManager
;
import
com.ruiwenliu.wrapper.util.MapUtil
;
import
com.ruiwenliu.wrapper.util.ViewHolder
;
import
com.ruiwenliu.wrapper.util.glide.GlideManager
;
import
com.ruiwenliu.wrapper.util.glide.GlideManager
;
import
com.ruiwenliu.wrapper.util.permission.RxPermission
;
import
com.ruiwenliu.wrapper.util.permission.RxPermission
;
import
com.ruiwenliu.wrapper.weight.TitleView
;
import
com.ruiwenliu.wrapper.weight.TitleView
;
import
com.rv.component.control.MyGridView
;
import
com.rv.component.control.MyGridView
;
import
com.rv.component.control.SquareCenterImageView
;
import
com.rv.component.control.SquareCenterImageView
;
import
com.rv.component.dialog.BottomPromptDialog
;
import
com.rv.component.utils.DateUtils
;
import
com.rv.component.utils.DateUtils
;
import
com.rv.component.utils.Inc
;
import
com.rv.component.utils.Inc
;
import
com.xxfc.discovery.R
;
import
com.xxfc.discovery.R
;
...
@@ -124,13 +127,12 @@ public class PostPatActivity extends BaseStatusActivity<DiscoveryPresenter> {
...
@@ -124,13 +127,12 @@ public class PostPatActivity extends BaseStatusActivity<DiscoveryPresenter> {
if
(
viewType
==
1
)
{
if
(
viewType
==
1
)
{
showSelectPictureDialog
();
showSelectPictureDialog
();
}
else
{
}
else
{
//
showPictureActionDialog(position);
showPictureActionDialog
(
position
);
}
}
}
}
});
});
}
}
@Override
@Override
public
void
onShowResult
(
int
requestType
,
BaseBean
result
)
{
public
void
onShowResult
(
int
requestType
,
BaseBean
result
)
{
switch
(
requestType
){
switch
(
requestType
){
...
@@ -240,6 +242,34 @@ public class PostPatActivity extends BaseStatusActivity<DiscoveryPresenter> {
...
@@ -240,6 +242,34 @@ public class PostPatActivity extends BaseStatusActivity<DiscoveryPresenter> {
mPresenter
.
postBodyData
(
RvFrameConfig
.
VEHICLE_UPLOAD
,
0
,
DiscoveryApi
.
HTTP_URL_FILE_UPLOADS
,
DiscoveryUploadImageBean
.
class
,
new
Image
(
"app"
,
imags
),
true
);
mPresenter
.
postBodyData
(
RvFrameConfig
.
VEHICLE_UPLOAD
,
0
,
DiscoveryApi
.
HTTP_URL_FILE_UPLOADS
,
DiscoveryUploadImageBean
.
class
,
new
Image
(
"app"
,
imags
),
true
);
}
}
private
void
showPictureActionDialog
(
int
position
)
{
new
BottomPromptDialog
(
mActivity
)
{
@Override
public
void
helper
(
ViewHolder
helper
)
{
super
.
helper
(
helper
);
helper
.
setText
(
R
.
id
.
btn1
,
"删除"
);
helper
.
setText
(
R
.
id
.
btn2
,
"取消"
);
helper
.
setVisible
(
R
.
id
.
btn3
,
false
);
helper
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
int
i
=
v
.
getId
();
if
(
i
==
R
.
id
.
btn1
)
{
mPhotoList
.
remove
(
position
);
mAdapter
.
notifyDataSetInvalidated
();
dismiss
();
}
else
if
(
i
==
R
.
id
.
btn2
)
{
dismiss
();
}
}
},
R
.
id
.
btn1
,
R
.
id
.
btn2
);
}
}.
show
();
}
private
void
showSelectPictureDialog
()
{
private
void
showSelectPictureDialog
()
{
String
[]
items
=
new
String
[]{
"拍照"
,
"相片"
};
String
[]
items
=
new
String
[]{
"拍照"
,
"相片"
};
AlertDialog
.
Builder
builder
=
new
AlertDialog
.
Builder
(
this
).
setSingleChoiceItems
(
items
,
0
,
AlertDialog
.
Builder
builder
=
new
AlertDialog
.
Builder
(
this
).
setSingleChoiceItems
(
items
,
0
,
...
...
module_discovery/src/main/res/layout/fragment_discovery.xml
View file @
493bec0a
...
@@ -3,9 +3,16 @@
...
@@ -3,9 +3,16 @@
xmlns:tools=
"http://schemas.android.com/tools"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:orientation=
"vertical"
android:orientation=
"vertical"
tools:context=
".DiscoveryFragment"
>
tools:context=
".DiscoveryFragment"
>
<com.ruiwenliu.wrapper.statusbar.StatusBarHeightView
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
app:use_type=
"use_padding_top"
>
<LinearLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
...
@@ -36,7 +43,7 @@
...
@@ -36,7 +43,7 @@
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</com.ruiwenliu.wrapper.statusbar.StatusBarHeightView>
<include
layout=
"@layout/common_line"
/>
<include
layout=
"@layout/common_line"
/>
...
...
module_discovery/src/main/res/layout/rv_item_discovery_recommend.xml
View file @
493bec0a
...
@@ -13,12 +13,12 @@
...
@@ -13,12 +13,12 @@
<RelativeLayout
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"
@dimen/size_180
"
>
android:layout_height=
"
wrap_content
"
>
<ImageView
<ImageView
android:id=
"@+id/iv_icon"
android:id=
"@+id/iv_icon"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"
@dimen/size_180
"
android:layout_height=
"
wrap_content
"
android:scaleType=
"centerCrop"
/>
android:scaleType=
"centerCrop"
/>
<ImageView
<ImageView
...
...
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/ConfirmOrderActivity.java
View file @
493bec0a
...
@@ -161,7 +161,7 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
...
@@ -161,7 +161,7 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
private
OrderPriceDetailPw
detailPw
;
//显示订单价格明细弹窗
private
OrderPriceDetailPw
detailPw
;
//显示订单价格明细弹窗
private
OrderPriceDetailBean
orderPriceDetailBean
;
//订单价格明细实体类
private
OrderPriceDetailBean
orderPriceDetailBean
;
//订单价格明细实体类
private
IWXAPI
api
;
private
IWXAPI
api
;
private
int
payType
;
//选择支付类型
private
int
payType
=
1
;
//选择支付类型
private
OrderPriceBean
priceBean
;
private
OrderPriceBean
priceBean
;
BeanUserInfo
.
UserInfo
info
=
null
;
BeanUserInfo
.
UserInfo
info
=
null
;
private
int
deductiblePriceType
;
private
int
deductiblePriceType
;
...
@@ -467,13 +467,12 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
...
@@ -467,13 +467,12 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
dismiss
();
dismiss
();
}
else
if
(
i
==
R
.
id
.
ll_item_wechat
)
{
}
else
if
(
i
==
R
.
id
.
ll_item_wechat
)
{
payType
=
1
;
payType
=
1
;
helper
.
setChecked
(
R
.
id
.
rb_wechat
,
true
);
helper
.
getView
(
R
.
id
.
iv_wx_select
).
setSelected
(
true
);
helper
.
setChecked
(
R
.
id
.
rb_alipay
,
false
);
helper
.
getView
(
R
.
id
.
iv_alipy_select
).
setSelected
(
false
);
}
else
if
(
i
==
R
.
id
.
ll_item_alipay
)
{
}
else
if
(
i
==
R
.
id
.
ll_item_alipay
)
{
payType
=
2
;
payType
=
2
;
helper
.
setChecked
(
R
.
id
.
rb_wechat
,
false
);
helper
.
getView
(
R
.
id
.
iv_wx_select
).
setSelected
(
false
);
helper
.
setChecked
(
R
.
id
.
rb_alipay
,
true
);
helper
.
getView
(
R
.
id
.
iv_alipy_select
).
setSelected
(
true
);
}
else
if
(
i
==
R
.
id
.
tv_pay_immediately
)
{
}
else
if
(
i
==
R
.
id
.
tv_pay_immediately
)
{
dismiss
();
dismiss
();
createOrder
(
1
);
createOrder
(
1
);
...
...
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/HomeFragment.java
View file @
493bec0a
...
@@ -140,8 +140,6 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
...
@@ -140,8 +140,6 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
ImageView
travelServerImage
;
ImageView
travelServerImage
;
@BindView
(
R2
.
id
.
tv_rv_city
)
@BindView
(
R2
.
id
.
tv_rv_city
)
TextView
tvRvCity
;
TextView
tvRvCity
;
@BindView
(
R2
.
id
.
tv_book_now
)
TextView
tvBookNow
;
@BindView
(
R2
.
id
.
tv_rv_hot_label1
)
@BindView
(
R2
.
id
.
tv_rv_hot_label1
)
TextView
tvRvHotLabel1
;
TextView
tvRvHotLabel1
;
@BindView
(
R2
.
id
.
tv_rv_hot_label2
)
@BindView
(
R2
.
id
.
tv_rv_hot_label2
)
...
...
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/order/AllOrderFragment.java
View file @
493bec0a
...
@@ -49,6 +49,7 @@ public class AllOrderFragment extends BaseFragment<CommonPresenter> implements B
...
@@ -49,6 +49,7 @@ public class AllOrderFragment extends BaseFragment<CommonPresenter> implements B
private
int
mPage
;
private
int
mPage
;
private
int
countPage
;
private
int
countPage
;
private
IWXAPI
api
;
private
IWXAPI
api
;
private
int
payType
=
1
;
//选择支付类型
public
static
AllOrderFragment
getInstance
(
int
type
)
{
public
static
AllOrderFragment
getInstance
(
int
type
)
{
Bundle
bundl
=
new
Bundle
();
Bundle
bundl
=
new
Bundle
();
...
@@ -215,10 +216,14 @@ public class AllOrderFragment extends BaseFragment<CommonPresenter> implements B
...
@@ -215,10 +216,14 @@ public class AllOrderFragment extends BaseFragment<CommonPresenter> implements B
if
(
id
==
R
.
id
.
iv_close
)
{
if
(
id
==
R
.
id
.
iv_close
)
{
dismiss
();
dismiss
();
}
else
if
(
id
==
R
.
id
.
ll_item_wechat
)
{
}
else
if
(
id
==
R
.
id
.
ll_item_wechat
)
{
helper
.
setChecked
(
R
.
id
.
rb_wechat
,
true
);
payType
=
1
;
helper
.
setChecked
(
R
.
id
.
rb_alipay
,
false
);
helper
.
getView
(
R
.
id
.
iv_wx_select
).
setSelected
(
true
);
helper
.
getView
(
R
.
id
.
iv_alipy_select
).
setSelected
(
false
);
}
else
if
(
id
==
R
.
id
.
ll_item_alipay
)
{
}
else
if
(
id
==
R
.
id
.
ll_item_alipay
)
{
showToast
(
"该功能还没有开通!"
);
payType
=
2
;
helper
.
getView
(
R
.
id
.
iv_wx_select
).
setSelected
(
false
);
helper
.
getView
(
R
.
id
.
iv_alipy_select
).
setSelected
(
true
);
}
else
if
(
id
==
R
.
id
.
tv_pay_immediately
)
{
}
else
if
(
id
==
R
.
id
.
tv_pay_immediately
)
{
dismiss
();
dismiss
();
createOrder
(
no
,
1
,
1
);
createOrder
(
no
,
1
,
1
);
...
...
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/order/ForPaymentFragment.java
View file @
493bec0a
...
@@ -67,7 +67,7 @@ public class ForPaymentFragment extends BaseFragment<CommonPresenter> implements
...
@@ -67,7 +67,7 @@ public class ForPaymentFragment extends BaseFragment<CommonPresenter> implements
private
int
mPage
;
private
int
mPage
;
private
int
countPage
;
private
int
countPage
;
private
IWXAPI
api
;
private
IWXAPI
api
;
private
int
payType
;
//选择支付类型
private
int
payType
=
1
;
//选择支付类型
private
static
final
int
SDK_ALI_PAY_FLAG
=
11
;
private
static
final
int
SDK_ALI_PAY_FLAG
=
11
;
...
@@ -265,12 +265,12 @@ public class ForPaymentFragment extends BaseFragment<CommonPresenter> implements
...
@@ -265,12 +265,12 @@ public class ForPaymentFragment extends BaseFragment<CommonPresenter> implements
dismiss
();
dismiss
();
}
else
if
(
id
==
R
.
id
.
ll_item_wechat
)
{
}
else
if
(
id
==
R
.
id
.
ll_item_wechat
)
{
payType
=
1
;
payType
=
1
;
helper
.
setChecked
(
R
.
id
.
rb_wechat
,
true
);
helper
.
getView
(
R
.
id
.
iv_wx_select
).
setSelected
(
true
);
helper
.
setChecked
(
R
.
id
.
rb_alipay
,
false
);
helper
.
getView
(
R
.
id
.
iv_alipy_select
).
setSelected
(
false
);
}
else
if
(
id
==
R
.
id
.
ll_item_alipay
)
{
}
else
if
(
id
==
R
.
id
.
ll_item_alipay
)
{
payType
=
2
;
payType
=
2
;
helper
.
setChecked
(
R
.
id
.
rb_wechat
,
false
);
helper
.
getView
(
R
.
id
.
iv_wx_select
).
setSelected
(
false
);
helper
.
setChecked
(
R
.
id
.
rb_alipay
,
true
);
helper
.
getView
(
R
.
id
.
iv_alipy_select
).
setSelected
(
true
);
}
else
if
(
id
==
R
.
id
.
tv_pay_immediately
)
{
}
else
if
(
id
==
R
.
id
.
tv_pay_immediately
)
{
dismiss
();
dismiss
();
createOrder
(
no
);
createOrder
(
no
);
...
...
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/order/MemberOrderDetailsActivity.java
View file @
493bec0a
...
@@ -281,10 +281,13 @@ public class MemberOrderDetailsActivity extends BaseStatusActivity<PickerPresent
...
@@ -281,10 +281,13 @@ public class MemberOrderDetailsActivity extends BaseStatusActivity<PickerPresent
if
(
id
==
R
.
id
.
iv_close
)
{
if
(
id
==
R
.
id
.
iv_close
)
{
dismiss
();
dismiss
();
}
else
if
(
id
==
R
.
id
.
ll_item_wechat
)
{
}
else
if
(
id
==
R
.
id
.
ll_item_wechat
)
{
helper
.
setChecked
(
R
.
id
.
rb_wechat
,
true
);
// payType = 1;
helper
.
setChecked
(
R
.
id
.
rb_alipay
,
false
);
helper
.
getView
(
R
.
id
.
iv_wx_select
).
setSelected
(
true
);
helper
.
getView
(
R
.
id
.
iv_alipy_select
).
setSelected
(
false
);
}
else
if
(
id
==
R
.
id
.
ll_item_alipay
)
{
}
else
if
(
id
==
R
.
id
.
ll_item_alipay
)
{
showToast
(
"该功能还没有开通!"
);
// payType = 2;
helper
.
getView
(
R
.
id
.
iv_wx_select
).
setSelected
(
false
);
helper
.
getView
(
R
.
id
.
iv_alipy_select
).
setSelected
(
true
);
}
else
if
(
id
==
R
.
id
.
tv_pay_immediately
)
{
}
else
if
(
id
==
R
.
id
.
tv_pay_immediately
)
{
dismiss
();
dismiss
();
createOrder
(
no
,
1
,
1
);
createOrder
(
no
,
1
,
1
);
...
...
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/order/OrderDetailActivity.java
View file @
493bec0a
...
@@ -95,7 +95,7 @@ public class OrderDetailActivity extends BaseStatusActivity<PickerPresenter> {
...
@@ -95,7 +95,7 @@ public class OrderDetailActivity extends BaseStatusActivity<PickerPresenter> {
private
String
webUrl
;
private
String
webUrl
;
private
int
status
;
private
int
status
;
private
String
no
;
private
String
no
;
private
int
payType
;
//选择支付类型
private
int
payType
=
1
;
//选择支付类型
private
final
int
TYPE_REQUEST_EVALUATION
=
1
;
private
final
int
TYPE_REQUEST_EVALUATION
=
1
;
private
IWXAPI
api
;
private
IWXAPI
api
;
...
@@ -320,12 +320,12 @@ public class OrderDetailActivity extends BaseStatusActivity<PickerPresenter> {
...
@@ -320,12 +320,12 @@ public class OrderDetailActivity extends BaseStatusActivity<PickerPresenter> {
dismiss
();
dismiss
();
}
else
if
(
id
==
R
.
id
.
ll_item_wechat
)
{
}
else
if
(
id
==
R
.
id
.
ll_item_wechat
)
{
payType
=
1
;
payType
=
1
;
helper
.
setChecked
(
R
.
id
.
rb_wechat
,
true
);
helper
.
getView
(
R
.
id
.
iv_wx_select
).
setSelected
(
true
);
helper
.
setChecked
(
R
.
id
.
rb_alipay
,
false
);
helper
.
getView
(
R
.
id
.
iv_alipy_select
).
setSelected
(
false
);
}
else
if
(
id
==
R
.
id
.
ll_item_alipay
)
{
}
else
if
(
id
==
R
.
id
.
ll_item_alipay
)
{
payType
=
2
;
payType
=
2
;
helper
.
setChecked
(
R
.
id
.
rb_wechat
,
false
);
helper
.
getView
(
R
.
id
.
iv_wx_select
).
setSelected
(
false
);
helper
.
setChecked
(
R
.
id
.
rb_alipay
,
true
);
helper
.
getView
(
R
.
id
.
iv_alipy_select
).
setSelected
(
true
);
}
else
if
(
id
==
R
.
id
.
tv_pay_immediately
)
{
}
else
if
(
id
==
R
.
id
.
tv_pay_immediately
)
{
dismiss
();
dismiss
();
createOrder
(
no
);
createOrder
(
no
);
...
...
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/order/TravelOrderDetailsActivity.java
View file @
493bec0a
...
@@ -84,7 +84,7 @@ public class TravelOrderDetailsActivity extends BaseStatusActivity<PickerPresent
...
@@ -84,7 +84,7 @@ public class TravelOrderDetailsActivity extends BaseStatusActivity<PickerPresent
private
IWXAPI
api
;
private
IWXAPI
api
;
private
double
orderAmount
;
private
double
orderAmount
;
private
OrderListBean
.
DataBeanX
.
DataBean
dataBean
;
private
OrderListBean
.
DataBeanX
.
DataBean
dataBean
;
private
int
payType
;
//选择支付类型
private
int
payType
=
1
;
//选择支付类型
public
static
Intent
getIntent
(
Context
context
,
OrderListBean
.
DataBeanX
.
DataBean
dataBean
)
{
public
static
Intent
getIntent
(
Context
context
,
OrderListBean
.
DataBeanX
.
DataBean
dataBean
)
{
...
@@ -294,12 +294,12 @@ public class TravelOrderDetailsActivity extends BaseStatusActivity<PickerPresent
...
@@ -294,12 +294,12 @@ public class TravelOrderDetailsActivity extends BaseStatusActivity<PickerPresent
dismiss
();
dismiss
();
}
else
if
(
id
==
R
.
id
.
ll_item_wechat
)
{
}
else
if
(
id
==
R
.
id
.
ll_item_wechat
)
{
payType
=
1
;
payType
=
1
;
helper
.
setChecked
(
R
.
id
.
rb_wechat
,
true
);
helper
.
getView
(
R
.
id
.
iv_wx_select
).
setSelected
(
true
);
helper
.
setChecked
(
R
.
id
.
rb_alipay
,
false
);
helper
.
getView
(
R
.
id
.
iv_alipy_select
).
setSelected
(
false
);
}
else
if
(
id
==
R
.
id
.
ll_item_alipay
)
{
}
else
if
(
id
==
R
.
id
.
ll_item_alipay
)
{
payType
=
2
;
payType
=
2
;
helper
.
setChecked
(
R
.
id
.
rb_wechat
,
false
);
helper
.
getView
(
R
.
id
.
iv_wx_select
).
setSelected
(
false
);
helper
.
setChecked
(
R
.
id
.
rb_alipay
,
true
);
helper
.
getView
(
R
.
id
.
iv_alipy_select
).
setSelected
(
true
);
}
else
if
(
id
==
R
.
id
.
tv_pay_immediately
)
{
}
else
if
(
id
==
R
.
id
.
tv_pay_immediately
)
{
dismiss
();
dismiss
();
createOrder
(
no
);
createOrder
(
no
);
...
...
module_home/src/main/res/drawable-xhdpi/home_button_select_car.png
deleted
100644 → 0
View file @
a6bae431
4.79 KB
module_home/src/main/res/layout/fragment_home.xml
View file @
493bec0a
...
@@ -6,13 +6,15 @@
...
@@ -6,13 +6,15 @@
android:background=
"@color/colorLine"
android:background=
"@color/colorLine"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<com.ruiwenliu.wrapper.weight.refresh.SimpleRefreshLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<com.ruiwenliu.wrapper.weight.refresh.SimpleRefreshLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:id=
"@+id/refresh"
android:id=
"@+id/refresh"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
android:layout_height=
"match_parent"
>
<com.rv.component.utils.ObservableScrollView
<com.rv.component.utils.ObservableScrollView
android:id=
"@+id/scrollview"
android:id=
"@+id/scrollview"
android:scrollbars=
"none"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
android:layout_height=
"wrap_content"
>
...
@@ -321,16 +323,16 @@
...
@@ -321,16 +323,16 @@
android:gravity=
"center_vertical"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
>
android:orientation=
"horizontal"
>
<
TextView
<
Button
android:id=
"@+id/tv_select_car"
android:id=
"@+id/tv_select_car"
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"@dimen/size_40"
android:layout_height=
"@dimen/size_40"
android:layout_weight=
"1"
android:layout_weight=
"1"
android:background=
"@drawable/
home_button_select_car
"
android:background=
"@drawable/
shape_rv_bg_shallow_dark_yellow_circle
"
android:gravity=
"center"
android:gravity=
"center"
android:text=
"立即选车"
android:text=
"立即选车"
android:textColor=
"@color/colorWrite"
android:textColor=
"@color/colorWrite"
android:textSize=
"@dimen/text_1
4
"
/>
android:textSize=
"@dimen/text_1
6
"
/>
<TextView
<TextView
android:id=
"@+id/tv_car_rental_guide"
android:id=
"@+id/tv_car_rental_guide"
...
@@ -379,12 +381,12 @@
...
@@ -379,12 +381,12 @@
<include
layout=
"@layout/common_line"
/>
<include
layout=
"@layout/common_line"
/>
<
TextView
<
Button
android:id=
"@+id/tv_book_now"
android:id=
"@+id/tv_book_now"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/size_40"
android:layout_height=
"@dimen/size_40"
android:layout_marginTop=
"@dimen/size_20"
android:layout_marginTop=
"@dimen/size_20"
android:background=
"@drawable/
home_button_select_car
"
android:background=
"@drawable/
shape_rv_bg_shallow_dark_yellow_circle
"
android:gravity=
"center"
android:gravity=
"center"
android:text=
"立即预订"
android:text=
"立即预订"
android:textColor=
"@color/colorWrite"
android:textColor=
"@color/colorWrite"
...
@@ -623,7 +625,9 @@
...
@@ -623,7 +625,9 @@
<LinearLayout
<LinearLayout
android:id=
"@+id/ll_item_activity_all"
android:id=
"@+id/ll_item_activity_all"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/size_25"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/size_10"
android:layout_marginBottom=
"@dimen/size_10"
android:gravity=
"center_vertical"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
android:orientation=
"horizontal"
android:paddingLeft=
"@dimen/size_15"
android:paddingLeft=
"@dimen/size_15"
...
@@ -665,8 +669,8 @@
...
@@ -665,8 +669,8 @@
<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=
"@dimen/size_
5
"
android:layout_marginTop=
"@dimen/size_
10
"
android:layout_marginBottom=
"@dimen/size_
5
"
android:layout_marginBottom=
"@dimen/size_
10
"
android:paddingLeft=
"@dimen/size_15"
android:paddingLeft=
"@dimen/size_15"
android:paddingRight=
"@dimen/size_15"
android:paddingRight=
"@dimen/size_15"
android:text=
"精选优质旅游路线,满足你的出行需求"
android:text=
"精选优质旅游路线,满足你的出行需求"
...
@@ -712,7 +716,7 @@
...
@@ -712,7 +716,7 @@
<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=
"@dimen/size_
5
"
android:layout_marginTop=
"@dimen/size_
10
"
android:paddingLeft=
"@dimen/size_15"
android:paddingLeft=
"@dimen/size_15"
android:paddingRight=
"@dimen/size_15"
android:paddingRight=
"@dimen/size_15"
android:text=
"分享精彩时刻"
android:text=
"分享精彩时刻"
...
@@ -722,7 +726,7 @@
...
@@ -722,7 +726,7 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/size_15"
android:layout_marginLeft=
"@dimen/size_15"
android:layout_marginTop=
"@dimen/size_1
5
"
android:layout_marginTop=
"@dimen/size_1
0
"
android:layout_marginRight=
"@dimen/size_15"
android:layout_marginRight=
"@dimen/size_15"
android:layout_marginBottom=
"@dimen/size_15"
android:layout_marginBottom=
"@dimen/size_15"
android:orientation=
"horizontal"
>
android:orientation=
"horizontal"
>
...
@@ -1054,8 +1058,14 @@
...
@@ -1054,8 +1058,14 @@
</com.ruiwenliu.wrapper.weight.refresh.SimpleRefreshLayout>
</com.ruiwenliu.wrapper.weight.refresh.SimpleRefreshLayout>
<LinearLayout
<com.ruiwenliu.wrapper.statusbar.StatusBarHeightView
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:id=
"@+id/ll_item_title"
android:id=
"@+id/ll_item_title"
android:orientation=
"vertical"
app:use_type=
"use_padding_top"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/size_50"
android:layout_height=
"@dimen/size_50"
android:gravity=
"center"
android:gravity=
"center"
...
@@ -1152,6 +1162,6 @@
...
@@ -1152,6 +1162,6 @@
android:textSize=
"@dimen/text_8"
/>
android:textSize=
"@dimen/text_8"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</com.ruiwenliu.wrapper.statusbar.StatusBarHeightView>
</RelativeLayout>
</RelativeLayout>
\ No newline at end of file
module_mine/src/main/java/com/rv/rvmine/MineFragment.java
View file @
493bec0a
...
@@ -33,6 +33,7 @@ import com.ruiwenliu.wrapper.base.BaseBean;
...
@@ -33,6 +33,7 @@ import com.ruiwenliu.wrapper.base.BaseBean;
import
com.ruiwenliu.wrapper.base.BaseFragment
;
import
com.ruiwenliu.wrapper.base.BaseFragment
;
import
com.ruiwenliu.wrapper.bean.UserInfoBean
;
import
com.ruiwenliu.wrapper.bean.UserInfoBean
;
import
com.ruiwenliu.wrapper.browse.ActivityImageBrowseInt
;
import
com.ruiwenliu.wrapper.browse.ActivityImageBrowseInt
;
import
com.ruiwenliu.wrapper.statusbar.StatusBarUtil
;
import
com.ruiwenliu.wrapper.util.UtilsManager
;
import
com.ruiwenliu.wrapper.util.UtilsManager
;
import
com.ruiwenliu.wrapper.util.glide.GlideManager
;
import
com.ruiwenliu.wrapper.util.glide.GlideManager
;
import
com.ruiwenliu.wrapper.weight.refresh.SimpleRefreshLayout
;
import
com.ruiwenliu.wrapper.weight.refresh.SimpleRefreshLayout
;
...
...
module_mine/src/main/res/layout/activity_mine.xml
View file @
493bec0a
This diff is collapsed.
Click to expand it.
module_tourism/src/main/java/com/rv/tourism/TourismFragment.java
View file @
493bec0a
...
@@ -128,14 +128,14 @@ public class TourismFragment extends BaseFragment<TourismPresenter> implements
...
@@ -128,14 +128,14 @@ public class TourismFragment extends BaseFragment<TourismPresenter> implements
//热门游
//热门游
mPopularBrigadeAdapter
=
new
PopularBrigadeAdapter
();
mPopularBrigadeAdapter
=
new
PopularBrigadeAdapter
();
rvPopularBrigade
.
setLayoutManager
(
new
LinearLayoutManager
(
_mActivity
,
LinearLayoutManager
.
HORIZONTAL
,
false
));
rvPopularBrigade
.
setLayoutManager
(
new
LinearLayoutManager
(
_mActivity
,
LinearLayoutManager
.
HORIZONTAL
,
false
));
rvPopularBrigade
.
addItemDecoration
(
new
AbSpacesItemDecoration
(
5
));
// 分割线。
// rvPopularBrigade.addItemDecoration(new AbSpacesItemDecoration(20,10
));// 分割线。
rvPopularBrigade
.
setNestedScrollingEnabled
(
false
);
rvPopularBrigade
.
setNestedScrollingEnabled
(
false
);
rvPopularBrigade
.
setAdapter
(
mPopularBrigadeAdapter
);
rvPopularBrigade
.
setAdapter
(
mPopularBrigadeAdapter
);
//全部热门旅游
//全部热门旅游
mAllPopularAdapter
=
new
AllPopularAdapter
();
mAllPopularAdapter
=
new
AllPopularAdapter
();
rvPopularMore
.
setLayoutManager
(
new
GridLayoutManager
(
_mActivity
,
3
));
rvPopularMore
.
setLayoutManager
(
new
GridLayoutManager
(
_mActivity
,
3
));
rvPopularMore
.
addItemDecoration
(
new
AbSpacesItemDecoration
(
23
));
// 分割线。
rvPopularMore
.
addItemDecoration
(
new
AbSpacesItemDecoration
2
(
20
,
10
));
// 分割线。
// rvPopularMore.setNestedScrollingEnabled(false);
// rvPopularMore.setNestedScrollingEnabled(false);
rvPopularMore
.
setAdapter
(
mAllPopularAdapter
);
rvPopularMore
.
setAdapter
(
mAllPopularAdapter
);
...
@@ -444,20 +444,61 @@ public class TourismFragment extends BaseFragment<TourismPresenter> implements
...
@@ -444,20 +444,61 @@ public class TourismFragment extends BaseFragment<TourismPresenter> implements
public
class
AbSpacesItemDecoration
extends
RecyclerView
.
ItemDecoration
{
public
class
AbSpacesItemDecoration
extends
RecyclerView
.
ItemDecoration
{
private
int
space
;
private
int
left
;
private
int
right
;
public
AbSpacesItemDecoration
(
int
space
)
{
public
AbSpacesItemDecoration
(
int
left
,
int
right
)
{
this
.
space
=
space
;
this
.
left
=
left
;
this
.
right
=
right
;
}
}
@Override
@Override
public
void
getItemOffsets
(
Rect
outRect
,
View
view
,
RecyclerView
parent
,
RecyclerView
.
State
state
)
{
public
void
getItemOffsets
(
Rect
outRect
,
View
view
,
RecyclerView
parent
,
RecyclerView
.
State
state
)
{
outRect
.
left
=
space
;
int
childCount
=
parent
.
getChildCount
();
outRect
.
right
=
space
;
if
((
childCount
-
1
)
%
2
==
0
){
outRect
.
bottom
=
space
;
outRect
.
left
=
left
;
//注释这两行是为了上下间距相同
outRect
.
right
=
right
;
// if(parent.getChildAdapterPosition(view)==0){
outRect
.
bottom
=
right
;
outRect
.
top
=
space
;
outRect
.
top
=
right
;
}
else
{
outRect
.
left
=
right
;
outRect
.
right
=
left
;
outRect
.
bottom
=
right
;
outRect
.
top
=
right
;
}
}
}
public
class
AbSpacesItemDecoration2
extends
RecyclerView
.
ItemDecoration
{
private
int
left
;
private
int
right
;
public
AbSpacesItemDecoration2
(
int
left
,
int
right
)
{
this
.
left
=
left
;
this
.
right
=
right
;
}
@Override
public
void
getItemOffsets
(
Rect
outRect
,
View
view
,
RecyclerView
parent
,
RecyclerView
.
State
state
)
{
int
childCount
=
parent
.
getChildCount
();
if
(
childCount
%
3
==
1
){
outRect
.
left
=
left
;
outRect
.
right
=
right
;
outRect
.
bottom
=
right
;
outRect
.
top
=
right
;
}
else
if
(
childCount
%
3
==
2
){
outRect
.
left
=
right
;
outRect
.
right
=
right
;
outRect
.
bottom
=
right
;
outRect
.
top
=
right
;
}
else
if
(
childCount
%
3
==
0
){
outRect
.
left
=
right
;
outRect
.
right
=
left
;
outRect
.
bottom
=
right
;
outRect
.
top
=
right
;
}
}
}
}
}
...
...
module_tourism/src/main/java/com/rv/tourism/adapter/AllPopularAdapter.java
View file @
493bec0a
...
@@ -18,7 +18,7 @@ public class AllPopularAdapter extends BaseQuickAdapter<BeanPopularBrigadeAll.Da
...
@@ -18,7 +18,7 @@ public class AllPopularAdapter extends BaseQuickAdapter<BeanPopularBrigadeAll.Da
@Override
@Override
protected
void
convert
(
BaseViewHolder
helper
,
BeanPopularBrigadeAll
.
DataBeanX
.
DataBean
item
)
{
protected
void
convert
(
BaseViewHolder
helper
,
BeanPopularBrigadeAll
.
DataBeanX
.
DataBean
item
)
{
GlideManager
.
getInstance
(
mContext
).
load
Image
(
item
.
getImg
(),
(
ImageView
)
helper
.
getView
(
R
.
id
.
iv_icon
)
);
GlideManager
.
getInstance
(
mContext
).
load
RoundImage
(
item
.
getImg
(),
(
ImageView
)
helper
.
getView
(
R
.
id
.
iv_icon
),
8
);
helper
.
setText
(
R
.
id
.
tv_hot
,
item
.
getName
());
helper
.
setText
(
R
.
id
.
tv_hot
,
item
.
getName
());
}
}
}
}
module_tourism/src/main/java/com/rv/tourism/adapter/PopularBrigadeAdapter.java
View file @
493bec0a
...
@@ -17,7 +17,7 @@ public class PopularBrigadeAdapter extends BaseQuickAdapter<BeanPopularBrigade.D
...
@@ -17,7 +17,7 @@ public class PopularBrigadeAdapter extends BaseQuickAdapter<BeanPopularBrigade.D
@Override
@Override
protected
void
convert
(
BaseViewHolder
helper
,
BeanPopularBrigade
.
DataBean
item
)
{
protected
void
convert
(
BaseViewHolder
helper
,
BeanPopularBrigade
.
DataBean
item
)
{
GlideManager
.
getInstance
(
mContext
).
load
Image
(
item
.
getImg
(),
(
ImageView
)
helper
.
getView
(
R
.
id
.
iv_icon
)
);
GlideManager
.
getInstance
(
mContext
).
load
RoundImage
(
item
.
getImg
(),
(
ImageView
)
helper
.
getView
(
R
.
id
.
iv_icon
),
8
);
helper
.
setText
(
R
.
id
.
tv_hot
,
item
.
getName
());
helper
.
setText
(
R
.
id
.
tv_hot
,
item
.
getName
());
}
}
}
}
module_tourism/src/main/java/com/rv/tourism/adapter/RecommendedRouteAdapter.java
View file @
493bec0a
...
@@ -18,7 +18,7 @@ public class RecommendedRouteAdapter extends BaseQuickAdapter<BeanTourAround.Dat
...
@@ -18,7 +18,7 @@ public class RecommendedRouteAdapter extends BaseQuickAdapter<BeanTourAround.Dat
@Override
@Override
protected
void
convert
(
BaseViewHolder
helper
,
BeanTourAround
.
DataBeanX
.
DataBean
item
)
{
protected
void
convert
(
BaseViewHolder
helper
,
BeanTourAround
.
DataBeanX
.
DataBean
item
)
{
GlideManager
.
getInstance
(
mContext
).
load
Image
(
item
.
getCover
(),
(
ImageView
)
helper
.
getView
(
R
.
id
.
iv_icon
)
);
GlideManager
.
getInstance
(
mContext
).
load
RoundImage
(
item
.
getCover
(),
(
ImageView
)
helper
.
getView
(
R
.
id
.
iv_icon
),
8
);
helper
.
setText
(
R
.
id
.
tv_title
,
item
.
getName
());
helper
.
setText
(
R
.
id
.
tv_title
,
item
.
getName
());
helper
.
setText
(
R
.
id
.
tv_price
,
String
.
format
(
"¥%1$s%2$s"
,
item
.
getPrice
(),
item
.
getUnit
()));
helper
.
setText
(
R
.
id
.
tv_price
,
String
.
format
(
"¥%1$s%2$s"
,
item
.
getPrice
(),
item
.
getUnit
()));
}
}
...
...
module_tourism/src/main/java/com/rv/tourism/other/PopularTourListActivity.java
View file @
493bec0a
...
@@ -24,6 +24,7 @@ import com.ruiwenliu.wrapper.util.glide.GlideManager;
...
@@ -24,6 +24,7 @@ import com.ruiwenliu.wrapper.util.glide.GlideManager;
import
com.ruiwenliu.wrapper.weight.TitleView
;
import
com.ruiwenliu.wrapper.weight.TitleView
;
import
com.rv.tourism.R
;
import
com.rv.tourism.R
;
import
com.rv.tourism.R2
;
import
com.rv.tourism.R2
;
import
com.rv.tourism.TourismFragment
;
import
com.rv.tourism.adapter.AllPopularAdapter
;
import
com.rv.tourism.adapter.AllPopularAdapter
;
import
com.rv.tourism.adapter.RecommendedRouteAdapter
;
import
com.rv.tourism.adapter.RecommendedRouteAdapter
;
import
com.rv.tourism.api.TourismApi
;
import
com.rv.tourism.api.TourismApi
;
...
@@ -87,6 +88,7 @@ public class PopularTourListActivity extends BaseStatusActivity<TourismPresenter
...
@@ -87,6 +88,7 @@ public class PopularTourListActivity extends BaseStatusActivity<TourismPresenter
protected
void
initView
(
Bundle
savedInstanceState
,
final
TitleView
titleView
,
Intent
intent
)
{
protected
void
initView
(
Bundle
savedInstanceState
,
final
TitleView
titleView
,
Intent
intent
)
{
name
=
intent
.
getStringExtra
(
"name"
);
name
=
intent
.
getStringExtra
(
"name"
);
titleView
.
setTitle
(
name
);
titleView
.
setTitle
(
name
);
titleView
.
setDividerDrawable
(
getResources
().
getDrawable
(
R
.
drawable
.
common_icon_rig_gray
));
id
=
intent
.
getStringExtra
(
"id"
);
id
=
intent
.
getStringExtra
(
"id"
);
...
@@ -99,7 +101,7 @@ public class PopularTourListActivity extends BaseStatusActivity<TourismPresenter
...
@@ -99,7 +101,7 @@ public class PopularTourListActivity extends BaseStatusActivity<TourismPresenter
//全部热门旅游
//全部热门旅游
mAllPopularAdapter
=
new
AllPopularAdapter
();
mAllPopularAdapter
=
new
AllPopularAdapter
();
rvPopularMore
.
setLayoutManager
(
new
GridLayoutManager
(
mActivity
,
3
));
rvPopularMore
.
setLayoutManager
(
new
GridLayoutManager
(
mActivity
,
3
));
rvPopularMore
.
addItemDecoration
(
new
AbSpacesItemDecoration
(
23
));
// 分割线。
rvPopularMore
.
addItemDecoration
(
new
AbSpacesItemDecoration
2
(
20
,
10
));
// 分割线。
// rvPopularMore.setNestedScrollingEnabled(false);
// rvPopularMore.setNestedScrollingEnabled(false);
rvPopularMore
.
setAdapter
(
mAllPopularAdapter
);
rvPopularMore
.
setAdapter
(
mAllPopularAdapter
);
...
@@ -302,22 +304,35 @@ public class PopularTourListActivity extends BaseStatusActivity<TourismPresenter
...
@@ -302,22 +304,35 @@ public class PopularTourListActivity extends BaseStatusActivity<TourismPresenter
// }
// }
public
class
AbSpacesItemDecoration
extends
RecyclerView
.
ItemDecoration
{
public
class
AbSpacesItemDecoration
2
extends
RecyclerView
.
ItemDecoration
{
private
int
space
;
private
int
left
;
private
int
right
;
public
AbSpacesItemDecoration
(
int
space
)
{
public
AbSpacesItemDecoration2
(
int
left
,
int
right
)
{
this
.
space
=
space
;
this
.
left
=
left
;
this
.
right
=
right
;
}
}
@Override
@Override
public
void
getItemOffsets
(
Rect
outRect
,
View
view
,
RecyclerView
parent
,
RecyclerView
.
State
state
)
{
public
void
getItemOffsets
(
Rect
outRect
,
View
view
,
RecyclerView
parent
,
RecyclerView
.
State
state
)
{
outRect
.
left
=
space
;
int
childCount
=
parent
.
getChildCount
();
outRect
.
right
=
space
;
if
(
childCount
%
3
==
1
){
outRect
.
bottom
=
space
;
outRect
.
left
=
left
;
//注释这两行是为了上下间距相同
outRect
.
right
=
right
;
// if(parent.getChildAdapterPosition(view)==0){
outRect
.
bottom
=
right
;
outRect
.
top
=
space
;
outRect
.
top
=
right
;
}
else
if
(
childCount
%
3
==
2
){
outRect
.
left
=
right
;
outRect
.
right
=
right
;
outRect
.
bottom
=
right
;
outRect
.
top
=
right
;
}
else
if
(
childCount
%
3
==
0
){
outRect
.
left
=
right
;
outRect
.
right
=
left
;
outRect
.
bottom
=
right
;
outRect
.
top
=
right
;
}
}
}
}
}
...
...
module_tourism/src/main/java/com/rv/tourism/other/TravelerConfirmOrderActivity.java
View file @
493bec0a
...
@@ -133,7 +133,7 @@ public class TravelerConfirmOrderActivity extends BaseStatusActivity<TourismPres
...
@@ -133,7 +133,7 @@ public class TravelerConfirmOrderActivity extends BaseStatusActivity<TourismPres
private
OrderPriceDetailBean
orderPriceDetailBean
;
//订单价格明细实体类
private
OrderPriceDetailBean
orderPriceDetailBean
;
//订单价格明细实体类
private
OrderPriceDetailPw
detailPw
;
//显示订单价格明细弹窗
private
OrderPriceDetailPw
detailPw
;
//显示订单价格明细弹窗
private
BeanConfirmOrder
info
;
private
BeanConfirmOrder
info
;
private
int
payType
;
//选择支付类型
private
int
payType
=
1
;
//选择支付类型
private
List
<
CouponBean
.
DataBean
>
couponDataList
;
//优惠券数据
private
List
<
CouponBean
.
DataBean
>
couponDataList
;
//优惠券数据
...
@@ -493,13 +493,12 @@ public class TravelerConfirmOrderActivity extends BaseStatusActivity<TourismPres
...
@@ -493,13 +493,12 @@ public class TravelerConfirmOrderActivity extends BaseStatusActivity<TourismPres
dismiss
();
dismiss
();
}
else
if
(
i
==
R
.
id
.
ll_item_wechat
)
{
}
else
if
(
i
==
R
.
id
.
ll_item_wechat
)
{
payType
=
1
;
payType
=
1
;
helper
.
setChecked
(
R
.
id
.
rb_wechat
,
true
);
helper
.
getView
(
R
.
id
.
iv_wx_select
).
setSelected
(
true
);
helper
.
setChecked
(
R
.
id
.
rb_alipay
,
false
);
helper
.
getView
(
R
.
id
.
iv_alipy_select
).
setSelected
(
false
);
}
else
if
(
i
==
R
.
id
.
ll_item_alipay
)
{
}
else
if
(
i
==
R
.
id
.
ll_item_alipay
)
{
payType
=
2
;
payType
=
2
;
helper
.
setChecked
(
R
.
id
.
rb_wechat
,
false
);
helper
.
getView
(
R
.
id
.
iv_wx_select
).
setSelected
(
false
);
helper
.
setChecked
(
R
.
id
.
rb_alipay
,
true
);
helper
.
getView
(
R
.
id
.
iv_alipy_select
).
setSelected
(
true
);
}
else
if
(
i
==
R
.
id
.
tv_pay_immediately
)
{
}
else
if
(
i
==
R
.
id
.
tv_pay_immediately
)
{
dismiss
();
dismiss
();
...
...
module_tourism/src/main/res/layout/activity_popular_tour_list.xml
View file @
493bec0a
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
android:layout_marginTop=
"@dimen/size_20"
android:layout_marginTop=
"@dimen/size_20"
android:layout_marginBottom=
"@dimen/size_20"
android:layout_marginBottom=
"@dimen/size_20"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"
推荐路线
"
/>
android:text=
"
— 推荐路线 —
"
/>
<android.support.v7.widget.RecyclerView
<android.support.v7.widget.RecyclerView
android:id=
"@+id/rv_recommended_route"
android:id=
"@+id/rv_recommended_route"
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
android:textColor=
"@color/colorWrite"
android:textColor=
"@color/colorWrite"
android:gravity=
"center"
android:gravity=
"center"
android:textSize=
"@dimen/text_16"
android:textSize=
"@dimen/text_16"
android:text=
"
选择旅游类型
"
/>
android:text=
"
— 选择旅游类型 —
"
/>
<android.support.v7.widget.RecyclerView
<android.support.v7.widget.RecyclerView
android:id=
"@+id/rv_popular_more"
android:id=
"@+id/rv_popular_more"
...
...
module_tourism/src/main/res/layout/activity_tourism.xml
View file @
493bec0a
This diff is collapsed.
Click to expand it.
module_tourism/src/main/res/layout/rv_item_all_popular.xml
View file @
493bec0a
<?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=
"
@dimen/size_110
"
android:layout_width=
"
match_parent
"
android:gravity=
"center_horizontal"
android:gravity=
"center_horizontal"
android:layout_height=
"@dimen/size_70"
>
android:layout_height=
"@dimen/size_70"
>
...
...
module_tourism/src/main/res/layout/rv_item_popular_brigade.xml
View file @
493bec0a
<?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_marginLeft=
"@dimen/size_15"
android:layout_width=
"@dimen/size_130"
android:layout_width=
"@dimen/size_130"
android:layout_height=
"@dimen/size_80"
>
android:layout_height=
"@dimen/size_80"
>
...
...
plugin_member/src/main/java/com/rv.member/MemberCenterActivity.java
View file @
493bec0a
...
@@ -373,12 +373,12 @@ public class MemberCenterActivity extends BaseStatusActivity<MemberPresenter> {
...
@@ -373,12 +373,12 @@ public class MemberCenterActivity extends BaseStatusActivity<MemberPresenter> {
dismiss
();
dismiss
();
}
else
if
(
i
==
R
.
id
.
ll_item_wechat
)
{
}
else
if
(
i
==
R
.
id
.
ll_item_wechat
)
{
payType
=
1
;
payType
=
1
;
helper
.
setChecked
(
R
.
id
.
rb_wechat
,
true
);
helper
.
getView
(
com
.
rv
.
home
.
R
.
id
.
iv_wx_select
).
setSelected
(
true
);
helper
.
setChecked
(
R
.
id
.
rb_alipay
,
false
);
helper
.
getView
(
com
.
rv
.
home
.
R
.
id
.
iv_alipy_select
).
setSelected
(
false
);
}
else
if
(
i
==
R
.
id
.
ll_item_alipay
)
{
}
else
if
(
i
==
com
.
rv
.
home
.
R
.
id
.
ll_item_alipay
)
{
payType
=
2
;
payType
=
2
;
helper
.
setChecked
(
R
.
id
.
rb_wechat
,
false
);
helper
.
getView
(
com
.
rv
.
home
.
R
.
id
.
iv_wx_select
).
setSelected
(
false
);
helper
.
setChecked
(
R
.
id
.
rb_alipay
,
true
);
helper
.
getView
(
com
.
rv
.
home
.
R
.
id
.
iv_alipy_select
).
setSelected
(
true
);
}
else
if
(
i
==
R
.
id
.
tv_pay_immediately
)
{
}
else
if
(
i
==
R
.
id
.
tv_pay_immediately
)
{
dismiss
();
dismiss
();
...
...
plugin_search/src/main/res/layout/activity_travel_search.xml
View file @
493bec0a
...
@@ -33,9 +33,8 @@
...
@@ -33,9 +33,8 @@
android:drawablePadding=
"@dimen/size_15"
android:drawablePadding=
"@dimen/size_15"
android:hint=
"搜索目的地/旅游线"
android:hint=
"搜索目的地/旅游线"
android:paddingLeft=
"@dimen/size_15"
android:paddingLeft=
"@dimen/size_15"
android:textColor=
"@color/textMain"
android:textColor=
"@color/textMain"
android:textSize=
"@dimen/text_1
4
"
/>
android:textSize=
"@dimen/text_1
2
"
/>
<TextView
<TextView
android:id=
"@+id/tv_search"
android:id=
"@+id/tv_search"
...
...
plugin_wallet/src/main/java/com/xxrv/wallet/activity/WalletActivity.java
View file @
493bec0a
...
@@ -17,6 +17,7 @@ import com.frame.rv.config.RvFrameConfig;
...
@@ -17,6 +17,7 @@ import com.frame.rv.config.RvFrameConfig;
import
com.ruiwenliu.wrapper.base.BaseBean
;
import
com.ruiwenliu.wrapper.base.BaseBean
;
import
com.ruiwenliu.wrapper.base.BaseStatusActivity
;
import
com.ruiwenliu.wrapper.base.BaseStatusActivity
;
import
com.ruiwenliu.wrapper.bean.BeanUserInfo
;
import
com.ruiwenliu.wrapper.bean.BeanUserInfo
;
import
com.ruiwenliu.wrapper.statusbar.StatusBarUtil
;
import
com.ruiwenliu.wrapper.util.ViewHolder
;
import
com.ruiwenliu.wrapper.util.ViewHolder
;
import
com.ruiwenliu.wrapper.weight.TitleView
;
import
com.ruiwenliu.wrapper.weight.TitleView
;
import
com.rv.component.dialog.VerifiedTipsDialog
;
import
com.rv.component.dialog.VerifiedTipsDialog
;
...
@@ -66,6 +67,12 @@ public class WalletActivity extends BaseStatusActivity<WalletPresenter> {
...
@@ -66,6 +67,12 @@ public class WalletActivity extends BaseStatusActivity<WalletPresenter> {
return
R
.
layout
.
activity_wallet
;
return
R
.
layout
.
activity_wallet
;
}
}
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
StatusBarUtil
.
setRootViewFitsSystemWindows
(
mActivity
,
false
);
}
@Override
@Override
protected
void
initView
(
Bundle
savedInstanceState
,
TitleView
titleView
,
Intent
intent
)
{
protected
void
initView
(
Bundle
savedInstanceState
,
TitleView
titleView
,
Intent
intent
)
{
showTitle
(
false
);
showTitle
(
false
);
...
...
plugin_wallet/src/main/res/layout/activity_wallet.xml
View file @
493bec0a
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
xmlns:tools=
"http://schemas.android.com/tools"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:orientation=
"vertical"
android:orientation=
"vertical"
android:background=
"@color/colorLine"
android:background=
"@color/colorLine"
tools:context=
".activity.WalletActivity"
>
tools:context=
".activity.WalletActivity"
>
...
@@ -13,6 +14,12 @@
...
@@ -13,6 +14,12 @@
android:layout_height=
"@dimen/size_220"
android:layout_height=
"@dimen/size_220"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<com.ruiwenliu.wrapper.statusbar.StatusBarHeightView
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
app:use_type=
"use_padding_top"
>
<RelativeLayout
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/size_50"
>
android:layout_height=
"@dimen/size_50"
>
...
@@ -35,6 +42,8 @@
...
@@ -35,6 +42,8 @@
android:text=
"我的钱包"
/>
android:text=
"我的钱包"
/>
</RelativeLayout>
</RelativeLayout>
</com.ruiwenliu.wrapper.statusbar.StatusBarHeightView>
<RelativeLayout
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_weight=
"1"
android:layout_weight=
"1"
...
...
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