Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YDL-Component-Medical
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨凯
YDL-Component-Medical
Commits
71414eba
Commit
71414eba
authored
Aug 17, 2022
by
王佳洋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IP属地信息展示
parent
39de8632
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
77 additions
and
27 deletions
+77
-27
MemberFragment.java
m-dynamic/src/main/java/com/yidianling/dynamic/members/MemberFragment.java
+7
-3
MembersActivity.java
m-dynamic/src/main/java/com/yidianling/dynamic/members/MembersActivity.java
+18
-19
CommentBean.java
m-dynamic/src/main/java/com/yidianling/dynamic/model/CommentBean.java
+9
-0
MemberInfoBean.java
m-dynamic/src/main/java/com/yidianling/dynamic/model/MemberInfoBean.java
+2
-0
TrendsDetailInfoBean.java
m-dynamic/src/main/java/com/yidianling/dynamic/model/TrendsDetailInfoBean.java
+1
-0
TrendsDetailActivity.java
m-dynamic/src/main/java/com/yidianling/dynamic/trendsDetail/TrendsDetailActivity.java
+4
-2
dynamic_activity_trend_details.xml
m-dynamic/src/main/res/layout/dynamic_activity_trend_details.xml
+4
-2
dynamic_fragment_member.xml
m-dynamic/src/main/res/layout/dynamic_fragment_member.xml
+21
-0
dynamic_item_talk_list.xml
m-dynamic/src/main/res/layout/dynamic_item_talk_list.xml
+11
-0
colors.xml
ydl-platform/src/main/res/values/colors.xml
+0
-1
No files found.
m-dynamic/src/main/java/com/yidianling/dynamic/members/MemberFragment.java
View file @
71414eba
...
...
@@ -20,11 +20,11 @@ public class MemberFragment extends DynamicFragment {
private
View
view
;
private
Context
context
;
private
TextView
member_age_tv
,
member_emotional_state_tv
,
member_job_tv
,
member_address_tv
,
member_introduction_tv
;
private
TextView
member_age_tv
,
member_emotional_state_tv
,
member_job_tv
,
member_address_tv
,
member_introduction_tv
,
member_ip_tv
;
String
age
,
emotional_state
,
job
,
address
,
introduction
;
String
age
,
emotional_state
,
job
,
address
,
introduction
,
ipProvince
;
public
static
MemberFragment
newInstance
(
String
age
,
String
emotional_state
,
String
job
,
String
address
,
String
introduction
){
public
static
MemberFragment
newInstance
(
String
age
,
String
emotional_state
,
String
job
,
String
address
,
String
introduction
,
String
ipProvince
){
MemberFragment
memberFragment
=
new
MemberFragment
();
Bundle
args
=
new
Bundle
();
args
.
putString
(
"age"
,
age
);
...
...
@@ -32,6 +32,7 @@ public class MemberFragment extends DynamicFragment {
args
.
putString
(
"job"
,
job
);
args
.
putString
(
"address"
,
address
);
args
.
putString
(
"introduction"
,
introduction
);
args
.
putString
(
"ipProvince"
,
ipProvince
);
memberFragment
.
setArguments
(
args
);
return
memberFragment
;
}
...
...
@@ -46,18 +47,21 @@ public class MemberFragment extends DynamicFragment {
member_job_tv
=(
TextView
)
view
.
findViewById
(
R
.
id
.
member_job_tv
);
member_address_tv
=(
TextView
)
view
.
findViewById
(
R
.
id
.
member_address_tv
);
member_introduction_tv
=(
TextView
)
view
.
findViewById
(
R
.
id
.
member_introduction_tv
);
member_ip_tv
=
view
.
findViewById
(
R
.
id
.
member_ip_tv
);
age
=
getArguments
().
getString
(
"age"
);
emotional_state
=
getArguments
().
getString
(
"emotional_state"
);
job
=
getArguments
().
getString
(
"job"
);
address
=
getArguments
().
getString
(
"address"
);
introduction
=
getArguments
().
getString
(
"introduction"
);
ipProvince
=
getArguments
().
getString
(
"ipProvince"
);
member_age_tv
.
setText
(
age
);
member_emotional_state_tv
.
setText
(
emotional_state
);
member_job_tv
.
setText
(
job
);
member_address_tv
.
setText
(
address
);
member_introduction_tv
.
setText
(
introduction
);
member_ip_tv
.
setText
(
ipProvince
);
return
view
;
}
}
m-dynamic/src/main/java/com/yidianling/dynamic/members/MembersActivity.java
View file @
71414eba
...
...
@@ -83,7 +83,7 @@ public class MembersActivity extends BaseActivity implements View.OnClickListene
List
<
String
>
reportReasons
;
//举报内容列表
private
FragmentManager
fragmentManager
;
String
age
,
emotional_state
,
job
,
address
,
introduction
;
String
age
,
emotional_state
,
job
,
address
,
introduction
,
ipProvince
;
String
focus_state
;
//关注状态
boolean
zan_state
;
...
...
@@ -250,6 +250,7 @@ public class MembersActivity extends BaseActivity implements View.OnClickListene
job
=
person
.
profession
;
address
=
person
.
address
;
introduction
=
person
.
description
;
ipProvince
=
person
.
ipProvince
;
String
bg
=
person
.
bg
;
GlideApp
.
with
(
MembersActivity
.
this
)
.
load
(
head
)
...
...
@@ -488,7 +489,7 @@ public class MembersActivity extends BaseActivity implements View.OnClickListene
private
void
RightSet
()
{
final
List
<
String
>
dialog_datas
=
new
ArrayList
<
String
>();
if
(
shielding
==
false
)
{
if
(
!
shielding
)
{
dialog_datas
.
add
(
"屏蔽ta"
);
}
else
{
dialog_datas
.
add
(
"解除屏蔽"
);
...
...
@@ -507,22 +508,20 @@ public class MembersActivity extends BaseActivity implements View.OnClickListene
builder1
.
SetOnItemClickLister
(
new
ListDialog
.
Builder
.
OnItemClickLister
()
{
@Override
public
void
onItemClick
(
Dialog
dialog
,
View
view
,
int
position
)
{
if
(
dialog_datas
.
size
()
==
2
)
{
//不含取消关注
switch
(
position
)
{
case
0
:
if
(
shielding
==
false
)
{
shieldHint
();
}
else
{
RemoveShielding
();
}
break
;
case
1
:
report
();
break
;
case
2
:
ARouter
.
getInstance
().
build
(
"/mine/FeedBackActivity"
).
navigation
();
break
;
}
switch
(
position
)
{
case
0
:
if
(!
shielding
)
{
shieldHint
();
}
else
{
RemoveShielding
();
}
break
;
case
1
:
report
();
break
;
case
2
:
ARouter
.
getInstance
().
build
(
"/mine/FeedBackActivity"
).
navigation
();
break
;
}
dialog
.
dismiss
();
}
...
...
@@ -743,7 +742,7 @@ public class MembersActivity extends BaseActivity implements View.OnClickListene
members_information_tv
.
setTextColor
(
getResources
().
getColor
(
R
.
color
.
platform_main_theme
));
members_information_hint_tv
.
setBackgroundColor
(
getResources
().
getColor
(
R
.
color
.
platform_main_theme
));
if
(
memberfragment
==
null
)
{
memberfragment
=
MemberFragment
.
newInstance
(
age
,
emotional_state
,
job
,
address
,
introduction
);
memberfragment
=
MemberFragment
.
newInstance
(
age
,
emotional_state
,
job
,
address
,
introduction
,
ipProvince
);
transaction
.
add
(
R
.
id
.
members_content_frm
,
memberfragment
);
}
else
{
transaction
.
show
(
memberfragment
);
...
...
m-dynamic/src/main/java/com/yidianling/dynamic/model/CommentBean.java
View file @
71414eba
...
...
@@ -35,6 +35,7 @@ public class CommentBean {
private
ShareData
share_data
;
private
int
isAvailable
;
//是否空闲 0-否 1-是
private
int
isOpenListen
;
//是否开通倾诉 0-否 1-是
private
String
ipProvince
;
private
String
listenLinkUrl
;
//统一路由url
...
...
@@ -52,6 +53,14 @@ public class CommentBean {
return
isOpenListen
;
}
public
String
getIpProvince
()
{
return
ipProvince
;
}
public
void
setIpProvince
(
String
ipProvince
)
{
this
.
ipProvince
=
ipProvince
;
}
public
ShareData
getShare_data
()
{
return
share_data
;
}
...
...
m-dynamic/src/main/java/com/yidianling/dynamic/model/MemberInfoBean.java
View file @
71414eba
...
...
@@ -24,5 +24,7 @@ public class MemberInfoBean {
public
String
description
;
public
String
address
;
public
String
bg
;
public
String
ipProvince
;
}
}
m-dynamic/src/main/java/com/yidianling/dynamic/model/TrendsDetailInfoBean.java
View file @
71414eba
...
...
@@ -76,6 +76,7 @@ public class TrendsDetailInfoBean {
public
String
uid
;
public
String
multitextType
;
//动态类型
public
ExtAd
ext
;
public
String
ipProvince
;
}
//图片
...
...
m-dynamic/src/main/java/com/yidianling/dynamic/trendsDetail/TrendsDetailActivity.java
View file @
71414eba
...
...
@@ -948,6 +948,7 @@ public class TrendsDetailActivity extends BaseMvpActivity<ITrendsDetailView, ITr
holder
.
setHeadImageWithUrl
(
R
.
id
.
item_recommend_trend_user_head_iv
,
data
.
getHeader
());
//头像
holder
.
setText
(
R
.
id
.
text_userName
,
data
.
getName
());
//用户名
holder
.
setText
(
R
.
id
.
text_time
,
data
.
getTime_str
());
//发布时间
holder
.
setText
(
R
.
id
.
tv_ip
,
"IP属地: "
+
data
.
getIpProvince
());
// IP属地
holder
.
setImageResource
(
R
.
id
.
img_comment_sex
,
data
.
getGender
()
==
1
?
R
.
drawable
.
dynamic_male
:
R
.
drawable
.
dynamic_female
);
holder
.
setImageResource
(
R
.
id
.
img_comment_zan
,
data
.
getIs_zan
()
==
1
?
R
.
drawable
.
dynamic_reply_zan_sel
:
R
.
drawable
.
dynamic_reply_zan
);
showCommentItemContent
(
holder
,
data
);
...
...
@@ -1406,6 +1407,7 @@ public class TrendsDetailActivity extends BaseMvpActivity<ITrendsDetailView, ITr
return
commentCount
>
commentListAdapter
.
getDatas
().
size
();
}
@SuppressLint
(
"SetTextI18n"
)
private
void
fillContent
()
{
linComment
.
setVisibility
(
VISIBLE
);
linContent
.
setVisibility
(
View
.
VISIBLE
);
...
...
@@ -1420,8 +1422,8 @@ public class TrendsDetailActivity extends BaseMvpActivity<ITrendsDetailView, ITr
tvContent
.
setVisibility
(
View
.
GONE
);
}
tvUserName
.
setText
(
mTrendBody
.
name
);
tvTime
.
setText
(
mTrendBody
.
timeStr
+
"-"
);
//发布时间
tvFrom
.
setText
(
mTrendBody
.
from
);
//来源
tvTime
.
setText
(
mTrendBody
.
timeStr
);
//发布时间
tvFrom
.
setText
(
"IP属地: "
+
mTrendBody
.
ipProvince
);
// IP属地
if
(
TextUtils
.
isEmpty
(
mTrendBody
.
title
))
{
tvTrendInfoTitle
.
setVisibility
(
GONE
);
...
...
m-dynamic/src/main/res/layout/dynamic_activity_trend_details.xml
View file @
71414eba
...
...
@@ -61,6 +61,7 @@
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
tools:visibility=
"visible"
android:visibility=
"gone"
>
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
...
...
@@ -148,7 +149,6 @@
</RelativeLayout>
<TextView
android:id=
"@+id/text_time"
android:layout_width=
"wrap_content"
...
...
@@ -166,11 +166,12 @@
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@+id/text_userName_rel"
android:layout_marginStart=
"10dp"
android:layout_marginTop=
"7dp"
android:layout_toRightOf=
"@id/text_time"
android:textColor=
"@color/dynamic_text_trend_defult"
android:textSize=
"12sp"
tools:text=
"
- 来自安卓客户端
"
/>
tools:text=
"
IP属地: XX
"
/>
<TextView
android:id=
"@+id/text_guanzhu"
...
...
@@ -498,6 +499,7 @@
<com.ydl.ydlcommon.ui.LogoLoadingView
android:id=
"@+id/v_loading"
tools:visibility=
"gone"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
...
...
m-dynamic/src/main/res/layout/dynamic_fragment_member.xml
View file @
71414eba
...
...
@@ -114,4 +114,25 @@
android:text=
""
android:textSize=
"18sp"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
android:layout_marginLeft=
"15dp"
android:layout_marginRight=
"15dp"
android:layout_marginTop=
"15dp"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textColor=
"@color/dynamic_black"
android:text=
"IP属地"
android:textSize=
"18sp"
android:layout_marginRight=
"15dp"
/>
<TextView
android:id=
"@+id/member_ip_tv"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textColor=
"@color/dynamic_black"
android:textSize=
"18sp"
/>
</LinearLayout>
</LinearLayout>
m-dynamic/src/main/res/layout/dynamic_item_talk_list.xml
View file @
71414eba
...
...
@@ -112,6 +112,17 @@
tools:text=
"23分钟前"
/>
<TextView
android:id=
"@+id/tv_ip"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textColor=
"@color/color_9d9ea7"
android:layout_toEndOf=
"@id/text_time"
android:layout_marginStart=
"10dp"
android:textSize=
"12sp"
android:layout_alignBaseline=
"@id/text_time"
tools:text=
"IP属地: XX"
/>
<TextView
android:id=
"@+id/text_chat"
android:layout_width=
"60dp"
android:layout_height=
"30dp"
...
...
ydl-platform/src/main/res/values/colors.xml
View file @
71414eba
...
...
@@ -127,7 +127,6 @@
<color
name=
"color_1C1F28"
>
#1C1F28
</color>
<color
name=
"color_1DA1F2"
>
#1DA1F2
</color>
<color
name=
"color_EB892C"
>
#EB892C
</color>
<color
name=
"color_9D9EA7"
>
#9D9EA7
</color>
<color
name=
"color_EFEFF1"
>
#EFEFF1
</color>
<color
name=
"color_FAFAFF"
>
#FAFAFF
</color>
<color
name=
"color_242424"
>
#242424
</color>
...
...
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