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
fdc7a46b
Commit
fdc7a46b
authored
Apr 17, 2020
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
搜索结果与卡片详情补上灵摆刻度显示
parent
ce6f91ff
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
155 additions
and
50 deletions
+155
-50
mobile/src/main/java/cn/garymb/ygomobile/ui/adapters/CardListAdapter.java
...java/cn/garymb/ygomobile/ui/adapters/CardListAdapter.java
+15
-9
mobile/src/main/java/cn/garymb/ygomobile/ui/cards/CardDetail.java
...rc/main/java/cn/garymb/ygomobile/ui/cards/CardDetail.java
+11
-0
mobile/src/main/java/cn/garymb/ygomobile/ui/home/ResCheckTask.java
...c/main/java/cn/garymb/ygomobile/ui/home/ResCheckTask.java
+0
-7
mobile/src/main/res/drawable-xhdpi/p_left.png
mobile/src/main/res/drawable-xhdpi/p_left.png
+0
-0
mobile/src/main/res/drawable-xhdpi/p_right.png
mobile/src/main/res/drawable-xhdpi/p_right.png
+0
-0
mobile/src/main/res/layout/dialog_cardinfo.xml
mobile/src/main/res/layout/dialog_cardinfo.xml
+45
-0
mobile/src/main/res/layout/item_search_card_swipe.xml
mobile/src/main/res/layout/item_search_card_swipe.xml
+84
-34
No files found.
mobile/src/main/java/cn/garymb/ygomobile/ui/adapters/CardListAdapter.java
View file @
fdc7a46b
...
...
@@ -106,23 +106,26 @@ public class CardListAdapter extends BaseRecyclerAdapterPlus<Card, ViewHolder> i
imageLoader
.
bindImage
(
holder
.
cardImage
,
item
.
Code
);
holder
.
cardName
.
setText
(
item
.
Name
);
if
(
item
.
isType
(
CardType
.
Monster
))
{
holder
.
cardLevel
.
setVisibility
(
View
.
VISIBLE
);
holder
.
layout_atk
.
setVisibility
(
View
.
VISIBLE
);
holder
.
layout_def
.
setVisibility
(
View
.
VISIBLE
);
holder
.
layout_star_attr_race_scale
.
setVisibility
(
View
.
VISIBLE
);
// holder.view_bar.setVisibility(View.VISIBLE);
String
star
=
"★"
+
item
.
getStar
();
/*for (int i = 0; i < item.getStar(); i++) {
star += "★";
}*/
holder
.
cardLevel
.
setText
(
star
);
holder
.
cardattr
.
setText
(
mStringManager
.
getAttributeString
(
item
.
Attribute
));
holder
.
cardrace
.
setText
(
mStringManager
.
getRaceString
(
item
.
Race
));
holder
.
cardAtk
.
setText
((
item
.
Attack
<
0
?
"?"
:
String
.
valueOf
(
item
.
Attack
)));
if
(
item
.
isType
(
CardType
.
Xyz
))
{
holder
.
cardLevel
.
setTextColor
(
getColor
(
R
.
color
.
star_rank
));
}
else
{
holder
.
cardLevel
.
setTextColor
(
getColor
(
R
.
color
.
star
));
}
holder
.
cardAtk
.
setText
((
item
.
Attack
<
0
?
"?"
:
String
.
valueOf
(
item
.
Attack
)));
if
(
item
.
isType
(
CardType
.
Pendulum
))
{
holder
.
layout_p_scale
.
setVisibility
(
View
.
VISIBLE
);
holder
.
cardScale
.
setText
(
String
.
valueOf
(
item
.
LScale
));
}
else
{
holder
.
layout_p_scale
.
setVisibility
(
View
.
GONE
);
}
if
(
item
.
isType
(
CardType
.
Link
))
{
holder
.
cardLevel
.
setVisibility
(
View
.
GONE
);
holder
.
linkArrow
.
setVisibility
(
View
.
VISIBLE
);
...
...
@@ -140,9 +143,7 @@ public class CardListAdapter extends BaseRecyclerAdapterPlus<Card, ViewHolder> i
// if (!showCode) {
// holder.view_bar.setVisibility(View.INVISIBLE);
// }
holder
.
cardLevel
.
setVisibility
(
View
.
INVISIBLE
);
holder
.
cardattr
.
setVisibility
(
View
.
INVISIBLE
);
holder
.
cardrace
.
setVisibility
(
View
.
INVISIBLE
);
holder
.
layout_star_attr_race_scale
.
setVisibility
(
View
.
GONE
);
holder
.
linkArrow
.
setVisibility
(
View
.
GONE
);
holder
.
layout_atk
.
setVisibility
(
View
.
GONE
);
holder
.
layout_def
.
setVisibility
(
View
.
GONE
);
...
...
@@ -220,12 +221,14 @@ class ViewHolder extends BaseRecyclerAdapterPlus.BaseViewHolder {
TextView
cardAtk
;
TextView
cardDef
;
TextView
TextDef
;
TextView
cardScale
;
ImageView
rightImage
;
View
layout_atk
;
View
layout_def
;
View
view_bar
;
View
layout_star_attr_race_scale
;
View
layout_p_scale
;
View
linkArrow
;
TextView
codeView
;
View
btnMain
,
btnSide
;
...
...
@@ -239,9 +242,12 @@ class ViewHolder extends BaseRecyclerAdapterPlus.BaseViewHolder {
cardType
=
$
(
R
.
id
.
card_type
);
cardAtk
=
$
(
R
.
id
.
card_atk
);
cardDef
=
$
(
R
.
id
.
card_def
);
layout_star_attr_race_scale
=
$
(
R
.
id
.
star_attr_race_scale
);
layout_p_scale
=
$
(
R
.
id
.
p_scale
);
cardLevel
=
$
(
R
.
id
.
card_level
);
cardattr
=
$
(
R
.
id
.
card_attr
);
cardrace
=
$
(
R
.
id
.
card_race
);
cardScale
=
$
(
R
.
id
.
card_scale
);
layout_atk
=
$
(
R
.
id
.
layout_atk
);
layout_def
=
$
(
R
.
id
.
layout_def
);
view_bar
=
$
(
R
.
id
.
view_bar
);
...
...
mobile/src/main/java/cn/garymb/ygomobile/ui/cards/CardDetail.java
View file @
fdc7a46b
...
...
@@ -74,6 +74,8 @@ public class CardDetail extends BaseAdapterPlus.BaseViewHolder {
private
View
addMain
;
private
View
addSide
;
private
View
linkArrow
;
private
View
layout_detail_p_scale
;
private
TextView
detail_cardscale
;
private
TextView
cardcode
;
private
View
lb_setcode
;
private
ImageLoader
imageLoader
;
...
...
@@ -92,6 +94,7 @@ public class CardDetail extends BaseAdapterPlus.BaseViewHolder {
private
TextView
tv_loading
;
private
boolean
isDownloadCardImage
=
true
;
private
CallBack
mCallBack
;
public
interface
CallBack
{
void
onSearchStart
();
...
...
@@ -148,6 +151,8 @@ public class CardDetail extends BaseAdapterPlus.BaseViewHolder {
mImageFav
=
bind
(
R
.
id
.
image_fav
);
monsterlayout
=
bind
(
R
.
id
.
layout_monster
);
layout_detail_p_scale
=
bind
(
R
.
id
.
detail_p_scale
);
detail_cardscale
=
bind
(
R
.
id
.
detail_cardscale
);
race
=
bind
(
R
.
id
.
card_race
);
setname
=
bind
(
R
.
id
.
card_setname
);
addMain
=
bind
(
R
.
id
.
btn_add_main
);
...
...
@@ -340,6 +345,12 @@ public class CardDetail extends BaseAdapterPlus.BaseViewHolder {
}
else
{
level
.
setTextColor
(
context
.
getResources
().
getColor
(
R
.
color
.
star
));
}
if
(
cardInfo
.
isType
(
CardType
.
Pendulum
))
{
layout_detail_p_scale
.
setVisibility
(
View
.
VISIBLE
);
detail_cardscale
.
setText
(
String
.
valueOf
(
cardInfo
.
LScale
));
}
else
{
layout_detail_p_scale
.
setVisibility
(
View
.
GONE
);
}
cardAtk
.
setText
((
cardInfo
.
Attack
<
0
?
"?"
:
String
.
valueOf
(
cardInfo
.
Attack
)));
//连接怪兽设置
if
(
cardInfo
.
isType
(
CardType
.
Link
))
{
...
...
mobile/src/main/java/cn/garymb/ygomobile/ui/home/ResCheckTask.java
View file @
fdc7a46b
...
...
@@ -8,17 +8,13 @@ import android.database.Cursor;
import
android.database.sqlite.SQLiteDatabase
;
import
android.database.sqlite.SQLiteException
;
import
android.os.AsyncTask
;
import
android.os.Environment
;
import
android.os.Handler
;
import
android.os.Message
;
import
android.text.TextUtils
;
import
android.util.Log
;
import
java.io.File
;
import
java.io.FileInputStream
;
import
java.io.FileNotFoundException
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.util.List
;
import
cn.garymb.ygomobile.AppsSettings
;
...
...
@@ -30,17 +26,14 @@ import cn.garymb.ygomobile.utils.IOUtils;
import
cn.garymb.ygomobile.utils.SystemUtils
;
import
libwindbot.windbot.WindBot
;
import
ocgcore.CardManager
;
import
ocgcore.ConfigManager
;
import
ocgcore.DataManager
;
import
static
cn
.
garymb
.
ygomobile
.
Constants
.
ASSETS_PATH
;
import
static
cn
.
garymb
.
ygomobile
.
Constants
.
CORE_BOT_CONF_PATH
;
import
static
cn
.
garymb
.
ygomobile
.
Constants
.
DATABASE_NAME
;
import
static
cn
.
garymb
.
ygomobile
.
Constants
.
ORI_DECK
;
import
static
cn
.
garymb
.
ygomobile
.
Constants
.
ORI_PICS
;
import
static
cn
.
garymb
.
ygomobile
.
Constants
.
ORI_REPLAY
;
import
static
cn
.
garymb
.
ygomobile
.
Constants
.
ORI_TEXTURES
;
import
static
cn
.
garymb
.
ygomobile
.
Constants
.
PREF_DEF_GAME_DIR
;
public
class
ResCheckTask
extends
AsyncTask
<
Void
,
Integer
,
Integer
>
{
public
static
final
int
ERROR_NONE
=
0
;
...
...
mobile/src/main/res/drawable-xhdpi/p_left.png
0 → 100644
View file @
fdc7a46b
5.68 KB
mobile/src/main/res/drawable-xhdpi/p_right.png
0 → 100644
View file @
fdc7a46b
5.45 KB
mobile/src/main/res/layout/dialog_cardinfo.xml
View file @
fdc7a46b
...
...
@@ -244,6 +244,51 @@
android:textColor=
"@android:color/white"
tools:text=
"Test"
/>
</LinearLayout>
<LinearLayout
android:id=
"@+id/detail_p_scale"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
android:visibility=
"visible"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginRight=
"5dp"
android:text=
"@string/label_pendulum"
android:textAppearance=
"@style/TextAppearance.AppCompat.Caption"
android:textColor=
"@color/item_title"
/>
<ImageView
android:layout_width=
"15dp"
android:layout_height=
"10dp"
android:layout_gravity=
"center|left"
android:background=
"@drawable/p_left"
/>
<TextView
android:id=
"@+id/detail_cardscale"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"2dp"
android:layout_marginRight=
"2dp"
android:gravity=
"center"
android:maxLines=
"1"
android:shadowColor=
"@color/black"
android:shadowDx=
"1"
android:shadowDy=
"1"
android:shadowRadius=
"2"
android:singleLine=
"true"
android:textAppearance=
"@style/TextAppearance.AppCompat.Body1"
android:textColor=
"@color/gray"
tools:text=
"13"
/>
<ImageView
android:layout_width=
"15dp"
android:layout_height=
"10dp"
android:layout_gravity=
"center|right"
android:background=
"@drawable/p_right"
/>
</LinearLayout>
</LinearLayout>
<TextView
...
...
mobile/src/main/res/layout/item_search_card_swipe.xml
View file @
fdc7a46b
...
...
@@ -90,6 +90,7 @@
tools:text=
"Card Name"
/>
<LinearLayout
android:id=
"@+id/star_attr_race_scale"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"horizontal"
>
...
...
@@ -113,6 +114,11 @@
android:textColor=
"@color/star"
tools:text=
"★4"
/>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
...
...
@@ -156,6 +162,50 @@
tools:text=
"SpellCaster"
/>
</LinearLayout>
<View
android:layout_width=
"0dp"
android:layout_height=
"1dp"
android:layout_weight=
"1"
/>
<LinearLayout
android:id=
"@+id/p_scale"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"right"
android:orientation=
"horizontal"
android:visibility=
"gone"
>
<ImageView
android:layout_width=
"15dp"
android:layout_height=
"10dp"
android:layout_gravity=
"center|left"
android:background=
"@drawable/p_left"
/>
<TextView
android:id=
"@+id/card_scale"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"2dp"
android:layout_marginRight=
"2dp"
android:gravity=
"center"
android:maxLines=
"1"
android:shadowColor=
"@color/black"
android:shadowDx=
"1"
android:shadowDy=
"1"
android:shadowRadius=
"2"
android:singleLine=
"true"
android:textAppearance=
"@style/TextAppearance.AppCompat.Body1"
android:textColor=
"@color/gray"
tools:text=
"13"
/>
<ImageView
android:layout_width=
"15dp"
android:layout_height=
"10dp"
android:layout_gravity=
"center|right"
android:background=
"@drawable/p_right"
/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
...
...
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