Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
android
/
dayu
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
53cae3a2
authored
Jun 05, 2023
by
wukun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
20230528新需求
parent
43e5a905
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
110 deletions
baseSDK/src/main/java/com/dayu/common/Constants.java
baseSDK/src/main/java/com/dayu/utils/CustomLinerLayoutManager.java
build.gradle
saleCenter/src/main/res/layout/fragment_common_sale.xml
baseSDK/src/main/java/com/dayu/common/Constants.java
View file @
53cae3a2
...
...
@@ -45,21 +45,21 @@ public class Constants {
/**
* dev环境配置.
*/
public
static
String
ENVIROMENT
=
"debug"
;
public
static
String
PHOTO
=
"dev"
;
public
static
int
LOG_LEVEL
=
LogUtils
.
LEVEL_ALL
;
public
static
String
BASE_URL
=
"http://47.94.101.239:3112"
;
public
static
String
WEB_SOP
=
"http://47.94.101.239:9004/#/sop"
;
public
static
String
CHECK_MULTI_WEB_SOP
=
"http://47.94.101.239:9004/#/manyServiceResult"
;
public
static
String
MULTI_WEB_SOP
=
"http://47.94.101.239:9004/#/manySop"
;
public
static
String
WEB_SOP_DETAIL
=
"http://47.94.101.239:9004/#/sopdetail"
;
public
static
String
WEB_ZHI_SHI
=
"http://47.94.101.239:9004/#/detail"
;
public
static
final
String
UP_PHOTO
=
"/file/uploadMore?targetPath=dev/sp/mobile/android/business/checkApply"
;
public
static
final
String
UP_VIDEO
=
"/file/uploadVideoOne?targetPath=dev/video"
;
public
static
boolean
IS_DEBUG
=
true
;
public
static
String
VIDEO_SHARE_URL
=
"http://uat.kf.ai:9099/#/shareVideo?type=_type&id="
;
//uat 学习视频分享链接 type(课程: course 直播: live)
public
static
int
XLR_PID
=
239
;
//小绿人商家id
public
static
String
SCHEME_9099
=
"http://dev.kf.ai:9099/#/"
;
//
public static String ENVIROMENT = "debug";
//
public static String PHOTO = "dev";
//
public static int LOG_LEVEL = LogUtils.LEVEL_ALL;
//
public static String BASE_URL = "http://47.94.101.239:3112";
//
public static String WEB_SOP = "http://47.94.101.239:9004/#/sop";
//
public static String CHECK_MULTI_WEB_SOP = "http://47.94.101.239:9004/#/manyServiceResult";
//
public static String MULTI_WEB_SOP = "http://47.94.101.239:9004/#/manySop";
//
public static String WEB_SOP_DETAIL = "http://47.94.101.239:9004/#/sopdetail";
//
public static String WEB_ZHI_SHI = "http://47.94.101.239:9004/#/detail";
//
public static final String UP_PHOTO = "/file/uploadMore?targetPath=dev/sp/mobile/android/business/checkApply";
//
public static final String UP_VIDEO = "/file/uploadVideoOne?targetPath=dev/video";
//
public static boolean IS_DEBUG = true;
//
public static String VIDEO_SHARE_URL = "http://uat.kf.ai:9099/#/shareVideo?type=_type&id="; //uat 学习视频分享链接 type(课程: course 直播: live)
//
public static int XLR_PID = 239; //小绿人商家id
//
public static String SCHEME_9099 = "http://dev.kf.ai:9099/#/";
/**
...
...
@@ -85,21 +85,21 @@ public class Constants {
/**
* 正式环境.
*/
//
public static String ENVIROMENT = "release";
//
public static String PHOTO = "online";
//
public static int LOG_LEVEL = LogUtils.LEVEL_OFF;
//
public static String BASE_URL = "https://mobile.kf.ai";
//
public static String WEB_SOP = "https://sop.kf.ai/#/sop";
//
public static String WEB_SOP_DETAIL = "https://sop.kf.ai/#/sopdetail";
//
public static String WEB_ZHI_SHI = "https://sop.kf.ai/#/detail";
//
public static String CHECK_MULTI_WEB_SOP = "https://sop.kf.ai/#/manyServiceResult";
//
public static String MULTI_WEB_SOP = "https://sop.kf.ai/#/manySop";
//
public static final String UP_PHOTO = "/file/uploadMore?targetPath=online/sp/mobile/android/business/checkApply";
//
public static final String UP_VIDEO = "/file/uploadVideoOne?targetPath=online/video";
//
public static boolean IS_DEBUG = false;
//
public static String VIDEO_SHARE_URL = "http://app.dl.kf.ai/ext/#/shareVideo?type=_type&id="; //学习视频分享链接 type(课程: course 直播: live)
//
public static int XLR_PID = 1936; //小绿人商家id
//
public static String SCHEME_9099 = "http://app.dl.kf.ai/ext/#/";
public
static
String
ENVIROMENT
=
"release"
;
public
static
String
PHOTO
=
"online"
;
public
static
int
LOG_LEVEL
=
LogUtils
.
LEVEL_OFF
;
public
static
String
BASE_URL
=
"https://mobile.kf.ai"
;
public
static
String
WEB_SOP
=
"https://sop.kf.ai/#/sop"
;
public
static
String
WEB_SOP_DETAIL
=
"https://sop.kf.ai/#/sopdetail"
;
public
static
String
WEB_ZHI_SHI
=
"https://sop.kf.ai/#/detail"
;
public
static
String
CHECK_MULTI_WEB_SOP
=
"https://sop.kf.ai/#/manyServiceResult"
;
public
static
String
MULTI_WEB_SOP
=
"https://sop.kf.ai/#/manySop"
;
public
static
final
String
UP_PHOTO
=
"/file/uploadMore?targetPath=online/sp/mobile/android/business/checkApply"
;
public
static
final
String
UP_VIDEO
=
"/file/uploadVideoOne?targetPath=online/video"
;
public
static
boolean
IS_DEBUG
=
false
;
public
static
String
VIDEO_SHARE_URL
=
"http://app.dl.kf.ai/ext/#/shareVideo?type=_type&id="
;
//学习视频分享链接 type(课程: course 直播: live)
public
static
int
XLR_PID
=
1936
;
//小绿人商家id
public
static
String
SCHEME_9099
=
"http://app.dl.kf.ai/ext/#/"
;
/**
...
...
baseSDK/src/main/java/com/dayu/utils/CustomLinerLayoutManager.java
deleted
100644 → 0
View file @
43e5a905
package
com
.
dayu
.
utils
;
import
android.content.Context
;
import
android.graphics.PointF
;
import
android.util.AttributeSet
;
import
android.util.DisplayMetrics
;
import
androidx.annotation.Nullable
;
import
androidx.recyclerview.widget.LinearLayoutManager
;
import
androidx.recyclerview.widget.LinearSmoothScroller
;
import
androidx.recyclerview.widget.RecyclerView
;
public
class
CustomLinerLayoutManager
extends
LinearLayoutManager
{
private
float
speedPerPixel
=
0.001f
;
//滚动速率 越小越快 越大越慢
private
Context
context
;
public
CustomLinerLayoutManager
(
Context
context
)
{
super
(
context
);
this
.
context
=
context
;
}
public
CustomLinerLayoutManager
(
Context
context
,
int
orientation
,
boolean
reverseLayout
)
{
super
(
context
,
orientation
,
reverseLayout
);
}
public
CustomLinerLayoutManager
(
Context
context
,
AttributeSet
attrs
,
int
defStyleAttr
,
int
defStyleRes
)
{
super
(
context
,
attrs
,
defStyleAttr
,
defStyleRes
);
}
public
void
setSpeedPerPixel
(
float
speedPerPixel
)
{
this
.
speedPerPixel
=
speedPerPixel
;
}
@Override
public
void
smoothScrollToPosition
(
RecyclerView
recyclerView
,
RecyclerView
.
State
state
,
int
position
)
{
RecyclerView
.
SmoothScroller
smoothScroller
=
new
CenterSmoothScroller
(
recyclerView
.
getContext
());
smoothScroller
.
setTargetPosition
(
position
);
startSmoothScroll
(
smoothScroller
);
}
private
class
CenterSmoothScroller
extends
LinearSmoothScroller
{
CenterSmoothScroller
(
Context
context
)
{
super
(
context
);
}
@Nullable
@Override
//滑动到目标索引
public
PointF
computeScrollVectorForPosition
(
int
targetPosition
)
{
return
CustomLinerLayoutManager
.
this
.
computeScrollVectorForPosition
(
targetPosition
);
}
@Override
// 滑动位置
public
int
calculateDtToFit
(
int
viewStart
,
int
viewEnd
,
int
boxStart
,
int
boxEnd
,
int
snapPreference
)
{
return
(
boxStart
+
(
boxEnd
-
boxStart
)
/
2
)
-
(
viewStart
+
(
viewEnd
-
viewStart
)
/
2
);
}
protected
float
calculateSpeedPerPixel
(
DisplayMetrics
displayMetrics
)
{
// 控制滑动速度的
return
speedPerPixel
;
}
@Override
protected
int
getVerticalSnapPreference
()
{
return
SNAP_TO_START
;
}
}
}
build.gradle
View file @
53cae3a2
...
...
@@ -5,8 +5,8 @@ buildscript {
ext
.
build_tools_version
=
"29.0.2"
ext
.
min_sdk_version
=
21
ext
.
target_sdk_version
=
29
ext
.
version_code
=
31
1
ext
.
verson_name
=
"3.1.
1
"
ext
.
version_code
=
31
2
ext
.
verson_name
=
"3.1.
2
"
ext
.
gradle_version
=
'4.0.1'
ext
.
isReleaseMinify
=
false
ext
.
isDebugMinify
=
false
...
...
saleCenter/src/main/res/layout/fragment_common_sale.xml
View file @
53cae3a2
...
...
@@ -76,22 +76,22 @@
android:id=
"@+id/ll_bussiness"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/
white
"
android:background=
"@color/
line_color
"
android:orientation=
"vertical"
>
<com.dayu.widgets.AutoPollRecyclerView
android:id=
"@+id/rv_reward"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/dp_45"
/>
android:layout_height=
"@dimen/dp_45"
/>
<LinearLayout
android:id=
"@+id/ll_bfcom"
android:layout_width=
"match_parent"
android:layout_height=
"
@dimen/dp_40
"
android:layout_height=
"
wrap_content
"
android:layout_marginTop=
"@dimen/dp_3"
android:layout_marginBottom=
"@dimen/dp_
3
"
android:layout_marginLeft=
"@dimen/dp_
3
0"
android:layout_marginRight=
"@dimen/dp_
3
0"
android:layout_marginBottom=
"@dimen/dp_
6
"
android:layout_marginLeft=
"@dimen/dp_
5
0"
android:layout_marginRight=
"@dimen/dp_
5
0"
android:orientation=
"horizontal"
android:gravity=
"center"
android:background=
"@drawable/btn_blue_commom"
>
...
...
@@ -106,9 +106,9 @@
<ImageView
android:id=
"@+id/iv_bfcom"
android:layout_width=
"@dimen/dp_4
0
"
android:layout_height=
"
match_parent
"
android:layout_marginLeft=
"@dimen/dp_
10
"
android:layout_width=
"@dimen/dp_4
5
"
android:layout_height=
"
@dimen/dp_45
"
android:layout_marginLeft=
"@dimen/dp_
6
"
android:padding=
"2dp"
android:background=
"@drawable/bfcom_anim"
android:layout_gravity=
"center_horizontal"
/>
...
...
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