Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOMobile
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fallenstardust
YGOMobile
Commits
f8dbbd05
Commit
f8dbbd05
authored
Aug 05, 2022
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
点击头像切换用户
parent
bb295d5b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
13 deletions
+29
-13
mobile/src/main/java/cn/garymb/ygomobile/ui/mycard/MycardFragment.java
...in/java/cn/garymb/ygomobile/ui/mycard/MycardFragment.java
+7
-0
mobile/src/main/res/layout/fragment_mycard.xml
mobile/src/main/res/layout/fragment_mycard.xml
+22
-13
No files found.
mobile/src/main/java/cn/garymb/ygomobile/ui/mycard/MycardFragment.java
View file @
f8dbbd05
...
...
@@ -22,6 +22,7 @@ import android.view.LayoutInflater;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.widget.ImageView
;
import
android.widget.LinearLayout
;
import
android.widget.ProgressBar
;
import
android.widget.RelativeLayout
;
import
android.widget.TextView
;
...
...
@@ -62,6 +63,7 @@ public class MycardFragment extends BaseFragemnt implements View.OnClickListener
private
SharedPreferences
lastModified
;
long
exitLasttime
=
0
;
//头像昵称账号
private
LinearLayout
ll_head_login
;
private
ImageView
mHeadView
;
private
TextView
mNameView
,
mStatusView
;
private
TextView
tv_back_mc
;
...
...
@@ -119,6 +121,8 @@ public class MycardFragment extends BaseFragemnt implements View.OnClickListener
tv_back_mc
=
view
.
findViewById
(
R
.
id
.
tv_back_mc
);
tv_back_mc
.
setOnClickListener
(
this
);
ll_head_login
=
view
.
findViewById
(
R
.
id
.
ll_head_login
);
ll_head_login
.
setOnClickListener
(
this
);
mHeadView
=
view
.
findViewById
(
R
.
id
.
img_head
);
mNameView
=
view
.
findViewById
(
R
.
id
.
tv_name
);
mStatusView
=
view
.
findViewById
(
R
.
id
.
tv_dp
);
...
...
@@ -307,6 +311,9 @@ public class MycardFragment extends BaseFragemnt implements View.OnClickListener
@Override
public
void
onClick
(
View
v
)
{
switch
(
v
.
getId
())
{
case
R
.
id
.
ll_head_login
:
mWebViewPlus
.
loadUrl
(
"https://accounts.moecube.com/profiles"
);
break
;
case
R
.
id
.
tv_back_mc
:
onHome
();
break
;
...
...
mobile/src/main/res/layout/fragment_mycard.xml
View file @
f8dbbd05
...
...
@@ -3,7 +3,7 @@
android:id=
"@+id/drawer_layout"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"#
dd0B2241
"
android:background=
"#
80000000
"
android:orientation=
"vertical"
>
<FrameLayout
...
...
@@ -14,25 +14,25 @@
android:orientation=
"vertical"
android:padding=
"10dp"
>
<
androidx.appcompat.widget.LinearLayoutCompa
t
<
LinearLayou
t
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:layout_weight=
"1"
android:id=
"@+id/ll_head_login"
android:layout_gravity=
"right"
android:orientation=
"horizontal"
>
<androidx.appcompat.widget.AppCompatImageView
android:id=
"@+id/img_head"
android:layout_width=
"40dp"
android:layout_height=
"40dp"
android:layout_marginRight=
"@dimen/dp_10"
android:src=
"@drawable/avatar"
/>
<FrameLayout
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/tv_name"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
""
android:layout_gravity=
"center"
android:text=
""
android:textColor=
"@color/holo_green_bright"
android:textSize=
"15sp"
android:textStyle=
"bold"
/>
...
...
@@ -43,20 +43,29 @@
android:layout_height=
"wrap_content"
android:layout_below=
"@id/tv_name"
android:layout_marginTop=
"5dp"
android:layout_toRightOf=
"@id/img_head"
android:ellipsize=
"end"
android:lines=
"1"
android:text=
""
android:textColor=
"@color/holo_orange_bright"
android:textSize=
"10sp"
android:visibility=
"invisible"
/>
</androidx.appcompat.widget.LinearLayoutCompat>
android:visibility=
"gone"
/>
</FrameLayout>
<androidx.appcompat.widget.AppCompatImageView
android:id=
"@+id/img_head"
android:layout_width=
"40dp"
android:layout_height=
"40dp"
android:layout_marginLeft=
"@dimen/dp_10"
android:src=
"@drawable/avatar"
/>
</LinearLayout>
<androidx.appcompat.widget.AppCompatButton
android:id=
"@+id/tv_back_mc"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"
righ
t"
android:layout_gravity=
"
lef
t"
android:background=
"@drawable/button_bg"
android:gravity=
"center"
android:text=
"@string/back_to_mycard_home"
...
...
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