Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
ShenghuoquanBusiness
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bp
ShenghuoquanBusiness
Commits
9b3d63bf
Commit
9b3d63bf
authored
Jun 22, 2021
by
shiyl
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_7.2' of
https://git.yidian-inc.com:8021/bp/ShenghuoquanBusiness
into dev_7.2
parents
4ba35d74
708e3fc8
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
181 additions
and
9 deletions
+181
-9
StoreAdapter.kt
...m/yidian/shenghuoquan/newscontent/adapter/StoreAdapter.kt
+36
-0
Store.kt
...in/java/com/yidian/shenghuoquan/newscontent/bean/Store.kt
+23
-0
StoreManagementActivity.kt
...an/shenghuoquan/newscontent/ui/StoreManagementActivity.kt
+15
-0
StoreViewHolder.kt
...an/shenghuoquan/newscontent/viewholder/StoreViewHolder.kt
+22
-0
LifeAccountAuthCardView.kt
...henghuoquan/newscontent/widget/LifeAccountAuthCardView.kt
+2
-6
store_card_back.xml
...nts/newscontent/src/main/res/drawable/store_card_back.xml
+7
-0
activity_store_management.xml
...content/src/main/res/layout/activity_store_management.xml
+9
-3
store_management_item.xml
...newscontent/src/main/res/layout/store_management_item.xml
+67
-0
store_edit.png
...nts/newscontent/src/main/res/mipmap-xxhdpi/store_edit.png
+0
-0
No files found.
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/adapter/StoreAdapter.kt
0 → 100644
View file @
9b3d63bf
package
com.yidian.shenghuoquan.newscontent.adapter
import
android.content.Context
import
android.view.LayoutInflater
import
android.view.ViewGroup
import
androidx.recyclerview.widget.RecyclerView
import
com.yidian.shenghuoquan.newscontent.R
import
com.yidian.shenghuoquan.newscontent.bean.Store
import
com.yidian.shenghuoquan.newscontent.viewholder.StoreViewHolder
/**
* Author: sym
* Date: 2021/6/22 3:15 PM
* Describe:
*/
class
StoreAdapter
(
private
val
context
:
Context
,
private
val
dataList
:
ArrayList
<
Store
>)
:
RecyclerView
.
Adapter
<
StoreViewHolder
>()
{
override
fun
onCreateViewHolder
(
parent
:
ViewGroup
,
viewType
:
Int
):
StoreViewHolder
{
val
view
=
LayoutInflater
.
from
(
context
).
inflate
(
R
.
layout
.
store_management_item
,
parent
,
false
)
return
StoreViewHolder
(
view
)
}
override
fun
onBindViewHolder
(
holder
:
StoreViewHolder
,
position
:
Int
)
{
val
store
=
dataList
[
position
]
holder
.
setData
(
store
,
position
)
}
override
fun
getItemCount
():
Int
{
return
dataList
.
size
}
interface
HolderListener
{
fun
jump
()
}
}
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/bean/Store.kt
0 → 100644
View file @
9b3d63bf
package
com.yidian.shenghuoquan.newscontent.bean
/**
* Author: sym
* Date: 2021/6/22 3:18 PM
* Describe:
*/
class
Store
(
var
title
:
String
)
object
StoreDataList
{
val
data
=
arrayListOf
(
Store
(
"Cherry"
),
Store
(
"Grape"
),
Store
(
"Mango"
),
Store
(
"Orange"
),
Store
(
"Pear"
),
Store
(
"Pineapple"
),
Store
(
"Strawberry"
),
Store
(
"Watermelon"
)
)
}
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/ui/StoreManagementActivity.kt
View file @
9b3d63bf
package
com.yidian.shenghuoquan.newscontent.ui
import
android.os.Bundle
import
androidx.recyclerview.widget.LinearLayoutManager
import
com.yidian.common.XRouterPathConstants.Companion.STORE_MANAGEMENT
import
com.yidian.common.base.BaseActivity
import
com.yidian.shenghuoquan.newscontent.adapter.StoreAdapter
import
com.yidian.shenghuoquan.newscontent.bean.StoreDataList
import
com.yidian.shenghuoquan.newscontent.databinding.ActivityStoreManagementBinding
/**
...
...
@@ -17,4 +21,15 @@ class StoreManagementActivity : BaseActivity<ActivityStoreManagementBinding>() {
override
fun
getXPageName
():
String
{
return
STORE_MANAGEMENT
}
override
fun
init
(
savedInstanceState
:
Bundle
?)
{
super
.
init
(
savedInstanceState
)
val
layoutManager
=
LinearLayoutManager
(
this
)
layoutManager
.
orientation
=
LinearLayoutManager
.
VERTICAL
viewBind
.
storeList
.
layoutManager
=
layoutManager
val
adapter
=
StoreAdapter
(
this
,
StoreDataList
.
data
)
viewBind
.
storeList
.
adapter
=
adapter
}
}
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/viewholder/StoreViewHolder.kt
0 → 100644
View file @
9b3d63bf
package
com.yidian.shenghuoquan.newscontent.viewholder
import
android.view.View
import
androidx.recyclerview.widget.RecyclerView
import
com.yidian.shenghuoquan.newscontent.bean.Store
import
com.yidian.shenghuoquan.newscontent.bean.StoreDataList
/**
* Author: sym
* Date: 2021/6/22 3:23 PM
* Describe:
*/
class
StoreViewHolder
(
itemView
:
View
)
:
RecyclerView
.
ViewHolder
(
itemView
)
{
fun
setData
(
data
:
Store
,
pos
:
Int
)
{
/* val title = itemView.findViewById<TextView>(R.id.tvTitle)
title.text = hobby?.title */
}
}
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/widget/LifeAccountAuthCardView.kt
View file @
9b3d63bf
...
...
@@ -19,11 +19,7 @@ class LifeAccountAuthCardView @JvmOverloads constructor(
)
:
CardView
(
context
,
attrs
,
defStyle
)
{
private
val
viewBinding
:
ViewLifeAccountAuthCardBinding
=
ViewLifeAccountAuthCardBinding
.
bind
(
View
.
inflate
(
getContext
(),
R
.
layout
.
view_life_account_auth_card
,
this
)
View
.
inflate
(
getContext
(),
R
.
layout
.
view_life_account_auth_card
,
this
)
)
/**
...
...
@@ -44,4 +40,4 @@ class LifeAccountAuthCardView @JvmOverloads constructor(
viewBinding
.
tvDescription
.
text
=
description
viewBinding
.
ivAuthenticated
.
visibility
=
if
(
isAuthenticated
)
View
.
VISIBLE
else
View
.
GONE
}
}
\ No newline at end of file
}
Components/newscontent/src/main/res/drawable/store_card_back.xml
0 → 100644
View file @
9b3d63bf
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<corners
android:radius=
"10dp"
/>
<solid
android:color=
"#fff"
/>
</shape>
\ No newline at end of file
Components/newscontent/src/main/res/layout/activity_store_management.xml
View file @
9b3d63bf
<?xml version="1.0" encoding="utf-8"?>
<
androidx.constraintlayout.widget.Constraint
Layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<
Linear
Layout
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:fitsSystemWindows=
"true"
>
android:fitsSystemWindows=
"true"
android:orientation=
"vertical"
>
<com.yidian.shenghuoquan.newscontent.widget.CommonTopBarView
android:id=
"@+id/bv_top_bar"
...
...
@@ -12,5 +13,10 @@
app:CommonTopBarView_title_text=
"@string/store_management_title"
app:layout_constraintTop_toTopOf=
"parent"
/>
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/store_list"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
</LinearLayout>
\ No newline at end of file
Components/newscontent/src/main/res/layout/store_management_item.xml
0 → 100644
View file @
9b3d63bf
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"120dp"
android:layout_marginStart=
"20dp"
android:layout_marginEnd=
"20dp"
>
<ImageView
android:id=
"@+id/store_edit_icon"
android:layout_width=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"23dp"
android:layout_alignParentRight=
"true"
android:background=
"@mipmap/store_edit"
/>
<LinearLayout
android:layout_toLeftOf=
"@id/store_edit_icon"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:orientation=
"vertical"
android:paddingStart=
"23dp"
>
<TextView
android:id=
"@+id/store_name"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:includeFontPadding=
"false"
android:text=
"一点资讯生活号实体店1分店"
android:textColor=
"#FF333333"
android:textSize=
"16sp"
android:textStyle=
"bold"
/>
<TextView
android:id=
"@+id/store_address"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"6dp"
android:ellipsize=
"end"
android:includeFontPadding=
"false"
android:maxLines=
"2"
android:text=
"朝阳区恒通国际创新园C7一点资讯北侧.朝阳区恒通国际创新园C7一点资讯北侧.朝阳区恒通国际创新园C7一点资讯北侧"
android:textColor=
"#9d9d9d"
android:textSize=
"12sp"
/>
<TextView
android:id=
"@+id/store_phone"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"6dp"
android:includeFontPadding=
"false"
android:text=
"13888888888"
android:textColor=
"#9d9d9d"
android:textSize=
"12sp"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"1dp"
android:layout_alignParentBottom=
"true"
android:layout_marginTop=
"20dp"
android:background=
"#f2f2f2"
/>
</RelativeLayout>
\ No newline at end of file
Components/newscontent/src/main/res/mipmap-xxhdpi/store_edit.png
0 → 100644
View file @
9b3d63bf
1.59 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