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
44ce1006
Commit
44ce1006
authored
May 18, 2022
by
feihuaduo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复卡组保存后卡组码无法刷新的问题
dialogUtils使用云端1.8.9.20 gradle版本升级至7.2.0
parent
fe4863cf
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
239 additions
and
126 deletions
+239
-126
build.gradle
build.gradle
+1
-1
gradle/wrapper/gradle-wrapper.properties
gradle/wrapper/gradle-wrapper.properties
+1
-1
mobile/build.gradle
mobile/build.gradle
+1
-1
mobile/src/main/java/cn/garymb/ygomobile/adapter/TextBaseAdapter.java
...ain/java/cn/garymb/ygomobile/adapter/TextBaseAdapter.java
+72
-0
mobile/src/main/java/cn/garymb/ygomobile/loader/CardLoader.java
.../src/main/java/cn/garymb/ygomobile/loader/CardLoader.java
+1
-1
mobile/src/main/java/cn/garymb/ygomobile/ui/cards/DeckManagerActivity.java
...ava/cn/garymb/ygomobile/ui/cards/DeckManagerActivity.java
+13
-6
mobile/src/main/java/cn/garymb/ygomobile/ui/mycard/mcchat/util/ImageUtil.java
.../cn/garymb/ygomobile/ui/mycard/mcchat/util/ImageUtil.java
+38
-8
mobile/src/main/java/cn/garymb/ygomobile/utils/YGODialogUtil.java
...rc/main/java/cn/garymb/ygomobile/utils/YGODialogUtil.java
+112
-108
No files found.
build.gradle
View file @
44ce1006
...
@@ -10,7 +10,7 @@ buildscript {
...
@@ -10,7 +10,7 @@ buildscript {
mavenCentral
()
mavenCentral
()
}
}
dependencies
{
dependencies
{
classpath
'com.android.tools.build:gradle:7.
1.2
'
classpath
'com.android.tools.build:gradle:7.
2.0
'
classpath
'com.android.tools.build:gradle-experimental:0.11.1'
classpath
'com.android.tools.build:gradle-experimental:0.11.1'
//classpath 'me.tatarka:gradle-retrolambda:3.2.5'
//classpath 'me.tatarka:gradle-retrolambda:3.2.5'
}
}
...
...
gradle/wrapper/gradle-wrapper.properties
View file @
44ce1006
...
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
...
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath
=
wrapper/dists
distributionPath
=
wrapper/dists
zipStoreBase
=
GRADLE_USER_HOME
zipStoreBase
=
GRADLE_USER_HOME
zipStorePath
=
wrapper/dists
zipStorePath
=
wrapper/dists
distributionUrl
=
https
\:
//services.gradle.org/distributions/gradle-7.
2
-all.zip
distributionUrl
=
https
\:
//services.gradle.org/distributions/gradle-7.
3.3
-all.zip
mobile/build.gradle
View file @
44ce1006
...
@@ -115,7 +115,7 @@ dependencies {
...
@@ -115,7 +115,7 @@ dependencies {
implementation
'com.nightonke:boommenu:2.1.0'
implementation
'com.nightonke:boommenu:2.1.0'
implementation
fileTree
(
dir:
'libs'
,
include:
[
'*.jar'
])
implementation
fileTree
(
dir:
'libs'
,
include:
[
'*.jar'
])
//dialog库
//dialog库
implementation
(
name:
'dialogutils2-release'
,
ext:
'aar'
)
implementation
'com.github.feihuaduo:DialogUtils:1.8.9.20'
//recyclerview的adapter库
//recyclerview的adapter库
implementation
'com.github.CymChad:BaseRecyclerViewAdapterHelper:3.0.4'
implementation
'com.github.CymChad:BaseRecyclerViewAdapterHelper:3.0.4'
implementation
'androidx.appcompat:appcompat:1.2.0'
implementation
'androidx.appcompat:appcompat:1.2.0'
...
...
mobile/src/main/java/cn/garymb/ygomobile/adapter/TextBaseAdapter.java
0 → 100644
View file @
44ce1006
package
cn.garymb.ygomobile.adapter
;
import
android.content.Context
;
import
android.view.Gravity
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.widget.AbsListView
;
import
android.widget.BaseAdapter
;
import
androidx.appcompat.widget.AppCompatTextView
;
import
androidx.core.content.ContextCompat
;
import
cn.garymb.ygomobile.lite.R
;
/**
* Create By feihua On 2022/5/18
*/
public
class
TextBaseAdapter
extends
BaseAdapter
{
private
Context
context
;
private
String
[]
data
;
private
int
leftPadding
;
private
int
rightPadding
;
private
int
topPadding
;
private
int
bottomPadding
;
private
int
textColor
=
0
;
public
TextBaseAdapter
(
Context
context
,
String
[]
data
,
int
textColor
,
int
leftPadding
,
int
topPadding
,
int
rightPadding
,
int
bottomPadding
)
{
this
.
context
=
context
;
this
.
data
=
data
;
this
.
textColor
=
textColor
;
this
.
leftPadding
=
leftPadding
;
this
.
rightPadding
=
rightPadding
;
this
.
topPadding
=
topPadding
;
this
.
bottomPadding
=
bottomPadding
;
}
@Override
public
int
getCount
()
{
return
data
.
length
;
//设置此数据适配起有几个item
}
@Override
public
Object
getItem
(
int
p1
)
//未知,好像无用
{
return
data
[
p1
];
}
@Override
public
long
getItemId
(
int
p1
)
//未知,好像无用
{
return
p1
;
}
@Override
public
View
getView
(
int
p1
,
View
p2
,
ViewGroup
p3
)
{
AppCompatTextView
t
=
new
AppCompatTextView
(
context
);
if
(
textColor
==
0
)
t
.
setTextColor
(
ContextCompat
.
getColor
(
context
,
R
.
color
.
colorAccent
));
else
t
.
setTextColor
(
textColor
);
t
.
setText
(
data
[
p1
]);
//p1为对应的数组下标
t
.
setTextSize
(
20
);
t
.
setGravity
(
Gravity
.
CENTER
);
t
.
setPadding
(
leftPadding
,
topPadding
,
rightPadding
,
bottomPadding
);
t
.
setLayoutParams
(
new
AbsListView
.
LayoutParams
(
AbsListView
.
LayoutParams
.
MATCH_PARENT
,
AbsListView
.
LayoutParams
.
MATCH_PARENT
));
return
t
;
//返回设置好的view组件,也可以是布局,也可以是控件
}
}
mobile/src/main/java/cn/garymb/ygomobile/loader/CardLoader.java
View file @
44ce1006
...
@@ -134,7 +134,7 @@ public class CardLoader implements ICardSearcher {
...
@@ -134,7 +134,7 @@ public class CardLoader implements ICardSearcher {
if
(
searchInfo
!=
null
&&
card
.
Name
.
equals
(
searchInfo
.
getKeyWord
().
getValue
()))
{
if
(
searchInfo
!=
null
&&
card
.
Name
.
equals
(
searchInfo
.
getKeyWord
().
getValue
()))
{
cards
.
remove
(
i
);
cards
.
remove
(
i
);
keywordtmp
.
add
(
card
);
keywordtmp
.
add
(
card
);
continue
;
//
ظ
continue
;
//
避免重复
}
}
if
(
searchInfo
==
null
||
searchInfo
.
isValid
(
card
))
{
if
(
searchInfo
==
null
||
searchInfo
.
isValid
(
card
))
{
list
.
add
(
card
);
list
.
add
(
card
);
...
...
mobile/src/main/java/cn/garymb/ygomobile/ui/cards/DeckManagerActivity.java
View file @
44ce1006
...
@@ -774,11 +774,18 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi
...
@@ -774,11 +774,18 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi
// if (file != null) {
// if (file != null) {
// loadDeckFromFile(file);
// loadDeckFromFile(file);
// }
// }
Deck
deck
=
mDeckAdapater
.
toDeck
(
mDeckAdapater
.
getYdkFile
());
if
(
deck
.
getDeckCount
()==
0
){
builderShareLoading
.
dismiss
();
YGOUtil
.
show
(
"卡组中没有卡片"
);
return
;
}
//延时半秒,使整体看起来更流畅
//延时半秒,使整体看起来更流畅
new
Handler
().
postDelayed
(
this
::
shareDeck1
,
500
);
new
Handler
().
postDelayed
(
()
->
shareDeck1
(
deck
)
,
500
);
}
}
private
void
shareDeck1
()
{
private
void
shareDeck1
(
Deck
deck
)
{
//开启绘图缓存
//开启绘图缓存
mRecyclerView
.
setDrawingCacheEnabled
(
true
);
mRecyclerView
.
setDrawingCacheEnabled
(
true
);
//这个方法可调可不调,因为在getDrawingCache()里会自动判断有没有缓存有没有准备好,
//这个方法可调可不调,因为在getDrawingCache()里会自动判断有没有缓存有没有准备好,
...
@@ -793,7 +800,7 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi
...
@@ -793,7 +800,7 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi
mRecyclerView
.
destroyDrawingCache
();
mRecyclerView
.
destroyDrawingCache
();
// shotRecyclerView(mRecyclerView)
// shotRecyclerView(mRecyclerView)
Deck
deck
=
mDeckAdapater
.
toDeck
(
mDeckAdapater
.
getYdkFile
());
String
deckName
=
deck
.
getName
();
String
deckName
=
deck
.
getName
();
int
end
=
deckName
.
lastIndexOf
(
"."
);
int
end
=
deckName
.
lastIndexOf
(
"."
);
if
(
end
!=
-
1
)
{
if
(
end
!=
-
1
)
{
...
@@ -803,13 +810,13 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi
...
@@ -803,13 +810,13 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi
BitmapUtil
.
saveBitmap
(
bitmap
,
savePath
,
50
);
BitmapUtil
.
saveBitmap
(
bitmap
,
savePath
,
50
);
builderShareLoading
.
dismiss
();
builderShareLoading
.
dismiss
();
DialogUtils
du
=
DialogUtils
.
getdx
(
this
);
DialogUtils
du
=
DialogUtils
.
getdx
(
this
);
View
viewDialog
=
du
.
dialogBottomSheet
(
R
.
layout
.
dialog_deck_share
,
0
);
View
viewDialog
=
du
.
dialogBottomSheet
(
R
.
layout
.
dialog_deck_share
,
true
);
ImageView
iv_image
=
viewDialog
.
findViewById
(
R
.
id
.
iv_image
);
ImageView
iv_image
=
viewDialog
.
findViewById
(
R
.
id
.
iv_image
);
Button
bt_image_share
=
viewDialog
.
findViewById
(
R
.
id
.
bt_image_share
);
Button
bt_image_share
=
viewDialog
.
findViewById
(
R
.
id
.
bt_image_share
);
Button
bt_code_share
=
viewDialog
.
findViewById
(
R
.
id
.
bt_code_share
);
Button
bt_code_share
=
viewDialog
.
findViewById
(
R
.
id
.
bt_code_share
);
TextView
tv_code
=
viewDialog
.
findViewById
(
R
.
id
.
et_code
);
TextView
tv_code
=
viewDialog
.
findViewById
(
R
.
id
.
et_code
);
tv_code
.
setText
(
mDeckAdapater
.
getDeckInfo
().
toDeck
()
.
toAppUri
().
toString
());
tv_code
.
setText
(
deck
.
toAppUri
().
toString
());
ImageUtil
.
s
etImage
(
this
,
savePath
,
iv_image
);
ImageUtil
.
s
how
(
this
,
savePath
,
iv_image
,
System
.
currentTimeMillis
()+
""
);
bt_code_share
.
setOnClickListener
(
v
->
{
bt_code_share
.
setOnClickListener
(
v
->
{
du
.
dis
();
du
.
dis
();
...
...
mobile/src/main/java/cn/garymb/ygomobile/ui/mycard/mcchat/util/ImageUtil.java
View file @
44ce1006
...
@@ -4,15 +4,24 @@ import android.content.Context;
...
@@ -4,15 +4,24 @@ import android.content.Context;
import
android.graphics.ColorMatrix
;
import
android.graphics.ColorMatrix
;
import
android.graphics.ColorMatrixColorFilter
;
import
android.graphics.ColorMatrixColorFilter
;
import
android.net.Uri
;
import
android.net.Uri
;
import
android.text.TextUtils
;
import
android.widget.ImageView
;
import
android.widget.ImageView
;
import
com.bumptech.glide.Glide
;
import
com.bumptech.glide.load.engine.DiskCacheStrategy
;
import
com.bumptech.glide.load.engine.DiskCacheStrategy
;
import
com.bumptech.glide.request.RequestOptions
;
import
com.bumptech.glide.signature.ObjectKey
;
import
com.ourygo.assistant.util.Util
;
import
cn.garymb.ygomobile.lite.R
;
import
cn.garymb.ygomobile.lite.R
;
import
cn.garymb.ygomobile.utils.glide.GlideCompat
;
import
cn.garymb.ygomobile.utils.glide.GlideCompat
;
public
class
ImageUtil
{
public
class
ImageUtil
{
public
static
final
RequestOptions
imageOption
=
RequestOptions
.
diskCacheStrategyOf
(
DiskCacheStrategy
.
DATA
)
.
placeholder
(
R
.
drawable
.
unknown
);
public
static
void
setAvatar
(
Context
context
,
String
url
,
final
ImageView
im
)
{
public
static
void
setAvatar
(
Context
context
,
String
url
,
final
ImageView
im
)
{
if
(
url
!=
null
)
{
if
(
url
!=
null
)
{
GlideCompat
.
with
(
context
)
GlideCompat
.
with
(
context
)
...
@@ -25,13 +34,14 @@ public class ImageUtil {
...
@@ -25,13 +34,14 @@ public class ImageUtil {
public
static
void
setImage
(
Context
context
,
String
url
,
final
ImageView
im
)
{
public
static
void
setImage
(
Context
context
,
String
url
,
final
ImageView
im
)
{
if
(
url
!=
null
)
{
// if (url != null) {
GlideCompat
.
with
(
context
)
// GlideCompat.with(context)
.
load
(
url
)
// .load(url)
.
diskCacheStrategy
(
DiskCacheStrategy
.
DATA
)
// .diskCacheStrategy(DiskCacheStrategy.DATA)
.
placeholder
(
R
.
drawable
.
unknown
)
// .placeholder(R.drawable.unknown)
.
into
(
im
);
// .into(im);
}
// }
show
(
context
,
url
,
im
,
null
);
}
}
public
static
void
setGrayImage
(
int
key
,
ImageView
imageView
)
{
public
static
void
setGrayImage
(
int
key
,
ImageView
imageView
)
{
...
@@ -41,9 +51,29 @@ public class ImageUtil {
...
@@ -41,9 +51,29 @@ public class ImageUtil {
imageView
.
setColorFilter
(
filter
);
imageView
.
setColorFilter
(
filter
);
}
}
public
static
void
reImageColor
(
int
key
,
ImageView
imageView
)
{
public
static
void
reImageColor
(
int
key
,
ImageView
imageView
)
{
imageView
.
setColorFilter
(
null
);
imageView
.
setColorFilter
(
null
);
}
}
public
static
void
show
(
Context
context
,
String
uri
,
final
ImageView
im
,
String
objectKey
)
{
if
(!
Util
.
isContextExisted
(
context
))
return
;
if
(
TextUtils
.
isEmpty
(
uri
))
return
;
if
(
TextUtils
.
isEmpty
(
objectKey
))
{
setImage
(
context
,
uri
,
im
);
Glide
.
with
(
context
)
.
load
(
uri
)
.
apply
(
imageOption
)
.
into
(
im
);
}
else
{
Glide
.
with
(
context
)
.
load
(
uri
)
.
signature
(
new
ObjectKey
(
objectKey
))
.
apply
(
imageOption
)
.
into
(
im
);
}
}
}
}
mobile/src/main/java/cn/garymb/ygomobile/utils/YGODialogUtil.java
View file @
44ce1006
package
cn.garymb.ygomobile.utils
;
package
cn.garymb.ygomobile.utils
;
import
static
cn
.
garymb
.
ygomobile
.
lite
.
R
.
string
.
please_select_target_category
;
import
android.app.Dialog
;
import
android.app.Dialog
;
import
android.content.Context
;
import
android.content.Context
;
import
android.content.DialogInterface
;
import
android.content.DialogInterface
;
import
android.text.InputType
;
import
android.text.InputType
;
import
android.text.TextUtils
;
import
android.text.TextUtils
;
import
android.util.Log
;
import
android.view.Gravity
;
import
android.view.Gravity
;
import
android.view.KeyEvent
;
import
android.view.KeyEvent
;
import
android.view.View
;
import
android.view.View
;
import
android.widget.AdapterView
;
import
android.widget.EditText
;
import
android.widget.EditText
;
import
android.widget.ImageView
;
import
android.widget.ImageView
;
import
android.widget.LinearLayout
;
import
android.widget.LinearLayout
;
import
android.widget.ListView
;
import
android.widget.TextView
;
import
android.widget.TextView
;
import
androidx.annotation.NonNull
;
import
androidx.annotation.NonNull
;
...
@@ -31,6 +32,7 @@ import java.util.List;
...
@@ -31,6 +32,7 @@ import java.util.List;
import
cn.garymb.ygomobile.AppsSettings
;
import
cn.garymb.ygomobile.AppsSettings
;
import
cn.garymb.ygomobile.Constants
;
import
cn.garymb.ygomobile.Constants
;
import
cn.garymb.ygomobile.adapter.TextBaseAdapter
;
import
cn.garymb.ygomobile.bean.DeckType
;
import
cn.garymb.ygomobile.bean.DeckType
;
import
cn.garymb.ygomobile.bean.events.DeckFile
;
import
cn.garymb.ygomobile.bean.events.DeckFile
;
import
cn.garymb.ygomobile.lite.R
;
import
cn.garymb.ygomobile.lite.R
;
...
@@ -39,10 +41,40 @@ import cn.garymb.ygomobile.ui.mycard.mcchat.util.ImageUtil;
...
@@ -39,10 +41,40 @@ import cn.garymb.ygomobile.ui.mycard.mcchat.util.ImageUtil;
import
cn.garymb.ygomobile.ui.plus.DialogPlus
;
import
cn.garymb.ygomobile.ui.plus.DialogPlus
;
import
cn.garymb.ygomobile.utils.recyclerview.DeckTypeTouchHelperCallback
;
import
cn.garymb.ygomobile.utils.recyclerview.DeckTypeTouchHelperCallback
;
import
static
cn
.
garymb
.
ygomobile
.
lite
.
R
.
string
.
please_select_target_category
;
public
class
YGODialogUtil
{
public
class
YGODialogUtil
{
private
static
class
ViewHolder
{
public
static
void
dialogDeckSelect
(
Context
context
,
String
selectDeckPath
,
OnDeckMenuListener
onDeckMenuListener
)
{
ViewHolder
viewHolder
=
new
ViewHolder
(
context
,
selectDeckPath
,
onDeckMenuListener
);
viewHolder
.
show
();
}
public
static
ListView
dialogl
(
Context
context
,
String
title
,
String
[]
list
)
{
DialogUtils
dialogUtils
=
DialogUtils
.
getInstance
(
context
);
ListView
listView
=
dialogUtils
.
dialogl1
(
title
,
new
TextBaseAdapter
(
context
,
list
,
YGOUtil
.
c
(
R
.
color
.
white
)
,
16
,
16
,
16
,
16
));
dialogUtils
.
setDialogBackgroundResource
(
R
.
drawable
.
radius
);
dialogUtils
.
setTitleColor
(
YGOUtil
.
c
(
R
.
color
.
holo_blue_light
));
return
listView
;
}
public
interface
OnDeckMenuListener
{
void
onDeckSelect
(
DeckFile
deckFile
);
void
onDeckDel
(
List
<
DeckFile
>
deckFileList
);
void
onDeckMove
(
List
<
DeckFile
>
deckFileList
,
DeckType
toDeckType
);
void
onDeckCopy
(
List
<
DeckFile
>
deckFileList
,
DeckType
toDeckType
);
void
onDeckNew
(
DeckType
currentDeckType
);
}
public
interface
OnDeckTypeListener
{
void
onDeckTypeListener
(
int
position
);
}
private
static
class
ViewHolder
{
private
final
int
IMAGE_MOVE
=
0
;
private
final
int
IMAGE_MOVE
=
0
;
private
final
int
IMAGE_COPY
=
1
;
private
final
int
IMAGE_COPY
=
1
;
...
@@ -61,9 +93,9 @@ public class YGODialogUtil {
...
@@ -61,9 +93,9 @@ public class YGODialogUtil {
private
final
TextSelectAdapter
<
DeckFile
>
deckAdp
;
private
final
TextSelectAdapter
<
DeckFile
>
deckAdp
;
private
final
Dialog
ygoDialog
;
private
final
Dialog
ygoDialog
;
public
ViewHolder
(
Context
context
,
String
selectDeckPath
,
OnDeckMenuListener
onDeckMenuListener
){
public
ViewHolder
(
Context
context
,
String
selectDeckPath
,
OnDeckMenuListener
onDeckMenuListener
)
{
DialogUtils
du
=
DialogUtils
.
getdx
(
context
);
DialogUtils
du
=
DialogUtils
.
getdx
(
context
);
View
viewDialog
=
du
.
dialogBottomSheet
(
R
.
layout
.
dialog_deck_select
,
0
);
View
viewDialog
=
du
.
dialogBottomSheet
(
R
.
layout
.
dialog_deck_select
,
false
);
RecyclerView
rv_type
,
rv_deck
;
RecyclerView
rv_type
,
rv_deck
;
rv_deck
=
viewDialog
.
findViewById
(
R
.
id
.
rv_deck
);
rv_deck
=
viewDialog
.
findViewById
(
R
.
id
.
rv_deck
);
...
@@ -178,11 +210,9 @@ public class YGODialogUtil {
...
@@ -178,11 +210,9 @@ public class YGODialogUtil {
ll_add
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
ll_add
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
@Override
public
void
onClick
(
View
v
)
{
public
void
onClick
(
View
v
)
{
d
u
.
dialogl
(
context
.
getString
(
R
.
string
.
new_deck
),
d
ialogl
(
context
,
context
.
getString
(
R
.
string
.
new_deck
),
new
String
[]{
context
.
getString
(
R
.
string
.
category_name
),
new
String
[]{
context
.
getString
(
R
.
string
.
category_name
),
context
.
getString
(
R
.
string
.
deck_name
)},
R
.
drawable
.
radius
).
setOnItemClickListener
(
new
AdapterView
.
OnItemClickListener
()
{
context
.
getString
(
R
.
string
.
deck_name
)}).
setOnItemClickListener
((
parent
,
view
,
position
,
id
)
->
{
@Override
public
void
onItemClick
(
AdapterView
<?>
parent
,
View
view
,
int
position
,
long
id
)
{
du
.
dis
();
du
.
dis
();
switch
(
position
)
{
switch
(
position
)
{
case
0
:
case
0
:
...
@@ -220,7 +250,6 @@ public class YGODialogUtil {
...
@@ -220,7 +250,6 @@ public class YGODialogUtil {
dismiss
();
dismiss
();
break
;
break
;
}
}
}
});
});
}
}
});
});
...
@@ -228,9 +257,8 @@ public class YGODialogUtil {
...
@@ -228,9 +257,8 @@ public class YGODialogUtil {
ll_move
.
setOnClickListener
(
v
->
{
ll_move
.
setOnClickListener
(
v
->
{
List
<
DeckType
>
otherType
=
getOtherTypeList
();
List
<
DeckType
>
otherType
=
getOtherTypeList
();
du
.
dialogl
(
context
.
getString
(
please_select_target_category
),
dialogl
(
context
,
context
.
getString
(
please_select_target_category
),
getStringType
(
otherType
),
getStringType
(
otherType
)).
setOnItemClickListener
((
parent
,
view
,
position
,
id
)
->
{
R
.
drawable
.
radius
).
setOnItemClickListener
((
parent
,
view
,
position
,
id
)
->
{
du
.
dis
();
du
.
dis
();
DeckType
toType
=
otherType
.
get
(
position
);
DeckType
toType
=
otherType
.
get
(
position
);
IOUtils
.
createFolder
(
new
File
(
toType
.
getPath
()));
IOUtils
.
createFolder
(
new
File
(
toType
.
getPath
()));
...
@@ -252,9 +280,8 @@ public class YGODialogUtil {
...
@@ -252,9 +280,8 @@ public class YGODialogUtil {
ll_copy
.
setOnClickListener
(
v
->
{
ll_copy
.
setOnClickListener
(
v
->
{
List
<
DeckType
>
otherType
=
getOtherTypeList
();
List
<
DeckType
>
otherType
=
getOtherTypeList
();
du
.
dialogl
(
context
.
getString
(
please_select_target_category
),
dialogl
(
context
,
context
.
getString
(
please_select_target_category
),
getStringType
(
otherType
),
getStringType
(
otherType
)).
setOnItemClickListener
((
parent
,
view
,
position
,
id
)
->
{
R
.
drawable
.
radius
).
setOnItemClickListener
((
parent
,
view
,
position
,
id
)
->
{
du
.
dis
();
du
.
dis
();
DeckType
toType
=
otherType
.
get
(
position
);
DeckType
toType
=
otherType
.
get
(
position
);
IOUtils
.
createFolder
(
new
File
(
toType
.
getPath
()));
IOUtils
.
createFolder
(
new
File
(
toType
.
getPath
()));
...
@@ -418,8 +445,8 @@ public class YGODialogUtil {
...
@@ -418,8 +445,8 @@ public class YGODialogUtil {
hideAllDeckUtil
();
hideAllDeckUtil
();
}
}
public
void
show
(){
public
void
show
()
{
if
(
ygoDialog
!=
null
&&
!
ygoDialog
.
isShowing
())
{
if
(
ygoDialog
!=
null
&&
!
ygoDialog
.
isShowing
())
{
ygoDialog
.
show
();
ygoDialog
.
show
();
}
}
}
}
...
@@ -431,27 +458,4 @@ public class YGODialogUtil {
...
@@ -431,27 +458,4 @@ public class YGODialogUtil {
}
}
public
static
void
dialogDeckSelect
(
Context
context
,
String
selectDeckPath
,
OnDeckMenuListener
onDeckMenuListener
)
{
ViewHolder
viewHolder
=
new
ViewHolder
(
context
,
selectDeckPath
,
onDeckMenuListener
);
viewHolder
.
show
();
}
public
interface
OnDeckMenuListener
{
void
onDeckSelect
(
DeckFile
deckFile
);
void
onDeckDel
(
List
<
DeckFile
>
deckFileList
);
void
onDeckMove
(
List
<
DeckFile
>
deckFileList
,
DeckType
toDeckType
);
void
onDeckCopy
(
List
<
DeckFile
>
deckFileList
,
DeckType
toDeckType
);
void
onDeckNew
(
DeckType
currentDeckType
);
}
public
interface
OnDeckTypeListener
{
void
onDeckTypeListener
(
int
position
);
}
}
}
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