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
f7558728
Commit
f7558728
authored
Sep 03, 2021
by
qq247321453
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
收藏
parent
4aedbb45
Changes
20
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
298 additions
and
295 deletions
+298
-295
mobile/src/main/java/cn/garymb/ygomobile/AppsSettings.java
mobile/src/main/java/cn/garymb/ygomobile/AppsSettings.java
+5
-0
mobile/src/main/java/cn/garymb/ygomobile/Constants.java
mobile/src/main/java/cn/garymb/ygomobile/Constants.java
+2
-0
mobile/src/main/java/cn/garymb/ygomobile/loader/CardLoader.java
.../src/main/java/cn/garymb/ygomobile/loader/CardLoader.java
+35
-17
mobile/src/main/java/cn/garymb/ygomobile/ui/cards/CardDetail.java
...rc/main/java/cn/garymb/ygomobile/ui/cards/CardDetail.java
+62
-89
mobile/src/main/java/cn/garymb/ygomobile/ui/cards/CardFavorites.java
...main/java/cn/garymb/ygomobile/ui/cards/CardFavorites.java
+89
-0
mobile/src/main/java/cn/garymb/ygomobile/ui/cards/CardSearchActivity.java
...java/cn/garymb/ygomobile/ui/cards/CardSearchActivity.java
+12
-15
mobile/src/main/java/cn/garymb/ygomobile/ui/cards/CardSearcher.java
.../main/java/cn/garymb/ygomobile/ui/cards/CardSearcher.java
+33
-19
mobile/src/main/java/cn/garymb/ygomobile/ui/cards/DeckManagerActivity.java
...ava/cn/garymb/ygomobile/ui/cards/DeckManagerActivity.java
+10
-19
mobile/src/main/java/cn/garymb/ygomobile/ui/home/MainActivity.java
...c/main/java/cn/garymb/ygomobile/ui/home/MainActivity.java
+2
-3
mobile/src/main/java/cn/garymb/ygomobile/ui/home/ResCheckTask.java
...c/main/java/cn/garymb/ygomobile/ui/home/ResCheckTask.java
+2
-3
mobile/src/main/java/cn/garymb/ygomobile/utils/FileUtils.java
...le/src/main/java/cn/garymb/ygomobile/utils/FileUtils.java
+8
-2
mobile/src/main/java/ocgcore/ConfigManager.java
mobile/src/main/java/ocgcore/ConfigManager.java
+0
-120
mobile/src/main/java/ocgcore/DataManager.java
mobile/src/main/java/ocgcore/DataManager.java
+0
-4
mobile/src/main/res/color/selector_text_color_white_gold.xml
mobile/src/main/res/color/selector_text_color_white_gold.xml
+5
-0
mobile/src/main/res/drawable/ic_baseline_favorite_24.xml
mobile/src/main/res/drawable/ic_baseline_favorite_24.xml
+10
-0
mobile/src/main/res/drawable/ic_baseline_favorite_border_24.xml
.../src/main/res/drawable/ic_baseline_favorite_border_24.xml
+10
-0
mobile/src/main/res/drawable/selector_favorite.xml
mobile/src/main/res/drawable/selector_favorite.xml
+6
-0
mobile/src/main/res/layout/dialog_cardinfo.xml
mobile/src/main/res/layout/dialog_cardinfo.xml
+2
-2
mobile/src/main/res/layout/nav_card_search.xml
mobile/src/main/res/layout/nav_card_search.xml
+1
-0
mobile/src/main/res/values/colors.xml
mobile/src/main/res/values/colors.xml
+4
-2
No files found.
mobile/src/main/java/cn/garymb/ygomobile/AppsSettings.java
View file @
f7558728
...
...
@@ -673,4 +673,9 @@ public class AppsSettings {
// Log.i("kk", "saveTemp:" + array);
mSharedPreferences
.
putString
(
Constants
.
PREF_LAST_ROOM_LIST
,
array
.
toString
());
}
//获取收藏文件
public
String
getFavoriteTxt
()
{
return
new
File
(
getResourcePath
(),
"/favorite.txt"
).
getAbsolutePath
();
}
}
mobile/src/main/java/cn/garymb/ygomobile/Constants.java
View file @
f7558728
...
...
@@ -219,4 +219,6 @@ public interface Constants {
boolean
COPY_YDK_FILE
=
false
;
String
TAG
=
"ygo-java"
;
String
DEF_ENCODING
=
"utf-8"
;
}
mobile/src/main/java/cn/garymb/ygomobile/loader/CardLoader.java
View file @
f7558728
...
...
@@ -170,27 +170,45 @@ public class CardLoader implements ICardLoader {
});
}
private
Comparator
<
Card
>
ASCode
=
new
Comparator
<
Card
>()
{
@Override
public
int
compare
(
Card
o1
,
Card
o2
)
{
int
index1
=
(
Integer
.
valueOf
(
o1
.
Code
).
intValue
());
int
index2
=
(
Integer
.
valueOf
(
o2
.
Code
).
intValue
());
return
index1
-
index2
;
public
List
<
Card
>
sort
(
List
<
Card
>
cards
){
List
<
Card
>
tmp
=
new
ArrayList
<
Card
>();
List
<
Card
>
monster
=
new
ArrayList
<
Card
>();
List
<
Card
>
spell
=
new
ArrayList
<
Card
>();
List
<
Card
>
trap
=
new
ArrayList
<
Card
>();
int
count
=
cards
.
size
();
for
(
int
i
=
0
;
i
<
count
;
i
++)
{
Card
card
=
cards
.
get
(
i
);
if
(
card
.
isType
(
CardType
.
Monster
))
{
monster
.
add
(
card
);
}
else
if
(
card
.
isType
(
CardType
.
Spell
))
{
spell
.
add
(
card
);
}
else
if
(
card
.
isType
(
CardType
.
Trap
))
{
trap
.
add
(
card
);
}
else
{
tmp
.
add
(
card
);
}
}
};
Collections
.
sort
(
tmp
,
ASCode
);
Collections
.
sort
(
monster
,
ASC
);
Collections
.
sort
(
spell
,
ASCode
);
Collections
.
sort
(
trap
,
ASCode
);
tmp
.
addAll
(
monster
);
tmp
.
addAll
(
spell
);
tmp
.
addAll
(
trap
);
return
tmp
;
}
private
Comparator
<
Card
>
ASC
=
new
Comparator
<
Card
>()
{
@Override
public
int
compare
(
Card
o1
,
Card
o2
)
{
if
(
o1
.
getStar
()
==
o2
.
getStar
())
{
if
(
o1
.
Attack
==
o2
.
Attack
)
{
return
(
int
)
(
o2
.
Code
-
o1
.
Code
);
}
else
{
return
o2
.
Attack
-
o1
.
Attack
;
}
private
static
final
Comparator
<
Card
>
ASCode
=
(
o1
,
o2
)
->
o1
.
Code
-
o2
.
Code
;
private
static
final
Comparator
<
Card
>
ASC
=
(
o1
,
o2
)
->
{
if
(
o1
.
getStar
()
==
o2
.
getStar
())
{
if
(
o1
.
Attack
==
o2
.
Attack
)
{
return
(
int
)
(
o2
.
Code
-
o1
.
Code
);
}
else
{
return
o2
.
getStar
()
-
o1
.
getStar
()
;
return
o2
.
Attack
-
o1
.
Attack
;
}
}
else
{
return
o2
.
getStar
()
-
o1
.
getStar
();
}
};
...
...
mobile/src/main/java/cn/garymb/ygomobile/ui/cards/CardDetail.java
View file @
f7558728
...
...
@@ -7,7 +7,6 @@ import android.os.Message;
import
android.text.TextUtils
;
import
android.util.Log
;
import
android.util.SparseArray
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.view.Window
;
...
...
@@ -26,7 +25,6 @@ import com.bm.library.PhotoView;
import
com.feihua.dialogutils.util.DialogUtils
;
import
java.io.File
;
import
java.util.List
;
import
cn.garymb.ygomobile.AppsSettings
;
import
cn.garymb.ygomobile.Constants
;
...
...
@@ -41,14 +39,12 @@ import cn.garymb.ygomobile.utils.DownloadUtil;
import
cn.garymb.ygomobile.utils.FileUtils
;
import
cn.garymb.ygomobile.utils.YGOUtil
;
import
ocgcore.CardManager
;
import
ocgcore.ConfigManager
;
import
ocgcore.DataManager
;
import
ocgcore.StringManager
;
import
ocgcore.data.Card
;
import
ocgcore.enums.CardType
;
import
static
cn
.
garymb
.
ygomobile
.
core
.
IrrlichtBridge
.
ACTION_SHARE_FILE
;
import
static
cn
.
garymb
.
ygomobile
.
ui
.
cards
.
DeckManagerActivity
.
Favorite
;
/***
* 卡片详情
...
...
@@ -61,33 +57,31 @@ public class CardDetail extends BaseAdapterPlus.BaseViewHolder {
private
static
final
String
TAG
=
"CardDetail"
;
private
static
CardManager
cardManager
;
private
ImageView
cardImage
;
private
TextView
name
;
private
TextView
desc
;
private
TextView
level
;
private
TextView
type
;
private
TextView
race
;
private
TextView
cardAtk
;
private
TextView
cardDef
;
private
TextView
setname
;
private
TextView
otView
;
private
TextView
attrView
;
private
View
monsterlayout
;
private
View
close
;
private
View
faq
;
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
;
private
View
mImageFav
,
atkdefView
;
private
BaseActivity
mContext
;
private
StringManager
mStringManager
;
private
final
ImageView
cardImage
;
private
final
TextView
name
;
private
final
TextView
desc
;
private
final
TextView
level
;
private
final
TextView
type
;
private
final
TextView
race
;
private
final
TextView
cardAtk
;
private
final
TextView
cardDef
;
private
final
TextView
setName
;
private
final
TextView
otView
;
private
final
TextView
attrView
;
private
final
View
monsterLayout
;
private
final
View
close
;
private
final
View
addMain
;
private
final
View
addSide
;
private
final
View
linkArrow
;
private
final
View
layoutDetailPScale
;
private
final
TextView
detailCardScale
;
private
final
TextView
cardCode
;
private
final
View
lbSetCode
;
private
final
ImageLoader
imageLoader
;
private
final
View
mImageFav
,
atkdefView
;
private
final
StringManager
mStringManager
;
private
int
curPosition
;
private
Card
mCardInfo
;
private
CardListProvider
mProvider
;
...
...
@@ -129,10 +123,11 @@ public class CardDetail extends BaseAdapterPlus.BaseViewHolder {
}
}
};
private
CallBack
mCallBack
;
private
final
BaseActivity
mContext
;
private
OnFavoriteChangedListener
mCallBack
;
public
CardDetail
(
BaseActivity
context
,
ImageLoader
imageLoader
,
StringManager
stringManager
)
{
super
(
LayoutInflater
.
from
(
context
).
inflate
(
R
.
layout
.
dialog_cardinfo
,
null
));
super
(
context
.
getLayoutInflater
(
).
inflate
(
R
.
layout
.
dialog_cardinfo
,
null
));
mContext
=
context
;
cardImage
=
bind
(
R
.
id
.
card_image
);
this
.
imageLoader
=
imageLoader
;
...
...
@@ -140,26 +135,26 @@ public class CardDetail extends BaseAdapterPlus.BaseViewHolder {
name
=
bind
(
R
.
id
.
text_name
);
desc
=
bind
(
R
.
id
.
text_desc
);
close
=
bind
(
R
.
id
.
btn_close
);
card
c
ode
=
bind
(
R
.
id
.
card_code
);
card
C
ode
=
bind
(
R
.
id
.
card_code
);
level
=
bind
(
R
.
id
.
card_level
);
linkArrow
=
bind
(
R
.
id
.
detail_link_arrows
);
type
=
bind
(
R
.
id
.
card_type
);
faq
=
bind
(
R
.
id
.
btn_faq
);
View
faq
=
bind
(
R
.
id
.
btn_faq
);
cardAtk
=
bind
(
R
.
id
.
card_atk
);
cardDef
=
bind
(
R
.
id
.
card_def
);
atkdefView
=
bind
(
R
.
id
.
layout_atkdef2
);
mImageFav
=
bind
(
R
.
id
.
image_fav
);
monster
l
ayout
=
bind
(
R
.
id
.
layout_monster
);
layout
_detail_p_s
cale
=
bind
(
R
.
id
.
detail_p_scale
);
detail
_cards
cale
=
bind
(
R
.
id
.
detail_cardscale
);
monster
L
ayout
=
bind
(
R
.
id
.
layout_monster
);
layout
DetailPS
cale
=
bind
(
R
.
id
.
detail_p_scale
);
detail
CardS
cale
=
bind
(
R
.
id
.
detail_cardscale
);
race
=
bind
(
R
.
id
.
card_race
);
set
n
ame
=
bind
(
R
.
id
.
card_setname
);
set
N
ame
=
bind
(
R
.
id
.
card_setname
);
addMain
=
bind
(
R
.
id
.
btn_add_main
);
addSide
=
bind
(
R
.
id
.
btn_add_side
);
otView
=
bind
(
R
.
id
.
card_ot
);
attrView
=
bind
(
R
.
id
.
card_attribute
);
lb
_setc
ode
=
bind
(
R
.
id
.
label_setcode
);
lb
SetC
ode
=
bind
(
R
.
id
.
label_setcode
);
if
(
cardManager
==
null
)
{
Log
.
e
(
"CardDetail"
,
"加载卡片信息"
);
...
...
@@ -205,35 +200,20 @@ public class CardDetail extends BaseAdapterPlus.BaseViewHolder {
bind
(
R
.
id
.
nextone
).
setOnClickListener
((
v
)
->
{
onNextCard
();
});
bind
(
R
.
id
.
image_fav
)
.
setOnClickListener
((
v
)
->
{
mImageFav
.
setOnClickListener
((
v
)
->
{
doMyFavorites
(
getCardInfo
());
});
}
/**
* 收藏卡片
*/
public
void
doMyFavorites
(
Card
cardInfo
)
{
CardLoader
mCardLoader
=
new
CardLoader
(
context
);
ConfigManager
favConf
=
DataManager
.
openConfig
(
AppsSettings
.
get
().
getSystemConfig
());
Integer
code
=
cardInfo
.
Code
;
if
(
favConf
.
mLines
.
contains
(
code
))
{
favConf
.
mLines
.
remove
(
code
);
mImageFav
.
setBackgroundResource
(
R
.
drawable
.
ic_control_point
);
}
else
{
favConf
.
mLines
.
add
(
0
,
code
);
mImageFav
.
setBackgroundResource
(
R
.
drawable
.
ic_fav
);
}
favConf
.
save
(
"#Favorite"
);
favConf
.
read
();
Favorite
.
clear
();
if
(!
DeckManagerActivity
.
isSearchResult
)
{
SparseArray
<
Card
>
id
=
mCardLoader
.
readCards
(
ConfigManager
.
mLines
,
false
);
if
(
id
!=
null
)
{
for
(
int
i
=
0
;
i
<
id
.
size
();
i
++)
Favorite
.
add
(
id
.
valueAt
(
i
));
}
if
(
mCallBack
!=
null
)
mCallBack
.
onSearchResult
(
Favorite
,
true
);
boolean
ret
=
CardFavorites
.
get
().
toggle
(
cardInfo
.
Code
);
mImageFav
.
setSelected
(
ret
);
if
(
mCallBack
!=
null
){
mCallBack
.
onFavoriteChange
(
cardInfo
,
ret
);
}
}
public
ImageView
getCardImage
()
{
...
...
@@ -261,7 +241,7 @@ public class CardDetail extends BaseAdapterPlus.BaseViewHolder {
mListener
=
listener
;
}
public
void
setCallBack
(
CallBack
callBack
)
{
public
void
setCallBack
(
OnFavoriteChangedListener
callBack
)
{
mCallBack
=
callBack
;
}
...
...
@@ -287,7 +267,6 @@ public class CardDetail extends BaseAdapterPlus.BaseViewHolder {
private
void
setCardInfo
(
Card
cardInfo
,
View
view
)
{
if
(
cardInfo
==
null
)
return
;
mCardInfo
=
cardInfo
;
imageLoader
.
bindImage
(
cardImage
,
cardInfo
.
Code
,
null
,
true
);
dialog
=
DialogUtils
.
getdx
(
context
);
...
...
@@ -298,45 +277,41 @@ public class CardDetail extends BaseAdapterPlus.BaseViewHolder {
desc
.
setText
(
cardInfo
.
Desc
);
int
t
=
cardInfo
.
Alias
-
cardInfo
.
Code
;
if
(
t
>
10
||
t
<
-
10
)
{
card
c
ode
.
setText
(
String
.
format
(
"%08d"
,
cardInfo
.
Code
));
card
C
ode
.
setText
(
String
.
format
(
"%08d"
,
cardInfo
.
Code
));
}
else
{
card
c
ode
.
setText
(
String
.
format
(
"%08d"
,
cardInfo
.
Alias
));
card
C
ode
.
setText
(
String
.
format
(
"%08d"
,
cardInfo
.
Alias
));
}
//按是否存在于收藏夹切换显示图标
if
(
ConfigManager
.
mLines
.
contains
(
cardInfo
.
Code
))
{
mImageFav
.
setBackgroundResource
(
R
.
drawable
.
ic_fav
);
}
else
{
mImageFav
.
setBackgroundResource
(
R
.
drawable
.
ic_control_point
);
}
mImageFav
.
setSelected
(
CardFavorites
.
get
().
hasCard
(
cardInfo
.
Code
));
type
.
setText
(
CardUtils
.
getAllTypeString
(
cardInfo
,
mStringManager
).
replace
(
"/"
,
"|"
));
attrView
.
setText
(
mStringManager
.
getAttributeString
(
cardInfo
.
Attribute
));
otView
.
setText
(
mStringManager
.
getOtString
(
cardInfo
.
Ot
,
""
+
cardInfo
.
Ot
));
long
[]
sets
=
cardInfo
.
getSetCode
();
set
n
ame
.
setText
(
""
);
set
N
ame
.
setText
(
""
);
int
index
=
0
;
for
(
long
set
:
sets
)
{
if
(
set
>
0
)
{
if
(
index
!=
0
)
{
set
n
ame
.
append
(
"\n"
);
set
N
ame
.
append
(
"\n"
);
}
set
n
ame
.
append
(
""
+
mStringManager
.
getSetName
(
set
));
set
N
ame
.
append
(
""
+
mStringManager
.
getSetName
(
set
));
index
++;
}
}
if
(
TextUtils
.
isEmpty
(
set
n
ame
.
getText
()))
{
set
n
ame
.
setVisibility
(
View
.
INVISIBLE
);
lb
_setc
ode
.
setVisibility
(
View
.
INVISIBLE
);
if
(
TextUtils
.
isEmpty
(
set
N
ame
.
getText
()))
{
set
N
ame
.
setVisibility
(
View
.
INVISIBLE
);
lb
SetC
ode
.
setVisibility
(
View
.
INVISIBLE
);
}
else
{
set
n
ame
.
setVisibility
(
View
.
VISIBLE
);
lb
_setc
ode
.
setVisibility
(
View
.
VISIBLE
);
set
N
ame
.
setVisibility
(
View
.
VISIBLE
);
lb
SetC
ode
.
setVisibility
(
View
.
VISIBLE
);
}
if
(
cardInfo
.
isType
(
CardType
.
Monster
))
{
atkdefView
.
setVisibility
(
View
.
VISIBLE
);
monster
l
ayout
.
setVisibility
(
View
.
VISIBLE
);
monster
L
ayout
.
setVisibility
(
View
.
VISIBLE
);
race
.
setVisibility
(
View
.
VISIBLE
);
String
star
=
"★"
+
cardInfo
.
getStar
();
/* for (int i = 0; i < cardInfo.getStar(); i++) {
...
...
@@ -349,10 +324,10 @@ public class CardDetail extends BaseAdapterPlus.BaseViewHolder {
level
.
setTextColor
(
context
.
getResources
().
getColor
(
R
.
color
.
star
));
}
if
(
cardInfo
.
isType
(
CardType
.
Pendulum
))
{
layout
_detail_p_s
cale
.
setVisibility
(
View
.
VISIBLE
);
detail
_cards
cale
.
setText
(
String
.
valueOf
(
cardInfo
.
LScale
));
layout
DetailPS
cale
.
setVisibility
(
View
.
VISIBLE
);
detail
CardS
cale
.
setText
(
String
.
valueOf
(
cardInfo
.
LScale
));
}
else
{
layout
_detail_p_s
cale
.
setVisibility
(
View
.
GONE
);
layout
DetailPS
cale
.
setVisibility
(
View
.
GONE
);
}
cardAtk
.
setText
((
cardInfo
.
Attack
<
0
?
"?"
:
String
.
valueOf
(
cardInfo
.
Attack
)));
//连接怪兽设置
...
...
@@ -370,7 +345,7 @@ public class CardDetail extends BaseAdapterPlus.BaseViewHolder {
}
else
{
atkdefView
.
setVisibility
(
View
.
GONE
);
race
.
setVisibility
(
View
.
GONE
);
monster
l
ayout
.
setVisibility
(
View
.
GONE
);
monster
L
ayout
.
setVisibility
(
View
.
GONE
);
level
.
setVisibility
(
View
.
GONE
);
linkArrow
.
setVisibility
(
View
.
GONE
);
}
...
...
@@ -551,10 +526,8 @@ public class CardDetail extends BaseAdapterPlus.BaseViewHolder {
return
(
T
)
findViewById
(
id
);
}
public
interface
CallBack
{
void
onSearchStart
();
void
onSearchResult
(
List
<
Card
>
Cards
,
boolean
isHide
);
public
interface
OnFavoriteChangedListener
{
void
onFavoriteChange
(
Card
card
,
boolean
favorite
);
}
public
interface
OnCardClickListener
{
...
...
mobile/src/main/java/cn/garymb/ygomobile/ui/cards/CardFavorites.java
0 → 100644
View file @
f7558728
package
cn.garymb.ygomobile.ui.cards
;
import
android.text.TextUtils
;
import
android.util.SparseArray
;
import
java.util.ArrayList
;
import
java.util.List
;
import
cn.garymb.ygomobile.AppsSettings
;
import
cn.garymb.ygomobile.Constants
;
import
cn.garymb.ygomobile.loader.CardLoader
;
import
cn.garymb.ygomobile.utils.FileUtils
;
import
ocgcore.data.Card
;
public
class
CardFavorites
{
private
final
List
<
Integer
>
mList
=
new
ArrayList
<>();
private
static
final
CardFavorites
sCardFavorites
=
new
CardFavorites
();
public
static
CardFavorites
get
()
{
return
sCardFavorites
;
}
private
CardFavorites
()
{
}
public
boolean
toggle
(
Integer
id
)
{
if
(!
mList
.
contains
(
id
))
{
//添加
mList
.
add
(
id
);
return
true
;
}
else
{
//移除
mList
.
remove
(
id
);
return
false
;
}
}
public
boolean
add
(
Integer
id
)
{
if
(!
mList
.
contains
(
id
))
{
mList
.
add
(
id
);
return
true
;
}
return
false
;
}
public
boolean
hasCard
(
Integer
id
){
return
mList
.
contains
(
id
);
}
public
List
<
Integer
>
getCardIds
()
{
return
mList
;
}
public
List
<
Card
>
getCards
(
CardLoader
cardLoader
)
{
SparseArray
<
Card
>
id
=
cardLoader
.
readCards
(
mList
,
false
);
List
<
Card
>
list
=
new
ArrayList
<>();
if
(
id
!=
null
)
{
for
(
int
i
=
0
;
i
<
id
.
size
();
i
++)
{
list
.
add
(
id
.
valueAt
(
i
));
}
}
return
cardLoader
.
sort
(
list
);
}
public
void
remove
(
Integer
id
)
{
mList
.
remove
(
id
);
}
public
void
load
()
{
List
<
String
>
lines
=
FileUtils
.
readLines
(
AppsSettings
.
get
().
getFavoriteTxt
(),
Constants
.
DEF_ENCODING
);
mList
.
clear
();
for
(
String
line
:
lines
)
{
String
tmp
=
line
.
trim
();
if
(
TextUtils
.
isDigitsOnly
(
tmp
))
{
mList
.
add
(
Integer
.
parseInt
(
tmp
));
}
}
}
public
void
save
()
{
List
<
String
>
ret
=
new
ArrayList
<>();
for
(
Integer
id
:
mList
)
{
ret
.
add
(
String
.
valueOf
(
id
));
}
FileUtils
.
writeLines
(
AppsSettings
.
get
().
getFavoriteTxt
(),
ret
,
Constants
.
DEF_ENCODING
,
"\n"
);
}
}
mobile/src/main/java/cn/garymb/ygomobile/ui/cards/CardSearchActivity.java
View file @
f7558728
...
...
@@ -163,6 +163,7 @@ public class CardSearchActivity extends BaseActivity implements CardLoader.CallB
super
.
onScrollStateChanged
(
recyclerView
,
newState
);
switch
(
newState
)
{
case
RecyclerView
.
SCROLL_STATE_IDLE
:
case
RecyclerView
.
SCROLL_STATE_SETTLING
:
if
(!
isFinishing
())
{
Glide
.
with
(
getContext
()).
resumeRequests
();
}
...
...
@@ -170,11 +171,6 @@ public class CardSearchActivity extends BaseActivity implements CardLoader.CallB
case
RecyclerView
.
SCROLL_STATE_DRAGGING
:
Glide
.
with
(
getContext
()).
pauseRequests
();
break
;
case
RecyclerView
.
SCROLL_STATE_SETTLING
:
if
(!
isFinishing
())
{
Glide
.
with
(
getContext
()).
resumeRequests
();
}
break
;
}
}
});
...
...
@@ -284,6 +280,11 @@ public class CardSearchActivity extends BaseActivity implements CardLoader.CallB
if
(
cardInfo
!=
null
)
{
if
(
mCardDetail
==
null
)
{
mCardDetail
=
new
CardDetail
(
this
,
mImageLoader
,
mStringManager
);
mCardDetail
.
setCallBack
((
card
,
favorite
)
->
{
if
(
mCardSelector
.
isShowFavorite
())
{
mCardSelector
.
showFavorites
(
false
);
}
});
mCardDetail
.
setOnCardClickListener
(
new
CardDetail
.
DefaultOnCardClickListener
()
{
@Override
public
void
onOpenUrl
(
Card
cardInfo
)
{
...
...
@@ -302,16 +303,6 @@ public class CardSearchActivity extends BaseActivity implements CardLoader.CallB
mDialog
.
dismiss
();
}
});
mCardDetail
.
setCallBack
(
new
CardDetail
.
CallBack
()
{
@Override
public
void
onSearchStart
()
{
}
@Override
public
void
onSearchResult
(
List
<
Card
>
Cards
,
boolean
isHide
)
{
CardSearchActivity
.
this
.
onSearchResult
(
Cards
,
isHide
);
}
});
}
if
(
mDialog
==
null
)
{
mDialog
=
new
DialogPlus
(
this
);
...
...
@@ -347,6 +338,12 @@ public class CardSearchActivity extends BaseActivity implements CardLoader.CallB
}
}
@Override
protected
void
onStop
()
{
super
.
onStop
();
CardFavorites
.
get
().
save
();
}
//https://www.jianshu.com/p/99649af3b191
public
void
showNewbieGuide
()
{
HighlightOptions
options
=
new
HighlightOptions
.
Builder
()
//绘制一个高亮虚线圈
...
...
mobile/src/main/java/cn/garymb/ygomobile/ui/cards/CardSearcher.java
View file @
f7558728
...
...
@@ -4,7 +4,6 @@ package cn.garymb.ygomobile.ui.cards;
import
android.content.Context
;
import
android.graphics.Color
;
import
android.text.TextUtils
;
import
android.util.SparseArray
;
import
android.view.View
;
import
android.view.inputmethod.EditorInfo
;
import
android.view.inputmethod.InputMethodManager
;
...
...
@@ -16,6 +15,7 @@ import android.widget.TextView.OnEditorActionListener;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Collections
;
import
java.util.List
;
import
cn.garymb.ygomobile.AppsSettings
;
...
...
@@ -25,7 +25,6 @@ import cn.garymb.ygomobile.loader.ICardLoader;
import
cn.garymb.ygomobile.ui.adapters.SimpleSpinnerAdapter
;
import
cn.garymb.ygomobile.ui.adapters.SimpleSpinnerItem
;
import
cn.garymb.ygomobile.ui.plus.DialogPlus
;
import
ocgcore.ConfigManager
;
import
ocgcore.DataManager
;
import
ocgcore.LimitManager
;
import
ocgcore.StringManager
;
...
...
@@ -39,8 +38,6 @@ import ocgcore.enums.CardRace;
import
ocgcore.enums.CardType
;
import
ocgcore.enums.LimitType
;
import
static
cn
.
garymb
.
ygomobile
.
ui
.
cards
.
DeckManagerActivity
.
Favorite
;
public
class
CardSearcher
implements
View
.
OnClickListener
{
final
String
[]
BtnVals
=
new
String
[
9
];
...
...
@@ -73,8 +70,10 @@ public class CardSearcher implements View.OnClickListener {
private
final
View
layout_monster
;
private
final
ICardLoader
dataLoader
;
private
final
Context
mContext
;
private
final
Button
myFavButton
;
private
CallBack
mCallBack
;
CardLoader
mCardLoader
;
private
boolean
mShowFavorite
;
public
interface
CallBack
{
void
onSearchStart
();
...
...
@@ -111,7 +110,7 @@ public class CardSearcher implements View.OnClickListener {
atkText
=
findViewById
(
R
.
id
.
edt_atk
);
defText
=
findViewById
(
R
.
id
.
edt_def
);
LinkMarkerButton
=
findViewById
(
R
.
id
.
btn_linkmarker
);
Button
myFavButton
=
findViewById
(
R
.
id
.
btn_my_fav
);
myFavButton
=
findViewById
(
R
.
id
.
btn_my_fav
);
searchButton
=
findViewById
(
R
.
id
.
btn_search
);
resetButton
=
findViewById
(
R
.
id
.
btn_reset
);
layout_monster
=
findViewById
(
R
.
id
.
layout_monster
);
...
...
@@ -136,18 +135,11 @@ public class CardSearcher implements View.OnClickListener {
suffixWord
.
setOnEditorActionListener
(
searchListener
);
myFavButton
.
setOnClickListener
(
v
->
{
SparseArray
<
Card
>
id
=
mCardLoader
.
readCards
(
ConfigManager
.
mLines
,
false
);
Favorite
.
clear
();
if
(
id
!=
null
)
{
for
(
int
i
=
0
;
i
<
id
.
size
();
i
++)
Favorite
.
add
(
id
.
valueAt
(
i
));
}
if
(
mCallBack
!=
null
)
{
mCallBack
.
onSearchStart
();
mCallBack
.
onSearchResult
(
Favorite
,
false
);
if
(
isShowFavorite
()){
hideFavorites
();
}
else
{
showFavorites
(
true
);
}
DeckManagerActivity
.
isSearchResult
=
false
;
});
LinkMarkerButton
.
setOnClickListener
(
v
->
{
...
...
@@ -282,6 +274,24 @@ public class CardSearcher implements View.OnClickListener {
});
}
public
void
showFavorites
(
boolean
showList
)
{
mShowFavorite
=
true
;
myFavButton
.
setSelected
(
true
);
if
(
mCallBack
!=
null
)
{
mCallBack
.
onSearchStart
();
mCallBack
.
onSearchResult
(
CardFavorites
.
get
().
getCards
(
mCardLoader
),
!
showList
);
}
}
public
void
hideFavorites
(){
mShowFavorite
=
true
;
myFavButton
.
setSelected
(
false
);
if
(
mCallBack
!=
null
)
{
mCallBack
.
onSearchStart
();
mCallBack
.
onSearchResult
(
Collections
.
emptyList
(),
true
);
}
}
public
void
initItems
()
{
initOtSpinners
(
otSpinner
);
initLimitSpinners
(
limitSpinner
);
...
...
@@ -341,6 +351,10 @@ public class CardSearcher implements View.OnClickListener {
spinner
.
setAdapter
(
adapter
);
}
public
boolean
isShowFavorite
()
{
return
mShowFavorite
;
}
protected
String
getString
(
int
id
)
{
return
mContext
.
getString
(
id
);
}
...
...
@@ -528,9 +542,10 @@ public class CardSearcher implements View.OnClickListener {
@Override
public
void
onClick
(
View
v
)
{
if
(
v
==
searchButton
)
{
if
(
v
.
getId
()
==
R
.
id
.
btn_search
)
{
hideFavorites
();
search
();
}
else
if
(
v
==
resetButton
)
{
}
else
if
(
v
.
getId
()
==
R
.
id
.
btn_reset
)
{
resetAll
();
}
}
...
...
@@ -554,7 +569,6 @@ public class CardSearcher implements View.OnClickListener {
,
getSelect
(
typeMonsterSpinner2
));
lineKey
=
0
;
}
DeckManagerActivity
.
isSearchResult
=
true
;
}
private
void
resetAll
()
{
...
...
mobile/src/main/java/cn/garymb/ygomobile/ui/cards/DeckManagerActivity.java
View file @
f7558728
...
...
@@ -80,7 +80,6 @@ import cn.garymb.ygomobile.utils.IOUtils;
import
cn.garymb.ygomobile.utils.ShareUtil
;
import
cn.garymb.ygomobile.utils.YGODialogUtil
;
import
cn.garymb.ygomobile.utils.YGOUtil
;
import
ocgcore.ConfigManager
;
import
ocgcore.DataManager
;
import
ocgcore.data.Card
;
import
ocgcore.data.LimitList
;
...
...
@@ -117,8 +116,6 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi
private
DialogPlus
mDialog
;
private
DialogPlus
builderShareLoading
;
private
boolean
isExit
=
false
;
public
static
boolean
isSearchResult
;
public
static
List
<
Card
>
Favorite
=
new
ArrayList
<>();
@Override
protected
void
onCreate
(
@Nullable
Bundle
savedInstanceState
)
{
...
...
@@ -169,13 +166,18 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi
//最后卡组
_file
=
new
File
(
mSettings
.
getLastDeckPath
());
}
Favorite
.
clear
();
init
(
_file
);
EventBus
.
getDefault
().
register
(
this
);
tv_deck
.
setOnClickListener
(
v
->
YGODialogUtil
.
dialogDeckSelect
(
getActivity
(),
AppsSettings
.
get
().
getLastDeckPath
(),
this
));
}
//endregion
@Override
protected
void
onStop
()
{
super
.
onStop
();
CardFavorites
.
get
().
save
();
}
@Override
protected
void
onDestroy
()
{
EventBus
.
getDefault
().
unregister
(
this
);
...
...
@@ -284,13 +286,7 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi
//设置当前卡组
setCurDeck
(
rs
);
//设置收藏夹
SparseArray
<
Card
>
id
=
mCardLoader
.
readCards
(
ConfigManager
.
mLines
,
false
);
if
(
id
!=
null
)
{
for
(
int
i
=
0
;
i
<
id
.
size
();
i
++)
Favorite
.
add
(
id
.
valueAt
(
i
));
}
onSearchResult
(
Favorite
,
true
);
isSearchResult
=
false
;
mCardSelector
.
showFavorites
(
false
);
});
}
...
...
@@ -440,14 +436,9 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi
addMainCard
(
cardInfo
);
}
});
mCardDetail
.
setCallBack
(
new
CardDetail
.
CallBack
()
{
@Override
public
void
onSearchStart
()
{
}
@Override
public
void
onSearchResult
(
List
<
Card
>
Cards
,
boolean
isHide
)
{
DeckManagerActivity
.
this
.
onSearchResult
(
Cards
,
isHide
);
mCardDetail
.
setCallBack
((
card
,
favorite
)
->
{
if
(
mCardSelector
.
isShowFavorite
()){
mCardSelector
.
showFavorites
(
false
);
}
});
}
...
...
mobile/src/main/java/cn/garymb/ygomobile/ui/home/MainActivity.java
View file @
f7558728
...
...
@@ -24,13 +24,13 @@ import cn.garymb.ygomobile.GameUriManager;
import
cn.garymb.ygomobile.YGOStarter
;
import
cn.garymb.ygomobile.lite.R
;
import
cn.garymb.ygomobile.ui.activities.WebActivity
;
import
cn.garymb.ygomobile.ui.cards.CardFavorites
;
import
cn.garymb.ygomobile.ui.plus.DialogPlus
;
import
cn.garymb.ygomobile.ui.plus.VUiKit
;
import
cn.garymb.ygomobile.utils.FileUtils
;
import
cn.garymb.ygomobile.utils.IOUtils
;
import
cn.garymb.ygomobile.utils.NetUtils
;
import
cn.garymb.ygomobile.utils.YGOUtil
;
import
ocgcore.ConfigManager
;
import
ocgcore.DataManager
;
import
static
cn
.
garymb
.
ygomobile
.
Constants
.
ACTION_RELOAD
;
...
...
@@ -49,7 +49,6 @@ public class MainActivity extends HomeActivity {
Manifest
.
permission
.
WRITE_EXTERNAL_STORAGE
,
Manifest
.
permission
.
READ_EXTERNAL_STORAGE
,
};
public
ConfigManager
favConf
=
DataManager
.
openConfig
(
AppsSettings
.
get
().
getSystemConfig
());
ResCheckTask
mResCheckTask
;
private
GameUriManager
mGameUriManager
;
private
ImageUpdater
mImageUpdater
;
...
...
@@ -65,7 +64,7 @@ public class MainActivity extends HomeActivity {
//资源复制
checkRes
();
//加载收藏夹
favConf
.
re
ad
();
CardFavorites
.
get
().
lo
ad
();
}
@SuppressLint
({
"StringFormatMatches"
,
"StringFormatInvalid"
})
...
...
mobile/src/main/java/cn/garymb/ygomobile/ui/home/ResCheckTask.java
View file @
f7558728
...
...
@@ -379,9 +379,8 @@ public class ResCheckTask extends AsyncTask<Void, Integer, Integer> {
}
private
void
fixString
(
String
stringfile
)
{
String
encoding
=
"utf-8"
;
List
<
String
>
lines
=
FileUtils
.
readLines
(
stringfile
,
encoding
);
FileUtils
.
writeLines
(
stringfile
,
lines
,
encoding
,
"\n"
);
List
<
String
>
lines
=
FileUtils
.
readLines
(
stringfile
,
Constants
.
DEF_ENCODING
);
FileUtils
.
writeLines
(
stringfile
,
lines
,
Constants
.
DEF_ENCODING
,
"\n"
);
}
public
void
checkWindbot
()
{
...
...
mobile/src/main/java/cn/garymb/ygomobile/utils/FileUtils.java
View file @
f7558728
...
...
@@ -44,6 +44,9 @@ public class FileUtils {
InputStreamReader
in
=
null
;
FileInputStream
inputStream
=
null
;
List
<
String
>
lines
=
new
ArrayList
<>();
if
(
encoding
==
null
){
encoding
=
"utf-8"
;
}
try
{
inputStream
=
new
FileInputStream
(
file
);
in
=
new
InputStreamReader
(
inputStream
,
encoding
);
...
...
@@ -52,8 +55,8 @@ public class FileUtils {
while
((
line
=
reader
.
readLine
())
!=
null
)
{
lines
.
add
(
line
);
}
}
catch
(
Exception
e
)
{
}
catch
(
Throwable
e
)
{
//ignore
}
finally
{
IOUtils
.
close
(
in
);
IOUtils
.
close
(
inputStream
);
...
...
@@ -62,6 +65,9 @@ public class FileUtils {
}
public
static
boolean
writeLines
(
String
file
,
List
<
String
>
lines
,
String
encoding
,
String
newLine
)
{
if
(
encoding
==
null
){
encoding
=
"utf-8"
;
}
FileOutputStream
outputStream
=
null
;
File
tmp
=
new
File
(
file
+
".tmp"
);
boolean
ok
=
false
;
...
...
mobile/src/main/java/ocgcore/ConfigManager.java
deleted
100644 → 0
View file @
4aedbb45
package
ocgcore
;
import
java.io.BufferedReader
;
import
java.io.BufferedWriter
;
import
java.io.Closeable
;
import
java.io.File
;
import
java.io.FileInputStream
;
import
java.io.FileOutputStream
;
import
java.io.InputStreamReader
;
import
java.io.OutputStreamWriter
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Locale
;
import
cn.garymb.ygomobile.utils.IOUtils
;
public
class
ConfigManager
implements
Closeable
{
public
static
List
<
Integer
>
mLines
=
new
ArrayList
<>();
private
File
file
;
ConfigManager
(
File
file
)
{
this
.
file
=
file
;
}
@Override
public
void
close
()
{
mLines
.
clear
();
}
public
void
read
()
{
mLines
.
clear
();
InputStreamReader
in
=
null
;
FileInputStream
inputStream
=
null
;
try
{
inputStream
=
new
FileInputStream
(
file
);
in
=
new
InputStreamReader
(
inputStream
,
"utf-8"
);
BufferedReader
reader
=
new
BufferedReader
(
in
);
String
line
=
null
;
while
((
line
=
reader
.
readLine
())
!=
null
)
{
if
(
line
.
startsWith
(
"#"
))
continue
;
mLines
.
add
(
Integer
.
parseInt
(
line
));
}
}
catch
(
Exception
e
)
{
}
finally
{
IOUtils
.
close
(
in
);
IOUtils
.
close
(
inputStream
);
}
}
//暂时弃用
public
boolean
isLoad
()
{
return
mLines
.
size
()
>
0
;
}
public
void
save
(
String
words
)
{
//if (!isLoad()) {
// read();
//}
OutputStreamWriter
out
=
null
;
FileOutputStream
outputStream
=
null
;
File
tmp
=
new
File
(
file
.
getAbsolutePath
()
+
".tmp"
);
boolean
ok
=
false
;
try
{
outputStream
=
new
FileOutputStream
(
tmp
);
out
=
new
OutputStreamWriter
(
outputStream
,
"utf-8"
);
BufferedWriter
writer
=
new
BufferedWriter
(
out
);
if
(
words
!=
null
||
words
!=
""
)
{
writer
.
write
(
words
);
writer
.
newLine
();
}
int
count
=
mLines
.
size
();
for
(
int
i
=
0
;
i
<
count
;
i
++)
{
writer
.
write
((
mLines
.
get
(
i
)).
toString
());
if
(
i
<
count
-
1
)
{
writer
.
newLine
();
}
}
writer
.
flush
();
ok
=
true
;
}
catch
(
Exception
e
)
{
}
finally
{
IOUtils
.
close
(
out
);
IOUtils
.
close
(
outputStream
);
}
if
(
ok
)
{
if
(
file
.
exists
())
{
file
.
delete
();
}
tmp
.
renameTo
(
file
);
}
}
//已弃用通过system.conf设置字体大小
public
void
setFontSize
(
int
size
)
{
if
(!
isLoad
())
{
read
();
}
int
count
=
mLines
.
size
();
for
(
int
i
=
0
;
i
<
count
;
i
++)
{
String
line
=
mLines
.
get
(
i
).
toString
();
if
(
line
==
null
)
continue
;
line
=
line
.
toLowerCase
(
Locale
.
US
);
if
(
line
.
contains
(
"textfont"
))
{
String
[]
values
=
line
.
split
(
"="
);
if
(
values
.
length
>
1
)
{
String
key
=
values
[
0
];
String
val
=
values
[
1
];
String
newline
=
key
+
"= "
;
String
[]
vs
=
val
.
trim
().
split
(
" "
);
newline
+=
vs
[
0
]
+
" "
+
size
;
mLines
.
add
(
i
,
Integer
.
parseInt
(
newline
));
mLines
.
remove
(
i
+
1
);
}
}
}
save
(
""
);
}
}
mobile/src/main/java/ocgcore/DataManager.java
View file @
f7558728
...
...
@@ -40,10 +40,6 @@ public class DataManager {
return
mLimitManager
;
}
public
static
ConfigManager
openConfig
(
File
conf
)
{
return
new
ConfigManager
(
conf
);
}
public
CardManager
getCardManager
()
{
return
mCardManager
;
}
...
...
mobile/src/main/res/color/selector_text_color_white_gold.xml
0 → 100644
View file @
f7558728
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:color=
"@color/gold"
android:state_selected=
"true"
/>
<item
android:color=
"@color/white"
/>
</selector>
\ No newline at end of file
mobile/src/main/res/drawable/ic_baseline_favorite_24.xml
0 → 100644
View file @
f7558728
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportWidth=
"24"
android:viewportHeight=
"24"
android:tint=
"@color/red"
>
<path
android:fillColor=
"@color/red"
android:pathData=
"M12,21.35l-1.45,-1.32C5.4,15.36 2,12.28 2,8.5 2,5.42 4.42,3 7.5,3c1.74,0 3.41,0.81 4.5,2.09C13.09,3.81 14.76,3 16.5,3 19.58,3 22,5.42 22,8.5c0,3.78 -3.4,6.86 -8.55,11.54L12,21.35z"
/>
</vector>
mobile/src/main/res/drawable/ic_baseline_favorite_border_24.xml
0 → 100644
View file @
f7558728
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportWidth=
"24"
android:viewportHeight=
"24"
android:tint=
"@color/red"
>
<path
android:fillColor=
"@color/red"
android:pathData=
"M16.5,3c-1.74,0 -3.41,0.81 -4.5,2.09C10.91,3.81 9.24,3 7.5,3 4.42,3 2,5.42 2,8.5c0,3.78 3.4,6.86 8.55,11.54L12,21.35l1.45,-1.32C18.6,15.36 22,12.28 22,8.5 22,5.42 19.58,3 16.5,3zM12.1,18.55l-0.1,0.1 -0.1,-0.1C7.14,14.24 4,11.39 4,8.5 4,6.5 5.5,5 7.5,5c1.54,0 3.04,0.99 3.57,2.36h1.87C13.46,5.99 14.96,5 16.5,5c2,0 3.5,1.5 3.5,3.5 0,2.89 -3.14,5.74 -7.9,10.05z"
/>
</vector>
mobile/src/main/res/drawable/selector_favorite.xml
0 → 100644
View file @
f7558728
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:drawable=
"@drawable/ic_baseline_favorite_24"
android:state_selected=
"true"
/>
<item
android:drawable=
"@drawable/ic_baseline_favorite_24"
android:state_checked=
"true"
/>
<item
android:drawable=
"@drawable/ic_baseline_favorite_border_24"
/>
</selector>
\ No newline at end of file
mobile/src/main/res/layout/dialog_cardinfo.xml
View file @
f7558728
...
...
@@ -145,9 +145,9 @@
android:layout_width=
"30dp"
android:layout_height=
"30dp"
android:layout_gravity=
"center"
android:
background=
"@drawable/ic_control_point
"
android:
src=
"@drawable/selector_favorite
"
android:paddingRight=
"5dp"
android:scaleType=
"
c
enter"
/>
android:scaleType=
"
fitC
enter"
/>
</LinearLayout>
<LinearLayout
...
...
mobile/src/main/res/layout/nav_card_search.xml
View file @
f7558728
...
...
@@ -46,6 +46,7 @@
android:layout_weight=
"1"
android:background=
"@color/transparent"
android:text=
"@string/my_favorites"
android:textColor=
"@color/selector_text_color_white_gold"
android:visibility=
"visible"
/>
</LinearLayout>
...
...
mobile/src/main/res/values/colors.xml
View file @
f7558728
...
...
@@ -12,8 +12,10 @@
<color
name=
"mediumPurple"
>
#673AB7
</color>
<color
name=
"mediumPurpleDark"
>
#572AA7
</color>
<color
name=
"colorPrimaryDark"
>
#2f41a5
</color>
<color
name=
"gold"
>
#b8be35
</color>
<color
name=
"colorAccent"
>
#EF3934
</color>
<color
name=
"gold"
>
#C8BE35
</color>
<color
name=
"gold_light"
>
#D8DE45
</color>
<color
name=
"red"
>
#EF3934
</color>
<color
name=
"colorAccent"
>
@color/red
</color>
<color
name=
"colorAccentDark"
>
#CF3934
</color>
<color
name=
"item_title"
>
@color/gold
</color>
<color
name=
"item_bg"
>
#65ffffff
</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