Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOMobile-Cn-Ko-En
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-Cn-Ko-En
Commits
548ae05a
Commit
548ae05a
authored
Jan 04, 2020
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
点击大图可以关闭
微调UI
parent
bb9ced53
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
48 deletions
+48
-48
mobile/src/main/java/cn/garymb/ygomobile/ui/cards/CardDetail.java
...rc/main/java/cn/garymb/ygomobile/ui/cards/CardDetail.java
+33
-31
mobile/src/main/res/layout/activity_deck_cards.xml
mobile/src/main/res/layout/activity_deck_cards.xml
+12
-14
mobile/src/main/res/layout/activity_home.xml
mobile/src/main/res/layout/activity_home.xml
+3
-3
No files found.
mobile/src/main/java/cn/garymb/ygomobile/ui/cards/CardDetail.java
View file @
548ae05a
...
...
@@ -51,16 +51,6 @@ public class CardDetail extends BaseAdapterPlus.BaseViewHolder {
private
CardListProvider
mProvider
;
private
OnCardClickListener
mListener
;
public
interface
OnCardClickListener
{
void
onOpenUrl
(
Card
cardInfo
);
void
onAddMainCard
(
Card
cardInfo
);
void
onAddSideCard
(
Card
cardInfo
);
void
onClose
();
}
public
CardDetail
(
BaseActivity
context
,
ImageLoader
imageLoader
,
StringManager
stringManager
)
{
super
(
LayoutInflater
.
from
(
context
).
inflate
(
R
.
layout
.
dialog_cardinfo
,
null
));
mContext
=
context
;
...
...
@@ -154,6 +144,26 @@ public class CardDetail extends BaseAdapterPlus.BaseViewHolder {
mListener
=
listener
;
}
public
void
bind
(
Card
cardInfo
,
final
int
position
,
final
CardListProvider
provider
)
{
curPosition
=
position
;
mProvider
=
provider
;
if
(
cardInfo
!=
null
)
{
setCardInfo
(
cardInfo
);
}
}
public
int
getCurPosition
()
{
return
curPosition
;
}
public
CardListProvider
getProvider
()
{
return
mProvider
;
}
public
Card
getCardInfo
()
{
return
mCardInfo
;
}
private
void
setCardInfo
(
Card
cardInfo
)
{
if
(
cardInfo
==
null
)
return
;
mCardInfo
=
cardInfo
;
...
...
@@ -163,8 +173,10 @@ public class CardDetail extends BaseAdapterPlus.BaseViewHolder {
dialog
.
setContentView
(
R
.
layout
.
dialog_photo
);
dialog
.
show
();
ImageView
photoView
=
dialog
.
findViewById
(
R
.
id
.
photoView
);
photoView
.
setOnClickListener
(
View
->
{
dialog
.
dismiss
();
});
imageLoader
.
bindImage
(
photoView
,
cardInfo
.
Code
,
null
,
true
);
});
name
.
setText
(
cardInfo
.
Name
);
desc
.
setText
(
cardInfo
.
Desc
);
...
...
@@ -230,26 +242,6 @@ public class CardDetail extends BaseAdapterPlus.BaseViewHolder {
}
}
public
void
bind
(
Card
cardInfo
,
final
int
position
,
final
CardListProvider
provider
)
{
curPosition
=
position
;
mProvider
=
provider
;
if
(
cardInfo
!=
null
)
{
setCardInfo
(
cardInfo
);
}
}
public
int
getCurPosition
()
{
return
curPosition
;
}
public
CardListProvider
getProvider
()
{
return
mProvider
;
}
public
Card
getCardInfo
()
{
return
mCardInfo
;
}
public
void
onPreCard
()
{
int
position
=
getCurPosition
();
CardListProvider
provider
=
getProvider
();
...
...
@@ -300,6 +292,16 @@ public class CardDetail extends BaseAdapterPlus.BaseViewHolder {
return
(
T
)
findViewById
(
id
);
}
public
interface
OnCardClickListener
{
void
onOpenUrl
(
Card
cardInfo
);
void
onAddMainCard
(
Card
cardInfo
);
void
onAddSideCard
(
Card
cardInfo
);
void
onClose
();
}
public
static
class
DefaultOnCardClickListener
implements
OnCardClickListener
{
public
DefaultOnCardClickListener
()
{
}
...
...
mobile/src/main/res/layout/activity_deck_cards.xml
View file @
548ae05a
...
...
@@ -72,47 +72,45 @@
android:layout_weight=
"1"
/>
<LinearLayout
android:layout_width=
"
48
dp"
android:layout_width=
"
60
dp"
android:layout_height=
"match_parent"
android:layout_marginLeft=
"2dp"
android:layout_marginRight=
"2dp"
android:orientation=
"vertical"
>
<ImageView
android:id=
"@+id/btn_nav_list"
android:layout_width=
"48dp"
android:layout_height=
"48dp"
android:layout_gravity=
"center_vertical"
android:layout_gravity=
"center"
android:gravity=
"center"
android:src=
"@drawable/listicon"
/>
<TextView
android:layout_width=
"
48
dp"
android:layout_width=
"
60
dp"
android:layout_height=
"20dp"
android:gravity=
"bottom|center_horizontal"
android:text=
"@string/searchresult"
android:textSize=
"3
5
px"
/>
android:textSize=
"3
0
px"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"
48
dp"
android:layout_width=
"
60
dp"
android:layout_height=
"match_parent"
android:layout_marginLeft=
"2dp"
android:layout_marginRight=
"2dp"
android:orientation=
"vertical"
>
<ImageView
android:id=
"@+id/btn_nav_search"
android:layout_width=
"48dp"
android:layout_height=
"48dp"
android:layout_gravity=
"center_vertical"
android:layout_gravity=
"center"
android:gravity=
"center"
android:src=
"@drawable/search"
/>
<TextView
android:layout_width=
"
48
dp"
android:layout_width=
"
60
dp"
android:layout_height=
"20dp"
android:gravity=
"bottom|center_horizontal"
android:text=
"@string/card_search"
android:textSize=
"3
5
px"
/>
android:textSize=
"3
0
px"
/>
</LinearLayout>
<LinearLayout
...
...
@@ -138,7 +136,7 @@
android:id=
"@+id/cube2"
android:layout_width=
"35dp"
android:layout_height=
"35dp"
android:layout_gravity=
"center"
android:layout_gravity=
"
top|
center"
app:srcCompat=
"@drawable/cube"
/>
</com.nightonke.boommenu.BoomMenuButton>
...
...
@@ -147,7 +145,7 @@
android:layout_height=
"20dp"
android:gravity=
"bottom|center_horizontal"
android:text=
"@string/Function_Menu"
android:textSize=
"3
5
px"
/>
android:textSize=
"3
0
px"
/>
</LinearLayout>
</LinearLayout>
</FrameLayout>
...
...
mobile/src/main/res/layout/activity_home.xml
View file @
548ae05a
...
...
@@ -37,7 +37,7 @@
android:gravity=
"center"
android:text=
"@string/return_to_duel"
android:textColor=
"@color/item_title"
android:textSize=
"
6
0px"
android:textSize=
"
5
0px"
android:visibility=
"visible"
/>
<LinearLayout
...
...
@@ -68,7 +68,7 @@
android:layout_height=
"20dp"
android:gravity=
"bottom|center_horizontal"
android:text=
"@string/mycard"
android:textSize=
"3
5
px"
/>
android:textSize=
"3
0
px"
/>
</LinearLayout>
<LinearLayout
...
...
@@ -102,7 +102,7 @@
android:layout_height=
"20dp"
android:gravity=
"bottom|center_horizontal"
android:text=
"@string/Function_Menu"
android:textSize=
"3
5
px"
/>
android:textSize=
"3
0
px"
/>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
...
...
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