Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
supplier
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王宇航
supplier
Commits
b3a5330a
Commit
b3a5330a
authored
Mar 25, 2020
by
Wyh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
3-25 引導頁
parent
f8ac03e3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
360 additions
and
1 deletions
+360
-1
main/src/main/res/drawable/shape_triangle.xml
+15
-0
public-base/src/main/java/com/gingersoft/gsa/cloud/ui/view/TriangleView.java
+93
-0
public-base/src/main/java/com/gingersoft/gsa/cloud/ui/widget/Indicator/UIndicator.java
+0
-0
public-base/src/main/res/anim/rotate_anticlockwise_anim.xml
+12
-0
public-base/src/main/res/anim/rotate_clockwise_anim.xml
+12
-0
public-base/src/main/res/drawable-xhdpi/ic_guide_close.png
+0
-0
public-base/src/main/res/layout/pager_navigator_layout.xml
+28
-0
public-base/src/main/res/layout/pager_navigator_layout_no_scroll.xml
+19
-0
user-login/src/main/java/com/gingersoft/gsa/cloud/user/login/mvp/bean/GuideBean.java
+40
-0
user-login/src/main/java/com/gingersoft/gsa/cloud/user/login/mvp/ui/adapter/GuideAdapter.java
+77
-0
user-login/src/main/res/anim/anim_alpha_hide.xml
+8
-0
user-login/src/main/res/anim/anim_alpha_show.xml
+8
-0
user-login/src/main/res/layout/item_guide.xml
+47
-0
user-login/src/main/res/layout/user_login_activity_login.xml
+1
-1
user-login/src/main/res/mipmap-xhdpi/img_start.jpg
+0
-0
user-login/src/main/res/mipmap-xhdpi/pic_guide_bg.png
+0
-0
user-login/src/main/res/mipmap-xhdpi/pic_guide_one.png
+0
-0
user-login/src/main/res/mipmap-xhdpi/pic_guide_three.png
+0
-0
user-login/src/main/res/mipmap-xhdpi/pic_guide_two.png
+0
-0
No files found.
main/src/main/res/drawable/shape_triangle.xml
0 → 100644
View file @
b3a5330a
<?xml version="1.0" encoding="utf-8"?>
<layer-list
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:id=
"@+id/shape_id"
>
<!-- 正三角 -->
<rotate
android:fromDegrees=
"45"
android:pivotX=
"80%"
android:pivotY=
"50%"
>
<shape
android:shape=
"rectangle"
>
<solid
android:color=
"#C8C8C8"
/>
</shape>
</rotate>
</item>
</layer-list>
\ No newline at end of file
public-base/src/main/java/com/gingersoft/gsa/cloud/ui/view/TriangleView.java
0 → 100644
View file @
b3a5330a
package
com
.
gingersoft
.
gsa
.
cloud
.
ui
.
view
;
import
android.content.Context
;
import
android.content.res.TypedArray
;
import
android.graphics.Canvas
;
import
android.graphics.Paint
;
import
android.graphics.Path
;
import
android.util.AttributeSet
;
import
android.view.animation.AnimationUtils
;
import
com.gingersoft.gsa.cloud.base.R
;
import
com.qmuiteam.qmui.alpha.QMUIAlphaImageButton
;
public
class
TriangleView
extends
QMUIAlphaImageButton
{
private
static
final
int
TOP
=
0
;
private
static
final
int
BOTTOM
=
1
;
private
static
final
int
RIGHT
=
2
;
private
static
final
int
LEFT
=
3
;
private
Paint
mPaint
;
private
Path
path
;
//三角形朝向
private
int
direction
;
private
int
color
;
private
boolean
isOpen
;
public
TriangleView
(
Context
context
)
{
this
(
context
,
null
);
}
public
TriangleView
(
Context
context
,
AttributeSet
attrs
)
{
this
(
context
,
attrs
,
0
);
}
public
TriangleView
(
Context
context
,
AttributeSet
attrs
,
int
defStyleAttr
)
{
super
(
context
,
attrs
,
defStyleAttr
);
TypedArray
typedArray
=
context
.
obtainStyledAttributes
(
attrs
,
R
.
styleable
.
TriangleView
,
0
,
0
);
color
=
typedArray
.
getColor
(
R
.
styleable
.
TriangleView_trv_color
,
context
.
getResources
().
getColor
(
R
.
color
.
color_c8
));
direction
=
typedArray
.
getInt
(
R
.
styleable
.
TriangleView_trv_direction
,
TOP
);
typedArray
.
recycle
();
init
();
}
//初始化畫筆
private
void
init
()
{
mPaint
=
new
Paint
();
//設置抗鋸齒
mPaint
.
setAntiAlias
(
true
);
mPaint
.
setStyle
(
Paint
.
Style
.
FILL
);
mPaint
.
setColor
(
color
);
path
=
new
Path
();
}
@Override
protected
void
onDraw
(
Canvas
canvas
)
{
super
.
onDraw
(
canvas
);
switch
(
direction
)
{
case
TOP:
path
.
moveTo
(
0
,
getHeight
());
path
.
lineTo
(
getWidth
(),
getHeight
());
path
.
lineTo
(
getWidth
()
/
2
,
0
);
break
;
case
BOTTOM:
path
.
moveTo
(
0
,
0
);
path
.
lineTo
(
getWidth
()
/
2
,
getHeight
());
path
.
lineTo
(
getWidth
(),
0
);
break
;
case
RIGHT:
path
.
moveTo
(
0
,
0
);
path
.
lineTo
(
0
,
getHeight
());
path
.
lineTo
(
getWidth
(),
getHeight
()
/
2
);
break
;
case
LEFT:
path
.
moveTo
(
0
,
getHeight
()
/
2
);
path
.
lineTo
(
getWidth
(),
getHeight
());
path
.
lineTo
(
getWidth
(),
0
);
break
;
}
path
.
close
();
canvas
.
drawPath
(
path
,
mPaint
);
}
public
void
toggle
(){
if
(
isOpen
){
startAnimation
(
AnimationUtils
.
loadAnimation
(
getContext
(),
R
.
anim
.
rotate_anticlockwise_anim
));
}
else
{
startAnimation
(
AnimationUtils
.
loadAnimation
(
getContext
(),
R
.
anim
.
rotate_clockwise_anim
));
}
isOpen
=
!
isOpen
;
}
}
public-base/src/main/java/com/gingersoft/gsa/cloud/ui/widget/Indicator/UIndicator.java
0 → 100644
View file @
b3a5330a
This diff is collapsed.
Click to expand it.
public-base/src/main/res/anim/rotate_anticlockwise_anim.xml
0 → 100644
View file @
b3a5330a
<?xml version="1.0" encoding="utf-8"?>
<rotate
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:duration=
"500"
android:fillAfter=
"true"
android:fromDegrees=
"180"
android:interpolator=
"@android:interpolator/decelerate_cubic"
android:pivotX=
"50%"
android:pivotY=
"50%"
android:toDegrees=
"359"
/>
<!-- android:repeatCount="0"-->
\ No newline at end of file
public-base/src/main/res/anim/rotate_clockwise_anim.xml
0 → 100644
View file @
b3a5330a
<?xml version="1.0" encoding="utf-8"?>
<rotate
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:duration=
"500"
android:fillAfter=
"true"
android:fromDegrees=
"0"
android:interpolator=
"@android:interpolator/decelerate_cubic"
android:pivotX=
"50%"
android:pivotY=
"50%"
android:toDegrees=
"180"
/>
<!-- android:repeatCount="0"-->
\ No newline at end of file
public-base/src/main/res/drawable-xhdpi/ic_guide_close.png
0 → 100644
View file @
b3a5330a
332 Bytes
public-base/src/main/res/layout/pager_navigator_layout.xml
0 → 100644
View file @
b3a5330a
<?xml version="1.0" encoding="utf-8"?>
<HorizontalScrollView
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:id=
"@+id/scroll_view"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:fadingEdge=
"none"
android:scrollbars=
"none"
>
<FrameLayout
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
>
<LinearLayout
android:id=
"@+id/indicator_container"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"horizontal"
/>
<LinearLayout
android:id=
"@+id/title_container"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:orientation=
"horizontal"
/>
</FrameLayout>
</HorizontalScrollView>
\ No newline at end of file
public-base/src/main/res/layout/pager_navigator_layout_no_scroll.xml
0 → 100644
View file @
b3a5330a
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<LinearLayout
android:id=
"@+id/indicator_container"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"horizontal"
/>
<LinearLayout
android:id=
"@+id/title_container"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"horizontal"
/>
</FrameLayout>
\ No newline at end of file
user-login/src/main/java/com/gingersoft/gsa/cloud/user/login/mvp/bean/GuideBean.java
0 → 100644
View file @
b3a5330a
package
com
.
gingersoft
.
gsa
.
cloud
.
user
.
login
.
mvp
.
bean
;
import
android.graphics.drawable.Drawable
;
public
class
GuideBean
{
private
String
title
;
private
String
details
;
private
Drawable
img
;
public
GuideBean
(
String
title
,
String
details
,
Drawable
img
)
{
this
.
title
=
title
;
this
.
details
=
details
;
this
.
img
=
img
;
}
public
String
getTitle
()
{
return
title
;
}
public
void
setTitle
(
String
title
)
{
this
.
title
=
title
;
}
public
String
getDetails
()
{
return
details
;
}
public
void
setDetails
(
String
details
)
{
this
.
details
=
details
;
}
public
Drawable
getImg
()
{
return
img
;
}
public
void
setImg
(
Drawable
img
)
{
this
.
img
=
img
;
}
}
user-login/src/main/java/com/gingersoft/gsa/cloud/user/login/mvp/ui/adapter/GuideAdapter.java
0 → 100644
View file @
b3a5330a
package
com
.
gingersoft
.
gsa
.
cloud
.
user
.
login
.
mvp
.
ui
.
adapter
;
import
android.content.Context
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.widget.ImageView
;
import
android.widget.TextView
;
import
androidx.annotation.NonNull
;
import
androidx.recyclerview.widget.RecyclerView
;
import
com.gingersoft.gsa.cloud.user.login.R
;
import
com.gingersoft.gsa.cloud.user.login.mvp.bean.GuideBean
;
import
java.util.List
;
import
static
com
.
jess
.
arms
.
utils
.
DeviceUtils
.
getScreenWidth
;
public
class
GuideAdapter
extends
RecyclerView
.
Adapter
<
GuideAdapter
.
BaseViewHolder
>
{
private
List
<
GuideBean
>
guideBeanList
;
private
Context
mContext
;
public
GuideAdapter
(
Context
mContext
,
List
<
GuideBean
>
guideBeanList
)
{
this
.
guideBeanList
=
guideBeanList
;
this
.
mContext
=
mContext
;
}
@NonNull
@Override
public
BaseViewHolder
onCreateViewHolder
(
@NonNull
ViewGroup
parent
,
int
viewType
)
{
return
new
BaseViewHolder
(
LayoutInflater
.
from
(
parent
.
getContext
()).
inflate
(
R
.
layout
.
item_guide
,
parent
,
false
));
}
@Override
public
void
onBindViewHolder
(
@NonNull
BaseViewHolder
holder
,
int
position
)
{
GuideBean
item
=
guideBeanList
.
get
(
position
);
holder
.
title
.
setText
(
item
.
getTitle
());
holder
.
details
.
setText
(
item
.
getDetails
());
ViewGroup
.
LayoutParams
params
=
holder
.
img
.
getLayoutParams
();
if
(
position
==
0
)
{
params
.
width
=
(
int
)
(
getScreenWidth
(
mContext
)
*
0.75
);
params
.
height
=
(
int
)
(
params
.
width
*
1.04
);
}
else
if
(
position
==
1
)
{
params
.
width
=
ViewGroup
.
LayoutParams
.
MATCH_PARENT
;
params
.
height
=
(
int
)
(
params
.
width
*
1.04
);
}
else
if
(
position
==
2
)
{
params
.
width
=
(
int
)
(
getScreenWidth
(
mContext
)
*
0.8
);
params
.
height
=
(
int
)
(
params
.
width
*
1.1
);
}
holder
.
img
.
setLayoutParams
(
params
);
holder
.
img
.
setImageDrawable
(
item
.
getImg
());
}
@Override
public
int
getItemCount
()
{
return
guideBeanList
==
null
?
0
:
guideBeanList
.
size
();
}
public
class
BaseViewHolder
extends
RecyclerView
.
ViewHolder
{
private
TextView
title
;
private
TextView
details
;
private
ImageView
img
;
public
BaseViewHolder
(
@NonNull
View
itemView
)
{
super
(
itemView
);
title
=
itemView
.
findViewById
(
R
.
id
.
tv_title
);
details
=
itemView
.
findViewById
(
R
.
id
.
tv_details
);
img
=
itemView
.
findViewById
(
R
.
id
.
iv_guide_img
);
}
}
}
user-login/src/main/res/anim/anim_alpha_hide.xml
0 → 100644
View file @
b3a5330a
<?xml version="1.0" encoding="utf-8"?>
<alpha
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:duration=
"600"
android:fillAfter=
"true"
android:fillBefore=
"true"
android:fromAlpha=
"1"
android:toAlpha=
"0"
/>
user-login/src/main/res/anim/anim_alpha_show.xml
0 → 100644
View file @
b3a5330a
<?xml version="1.0" encoding="utf-8"?>
<alpha
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:duration=
"600"
android:fillAfter=
"true"
android:fillBefore=
"true"
android:fromAlpha=
"0"
android:toAlpha=
"1"
/>
user-login/src/main/res/layout/item_guide.xml
0 → 100644
View file @
b3a5330a
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
<TextView
android:id=
"@+id/tv_title"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/dp_18"
android:text=
"多终端云同步,轻松管理所有"
android:textColor=
"@color/white"
android:textSize=
"@dimen/dp_19"
android:visibility=
"gone"
app:layout_constraintBottom_toTopOf=
"@id/tv_details"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintVertical_bias=
"0.12"
app:layout_constraintVertical_chainStyle=
"packed"
/>
<TextView
android:id=
"@+id/tv_details"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_14"
android:text=
"為您搭建優良高效管理平台"
android:textColor=
"@color/white"
android:textSize=
"@dimen/dp_13"
android:visibility=
"gone"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintLeft_toLeftOf=
"@id/tv_title"
app:layout_constraintTop_toBottomOf=
"@id/tv_title"
/>
<ImageView
android:id=
"@+id/iv_guide_img"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
user-login/src/main/res/layout/user_login_activity_login.xml
View file @
b3a5330a
...
...
@@ -158,7 +158,7 @@
android:layout_width=
"@dimen/dp_30"
android:layout_height=
"@dimen/dp_30"
android:padding=
"@dimen/dp_5"
android:src=
"@
mipmap
/ic_clear_text"
android:src=
"@
drawable
/ic_clear_text"
android:visibility=
"gone"
app:layout_constraintBottom_toBottomOf=
"@id/ed_login_user_pwd"
app:layout_constraintRight_toRightOf=
"parent"
...
...
user-login/src/main/res/mipmap-xhdpi/img_start.jpg
0 → 100644
View file @
b3a5330a
62.5 KB
user-login/src/main/res/mipmap-xhdpi/pic_guide_bg.png
0 → 100644
View file @
b3a5330a
16.2 KB
user-login/src/main/res/mipmap-xhdpi/pic_guide_one.png
0 → 100644
View file @
b3a5330a
24.2 KB
user-login/src/main/res/mipmap-xhdpi/pic_guide_three.png
0 → 100644
View file @
b3a5330a
33.7 KB
user-login/src/main/res/mipmap-xhdpi/pic_guide_two.png
0 → 100644
View file @
b3a5330a
67.7 KB
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