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
b84db6d5
Commit
b84db6d5
authored
Jul 07, 2022
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加个人中心fragment
修改settings
parent
d4e1efcd
Changes
26
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
360 additions
and
42 deletions
+360
-42
mobile/build.gradle
mobile/build.gradle
+2
-0
mobile/src/main/AndroidManifest.xml
mobile/src/main/AndroidManifest.xml
+2
-2
mobile/src/main/java/cn/garymb/ygomobile/AppsSettings.java
mobile/src/main/java/cn/garymb/ygomobile/AppsSettings.java
+1
-1
mobile/src/main/java/cn/garymb/ygomobile/GameUriManager.java
mobile/src/main/java/cn/garymb/ygomobile/GameUriManager.java
+1
-1
mobile/src/main/java/cn/garymb/ygomobile/ui/activities/WebActivity.java
...n/java/cn/garymb/ygomobile/ui/activities/WebActivity.java
+1
-1
mobile/src/main/java/cn/garymb/ygomobile/ui/cards/DeckManagerFragment.java
...ava/cn/garymb/ygomobile/ui/cards/DeckManagerFragment.java
+1
-1
mobile/src/main/java/cn/garymb/ygomobile/ui/home/HomeActivity.java
...c/main/java/cn/garymb/ygomobile/ui/home/HomeActivity.java
+8
-19
mobile/src/main/java/cn/garymb/ygomobile/ui/settings/BasePreferenceFragment.java
.../garymb/ygomobile/ui/settings/BasePreferenceFragment.java
+1
-1
mobile/src/main/java/cn/garymb/ygomobile/ui/settings/PersonalFragment.java
...ava/cn/garymb/ygomobile/ui/settings/PersonalFragment.java
+77
-0
mobile/src/main/java/cn/garymb/ygomobile/ui/settings/PreferenceFragmentPlus.java
.../garymb/ygomobile/ui/settings/PreferenceFragmentPlus.java
+1
-1
mobile/src/main/java/cn/garymb/ygomobile/ui/settings/SettingsActivity.java
...ava/cn/garymb/ygomobile/ui/settings/SettingsActivity.java
+2
-2
mobile/src/main/java/cn/garymb/ygomobile/ui/settings/YGOPreferencesProvider.java
.../garymb/ygomobile/ui/settings/YGOPreferencesProvider.java
+1
-1
mobile/src/main/java/cn/garymb/ygomobile/ui/settings/fragments/SettingFragment.java
...rymb/ygomobile/ui/settings/fragments/SettingFragment.java
+2
-2
mobile/src/main/res/drawable-xhdpi/add.png
mobile/src/main/res/drawable-xhdpi/add.png
+0
-0
mobile/src/main/res/drawable-xhdpi/avatar.jpg
mobile/src/main/res/drawable-xhdpi/avatar.jpg
+0
-0
mobile/src/main/res/drawable-xhdpi/avatar.png
mobile/src/main/res/drawable-xhdpi/avatar.png
+0
-0
mobile/src/main/res/drawable-xhdpi/deck.png
mobile/src/main/res/drawable-xhdpi/deck.png
+0
-0
mobile/src/main/res/drawable-xhdpi/home.png
mobile/src/main/res/drawable-xhdpi/home.png
+0
-0
mobile/src/main/res/drawable-xhdpi/my.png
mobile/src/main/res/drawable-xhdpi/my.png
+0
-0
mobile/src/main/res/drawable/click_background_radius.xml
mobile/src/main/res/drawable/click_background_radius.xml
+20
-0
mobile/src/main/res/layout/activity_settings.xml
mobile/src/main/res/layout/activity_settings.xml
+1
-1
mobile/src/main/res/layout/fragment_personal.xml
mobile/src/main/res/layout/fragment_personal.xml
+233
-0
mobile/src/main/res/values-ko/strings.xml
mobile/src/main/res/values-ko/strings.xml
+2
-0
mobile/src/main/res/values-zh/strings.xml
mobile/src/main/res/values-zh/strings.xml
+2
-0
mobile/src/main/res/values/strings.xml
mobile/src/main/res/values/strings.xml
+2
-0
mobile/src/main/res/xml/preference_game.xml
mobile/src/main/res/xml/preference_game.xml
+0
-9
No files found.
mobile/build.gradle
View file @
b84db6d5
...
@@ -145,4 +145,6 @@ dependencies {
...
@@ -145,4 +145,6 @@ dependencies {
implementation
'com.google.code.gson:gson:2.8.6'
implementation
'com.google.code.gson:gson:2.8.6'
implementation
"androidx.palette:palette:1.0.0"
implementation
"androidx.palette:palette:1.0.0"
implementation
'com.ashokvarma.android:bottom-navigation-bar:2.2.0'
implementation
'com.ashokvarma.android:bottom-navigation-bar:2.2.0'
//圆形头像
implementation
'de.hdodenhof:circleimageview:2.2.0'
}
}
mobile/src/main/AndroidManifest.xml
View file @
b84db6d5
...
@@ -136,7 +136,7 @@
...
@@ -136,7 +136,7 @@
tools:replace=
"android:theme"
/>
tools:replace=
"android:theme"
/>
<activity
<activity
android:name=
"cn.garymb.ygomobile.ui.
preference
.SettingsActivity"
android:name=
"cn.garymb.ygomobile.ui.
settings
.SettingsActivity"
android:configChanges=
"orientation|keyboardHidden|navigation|screenSize"
android:configChanges=
"orientation|keyboardHidden|navigation|screenSize"
android:label=
"@string/settings"
android:label=
"@string/settings"
android:launchMode=
"singleTop"
android:launchMode=
"singleTop"
...
@@ -183,7 +183,7 @@
...
@@ -183,7 +183,7 @@
<!-- 如果已经安装过原版YGOMobile,请注释掉或修改成其他,否则会导致无法安装 -->
<!-- 如果已经安装过原版YGOMobile,请注释掉或修改成其他,否则会导致无法安装 -->
<provider
<provider
android:name=
"cn.garymb.ygomobile.ui.
preference
.YGOPreferencesProvider"
android:name=
"cn.garymb.ygomobile.ui.
settings
.YGOPreferencesProvider"
android:authorities=
"${applicationId}.ui.preference.YGOPreferencesProvider"
android:authorities=
"${applicationId}.ui.preference.YGOPreferencesProvider"
android:exported=
"false"
android:exported=
"false"
android:grantUriPermissions=
"true"
/>
android:grantUriPermissions=
"true"
/>
...
...
mobile/src/main/java/cn/garymb/ygomobile/AppsSettings.java
View file @
b84db6d5
...
@@ -44,7 +44,7 @@ import java.util.Locale;
...
@@ -44,7 +44,7 @@ import java.util.Locale;
import
cn.garymb.ygomobile.core.IrrlichtBridge
;
import
cn.garymb.ygomobile.core.IrrlichtBridge
;
import
cn.garymb.ygomobile.lite.R
;
import
cn.garymb.ygomobile.lite.R
;
import
cn.garymb.ygomobile.ui.
preference
.PreferenceFragmentPlus
;
import
cn.garymb.ygomobile.ui.
settings
.PreferenceFragmentPlus
;
import
cn.garymb.ygomobile.utils.DeckUtil
;
import
cn.garymb.ygomobile.utils.DeckUtil
;
import
cn.garymb.ygomobile.utils.DensityUtils
;
import
cn.garymb.ygomobile.utils.DensityUtils
;
import
cn.garymb.ygomobile.utils.IOUtils
;
import
cn.garymb.ygomobile.utils.IOUtils
;
...
...
mobile/src/main/java/cn/garymb/ygomobile/GameUriManager.java
View file @
b84db6d5
...
@@ -31,7 +31,7 @@ import cn.garymb.ygomobile.bean.Deck;
...
@@ -31,7 +31,7 @@ import cn.garymb.ygomobile.bean.Deck;
import
cn.garymb.ygomobile.lite.R
;
import
cn.garymb.ygomobile.lite.R
;
import
cn.garymb.ygomobile.ui.cards.DeckManagerFragment
;
import
cn.garymb.ygomobile.ui.cards.DeckManagerFragment
;
import
cn.garymb.ygomobile.ui.home.HomeFragment
;
import
cn.garymb.ygomobile.ui.home.HomeFragment
;
import
cn.garymb.ygomobile.ui.
preference
.SettingsActivity
;
import
cn.garymb.ygomobile.ui.
settings
.SettingsActivity
;
import
cn.garymb.ygomobile.utils.FileUtils
;
import
cn.garymb.ygomobile.utils.FileUtils
;
import
cn.garymb.ygomobile.utils.IOUtils
;
import
cn.garymb.ygomobile.utils.IOUtils
;
import
cn.garymb.ygomobile.utils.YGOUtil
;
import
cn.garymb.ygomobile.utils.YGOUtil
;
...
...
mobile/src/main/java/cn/garymb/ygomobile/ui/activities/WebActivity.java
View file @
b84db6d5
...
@@ -35,7 +35,7 @@ import cn.garymb.ygomobile.lite.BuildConfig;
...
@@ -35,7 +35,7 @@ import cn.garymb.ygomobile.lite.BuildConfig;
import
cn.garymb.ygomobile.lite.R
;
import
cn.garymb.ygomobile.lite.R
;
import
cn.garymb.ygomobile.ui.home.ServerListManager
;
import
cn.garymb.ygomobile.ui.home.ServerListManager
;
import
cn.garymb.ygomobile.ui.plus.VUiKit
;
import
cn.garymb.ygomobile.ui.plus.VUiKit
;
import
cn.garymb.ygomobile.ui.
preference
.SettingsActivity
;
import
cn.garymb.ygomobile.ui.
settings
.SettingsActivity
;
import
cn.garymb.ygomobile.ui.widget.WebViewPlus
;
import
cn.garymb.ygomobile.ui.widget.WebViewPlus
;
import
cn.garymb.ygomobile.utils.DownloadUtil
;
import
cn.garymb.ygomobile.utils.DownloadUtil
;
import
cn.garymb.ygomobile.utils.FileUtils
;
import
cn.garymb.ygomobile.utils.FileUtils
;
...
...
mobile/src/main/java/cn/garymb/ygomobile/ui/cards/DeckManagerFragment.java
View file @
b84db6d5
...
@@ -1305,7 +1305,7 @@ public class DeckManagerFragment extends BaseFragemnt implements RecyclerViewIte
...
@@ -1305,7 +1305,7 @@ public class DeckManagerFragment extends BaseFragemnt implements RecyclerViewIte
addMenuButton
(
mMenuIds
,
menu
,
R
.
id
.
action_save
,
R
.
string
.
save_deck
,
R
.
drawable
.
save
);
addMenuButton
(
mMenuIds
,
menu
,
R
.
id
.
action_save
,
R
.
string
.
save_deck
,
R
.
drawable
.
save
);
addMenuButton
(
mMenuIds
,
menu
,
R
.
id
.
action_clear_deck
,
R
.
string
.
clear_deck
,
R
.
drawable
.
clear_deck
);
addMenuButton
(
mMenuIds
,
menu
,
R
.
id
.
action_clear_deck
,
R
.
string
.
clear_deck
,
R
.
drawable
.
clear_deck
);
addMenuButton
(
mMenuIds
,
menu
,
R
.
id
.
action_deck_new
,
R
.
string
.
new_deck
,
R
.
drawable
.
add
sever
);
addMenuButton
(
mMenuIds
,
menu
,
R
.
id
.
action_deck_new
,
R
.
string
.
new_deck
,
R
.
drawable
.
add
);
addMenuButton
(
mMenuIds
,
menu
,
R
.
id
.
action_rename
,
R
.
string
.
rename_deck
,
R
.
drawable
.
rename
);
addMenuButton
(
mMenuIds
,
menu
,
R
.
id
.
action_rename
,
R
.
string
.
rename_deck
,
R
.
drawable
.
rename
);
addMenuButton
(
mMenuIds
,
menu
,
R
.
id
.
action_delete_deck
,
R
.
string
.
delete_deck
,
R
.
drawable
.
delete
);
addMenuButton
(
mMenuIds
,
menu
,
R
.
id
.
action_delete_deck
,
R
.
string
.
delete_deck
,
R
.
drawable
.
delete
);
...
...
mobile/src/main/java/cn/garymb/ygomobile/ui/home/HomeActivity.java
View file @
b84db6d5
...
@@ -34,7 +34,8 @@ import cn.garymb.ygomobile.ui.cards.DeckManagerFragment;
...
@@ -34,7 +34,8 @@ import cn.garymb.ygomobile.ui.cards.DeckManagerFragment;
import
cn.garymb.ygomobile.ui.cards.deck.DeckUtils
;
import
cn.garymb.ygomobile.ui.cards.deck.DeckUtils
;
import
cn.garymb.ygomobile.ui.mycard.MycardFragment
;
import
cn.garymb.ygomobile.ui.mycard.MycardFragment
;
import
cn.garymb.ygomobile.ui.plus.DialogPlus
;
import
cn.garymb.ygomobile.ui.plus.DialogPlus
;
import
cn.garymb.ygomobile.ui.preference.fragments.SettingFragment
;
import
cn.garymb.ygomobile.ui.settings.PersonalFragment
;
import
cn.garymb.ygomobile.ui.settings.fragments.SettingFragment
;
import
cn.garymb.ygomobile.utils.FileLogUtil
;
import
cn.garymb.ygomobile.utils.FileLogUtil
;
import
cn.garymb.ygomobile.utils.ScreenUtil
;
import
cn.garymb.ygomobile.utils.ScreenUtil
;
import
cn.garymb.ygomobile.utils.YGOUtil
;
import
cn.garymb.ygomobile.utils.YGOUtil
;
...
@@ -53,7 +54,7 @@ public abstract class HomeActivity extends BaseActivity implements OnDuelAssista
...
@@ -53,7 +54,7 @@ public abstract class HomeActivity extends BaseActivity implements OnDuelAssista
private
CardSearchFragment
fragment_search
;
private
CardSearchFragment
fragment_search
;
private
DeckManagerFragment
fragment_deck_cards
;
private
DeckManagerFragment
fragment_deck_cards
;
private
MycardFragment
fragment_mycard
;
private
MycardFragment
fragment_mycard
;
private
SettingFragment
fragment_settings
;
private
PersonalFragment
fragment_personal
;
private
DuelAssistantManagement
duelAssistantManagement
;
private
DuelAssistantManagement
duelAssistantManagement
;
...
@@ -100,11 +101,11 @@ public abstract class HomeActivity extends BaseActivity implements OnDuelAssista
...
@@ -100,11 +101,11 @@ public abstract class HomeActivity extends BaseActivity implements OnDuelAssista
// 获取页面上的底部导航栏控件
// 获取页面上的底部导航栏控件
bottomNavigationBar
=
(
BottomNavigationBar
)
findViewById
(
R
.
id
.
bottom_navigation_bar
);
bottomNavigationBar
=
(
BottomNavigationBar
)
findViewById
(
R
.
id
.
bottom_navigation_bar
);
bottomNavigationBar
bottomNavigationBar
.
addItem
(
new
BottomNavigationItem
(
R
.
drawable
.
ic_
home
,
R
.
string
.
mc_home
))
.
addItem
(
new
BottomNavigationItem
(
R
.
drawable
.
home
,
R
.
string
.
mc_home
))
.
addItem
(
new
BottomNavigationItem
(
R
.
drawable
.
searcher
,
R
.
string
.
search
))
.
addItem
(
new
BottomNavigationItem
(
R
.
drawable
.
searcher
,
R
.
string
.
search
))
.
addItem
(
new
BottomNavigationItem
(
R
.
drawable
.
ic_add
,
R
.
string
.
deck_manager
))
.
addItem
(
new
BottomNavigationItem
(
R
.
drawable
.
deck
,
R
.
string
.
deck_manager
))
.
addItem
(
new
BottomNavigationItem
(
R
.
drawable
.
mycard
,
R
.
string
.
mycard
))
.
addItem
(
new
BottomNavigationItem
(
R
.
drawable
.
mycard
,
R
.
string
.
mycard
))
.
addItem
(
new
BottomNavigationItem
(
R
.
drawable
.
ic_settings
,
R
.
string
.
settings
))
.
addItem
(
new
BottomNavigationItem
(
R
.
drawable
.
my
,
R
.
string
.
personal
))
.
setActiveColor
(
R
.
color
.
holo_blue_bright
)
.
setActiveColor
(
R
.
color
.
holo_blue_bright
)
.
setBarBackgroundColor
(
R
.
color
.
transparent
)
.
setBarBackgroundColor
(
R
.
color
.
transparent
)
.
setMode
(
BottomNavigationBar
.
MODE_FIXED
)
.
setMode
(
BottomNavigationBar
.
MODE_FIXED
)
...
@@ -127,7 +128,7 @@ public abstract class HomeActivity extends BaseActivity implements OnDuelAssista
...
@@ -127,7 +128,7 @@ public abstract class HomeActivity extends BaseActivity implements OnDuelAssista
switchFragment
(
fragment_mycard
);
switchFragment
(
fragment_mycard
);
break
;
break
;
case
4
:
case
4
:
switch
SettingFragment
(
);
switch
Fragment
(
fragment_personal
);
break
;
break
;
}
}
}
}
...
@@ -146,21 +147,15 @@ public abstract class HomeActivity extends BaseActivity implements OnDuelAssista
...
@@ -146,21 +147,15 @@ public abstract class HomeActivity extends BaseActivity implements OnDuelAssista
fragment_search
=
new
CardSearchFragment
();
fragment_search
=
new
CardSearchFragment
();
fragment_deck_cards
=
new
DeckManagerFragment
();
fragment_deck_cards
=
new
DeckManagerFragment
();
fragment_mycard
=
new
MycardFragment
();
fragment_mycard
=
new
MycardFragment
();
fragment_
settings
=
new
Setting
Fragment
();
fragment_
personal
=
new
Personal
Fragment
();
mFragment
=
fragment_home
;
mFragment
=
fragment_home
;
getSupportFragmentManager
().
beginTransaction
()
getSupportFragmentManager
().
beginTransaction
()
.
add
(
R
.
id
.
fragment_content
,
fragment_home
)
.
add
(
R
.
id
.
fragment_content
,
fragment_home
)
.
commit
();
.
commit
();
getFragmentManager
().
beginTransaction
()
.
add
(
R
.
id
.
fragment_content
,
fragment_settings
)
.
hide
(
fragment_settings
)
.
commit
();
getSupportActionBar
().
hide
();
getSupportActionBar
().
hide
();
}
}
private
void
switchFragment
(
Fragment
fragment
)
{
private
void
switchFragment
(
Fragment
fragment
)
{
if
(
fragment_settings
.
isVisible
())
getFragmentManager
().
beginTransaction
().
hide
(
fragment_settings
).
commit
();
if
(
mFragment
.
isHidden
())
if
(
mFragment
.
isHidden
())
getSupportFragmentManager
().
beginTransaction
().
show
(
mFragment
).
commit
();
getSupportFragmentManager
().
beginTransaction
().
show
(
mFragment
).
commit
();
//判断当前显示的Fragment是不是切换的Fragment
//判断当前显示的Fragment是不是切换的Fragment
...
@@ -178,12 +173,6 @@ public abstract class HomeActivity extends BaseActivity implements OnDuelAssista
...
@@ -178,12 +173,6 @@ public abstract class HomeActivity extends BaseActivity implements OnDuelAssista
}
}
}
}
private
void
switchSettingFragment
()
{
getSupportFragmentManager
().
beginTransaction
().
hide
(
mFragment
).
commit
();
getFragmentManager
().
beginTransaction
().
show
(
fragment_settings
).
commit
();
}
@Override
@Override
protected
void
onResume
()
{
protected
void
onResume
()
{
...
...
mobile/src/main/java/cn/garymb/ygomobile/ui/
preference
/BasePreferenceFragment.java
→
mobile/src/main/java/cn/garymb/ygomobile/ui/
settings
/BasePreferenceFragment.java
View file @
b84db6d5
package
cn.garymb.ygomobile.ui.
preference
;
package
cn.garymb.ygomobile.ui.
settings
;
import
android.content.Intent
;
import
android.content.Intent
;
import
android.content.SharedPreferences
;
import
android.content.SharedPreferences
;
...
...
mobile/src/main/java/cn/garymb/ygomobile/ui/settings/PersonalFragment.java
0 → 100644
View file @
b84db6d5
package
cn.garymb.ygomobile.ui.settings
;
import
android.os.Bundle
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
androidx.annotation.NonNull
;
import
androidx.annotation.Nullable
;
import
org.greenrobot.eventbus.EventBus
;
import
cn.garymb.ygomobile.base.BaseFragemnt
;
import
cn.garymb.ygomobile.lite.R
;
public
class
PersonalFragment
extends
BaseFragemnt
implements
View
.
OnClickListener
{
@Nullable
@Override
public
View
onCreateView
(
@NonNull
LayoutInflater
inflater
,
@Nullable
ViewGroup
container
,
@Nullable
Bundle
savedInstanceState
)
{
super
.
onCreateView
(
inflater
,
container
,
savedInstanceState
);
View
layoutView
;
if
(
isHorizontal
)
layoutView
=
inflater
.
inflate
(
R
.
layout
.
main_horizontal_fragment
,
container
,
false
);
else
layoutView
=
inflater
.
inflate
(
R
.
layout
.
fragment_personal
,
container
,
false
);
//initView(layoutView);
//event
return
layoutView
;
}
@Override
public
void
onClick
(
View
view
)
{
}
/**
* 第一次fragment可见(进行初始化工作)
*/
@Override
public
void
onFirstUserVisible
()
{
}
/**
* fragment可见(切换回来或者onResume)
*/
@Override
public
void
onUserVisible
()
{
}
/**
* 第一次fragment不可见(不建议在此处理事件)
*/
@Override
public
void
onFirstUserInvisible
()
{
}
/**
* fragment不可见(切换掉或者onPause)
*/
@Override
public
void
onUserInvisible
()
{
}
@Override
public
void
onBackHome
()
{
}
@Override
public
void
onBackPressed
()
{
}
}
mobile/src/main/java/cn/garymb/ygomobile/ui/
preference
/PreferenceFragmentPlus.java
→
mobile/src/main/java/cn/garymb/ygomobile/ui/
settings
/PreferenceFragmentPlus.java
View file @
b84db6d5
package
cn.garymb.ygomobile.ui.
preference
;
package
cn.garymb.ygomobile.ui.
settings
;
import
static
cn
.
garymb
.
ygomobile
.
Constants
.
REQUEST_CHOOSE_FILE
;
import
static
cn
.
garymb
.
ygomobile
.
Constants
.
REQUEST_CHOOSE_FILE
;
import
static
cn
.
garymb
.
ygomobile
.
Constants
.
REQUEST_CHOOSE_FOLDER
;
import
static
cn
.
garymb
.
ygomobile
.
Constants
.
REQUEST_CHOOSE_FOLDER
;
...
...
mobile/src/main/java/cn/garymb/ygomobile/ui/
preference
/SettingsActivity.java
→
mobile/src/main/java/cn/garymb/ygomobile/ui/
settings
/SettingsActivity.java
View file @
b84db6d5
package
cn.garymb.ygomobile.ui.
preference
;
package
cn.garymb.ygomobile.ui.
settings
;
import
android.os.Bundle
;
import
android.os.Bundle
;
...
@@ -6,7 +6,7 @@ import androidx.annotation.Nullable;
...
@@ -6,7 +6,7 @@ import androidx.annotation.Nullable;
import
cn.garymb.ygomobile.lite.R
;
import
cn.garymb.ygomobile.lite.R
;
import
cn.garymb.ygomobile.ui.activities.BaseActivity
;
import
cn.garymb.ygomobile.ui.activities.BaseActivity
;
import
cn.garymb.ygomobile.ui.
preference
.fragments.SettingFragment
;
import
cn.garymb.ygomobile.ui.
settings
.fragments.SettingFragment
;
public
class
SettingsActivity
extends
BaseActivity
{
public
class
SettingsActivity
extends
BaseActivity
{
@Override
@Override
...
...
mobile/src/main/java/cn/garymb/ygomobile/ui/
preference
/YGOPreferencesProvider.java
→
mobile/src/main/java/cn/garymb/ygomobile/ui/
settings
/YGOPreferencesProvider.java
View file @
b84db6d5
package
cn.garymb.ygomobile.ui.
preference
;
package
cn.garymb.ygomobile.ui.
settings
;
import
com.zlm.libs.preferences.PreferencesProvider
;
import
com.zlm.libs.preferences.PreferencesProvider
;
...
...
mobile/src/main/java/cn/garymb/ygomobile/ui/
preference
/fragments/SettingFragment.java
→
mobile/src/main/java/cn/garymb/ygomobile/ui/
settings
/fragments/SettingFragment.java
View file @
b84db6d5
package
cn.garymb.ygomobile.ui.
preference
.fragments
;
package
cn.garymb.ygomobile.ui.
settings
.fragments
;
import
static
cn
.
garymb
.
ygomobile
.
Constants
.
ACTION_RELOAD
;
import
static
cn
.
garymb
.
ygomobile
.
Constants
.
ACTION_RELOAD
;
import
static
cn
.
garymb
.
ygomobile
.
Constants
.
CORE_SKIN_AVATAR_SIZE
;
import
static
cn
.
garymb
.
ygomobile
.
Constants
.
CORE_SKIN_AVATAR_SIZE
;
...
@@ -72,7 +72,7 @@ import cn.garymb.ygomobile.ui.adapters.SimpleListAdapter;
...
@@ -72,7 +72,7 @@ import cn.garymb.ygomobile.ui.adapters.SimpleListAdapter;
import
cn.garymb.ygomobile.ui.home.MainActivity
;
import
cn.garymb.ygomobile.ui.home.MainActivity
;
import
cn.garymb.ygomobile.ui.plus.DialogPlus
;
import
cn.garymb.ygomobile.ui.plus.DialogPlus
;
import
cn.garymb.ygomobile.ui.plus.VUiKit
;
import
cn.garymb.ygomobile.ui.plus.VUiKit
;
import
cn.garymb.ygomobile.ui.
preference
.PreferenceFragmentPlus
;
import
cn.garymb.ygomobile.ui.
settings
.PreferenceFragmentPlus
;
import
cn.garymb.ygomobile.utils.FileUtils
;
import
cn.garymb.ygomobile.utils.FileUtils
;
import
cn.garymb.ygomobile.utils.IOUtils
;
import
cn.garymb.ygomobile.utils.IOUtils
;
import
cn.garymb.ygomobile.utils.SystemUtils
;
import
cn.garymb.ygomobile.utils.SystemUtils
;
...
...
mobile/src/main/res/drawable-xhdpi/add
sever
.png
→
mobile/src/main/res/drawable-xhdpi/add.png
View file @
b84db6d5
File moved
mobile/src/main/res/drawable-xhdpi/avatar.jpg
deleted
100644 → 0
View file @
d4e1efcd
5.79 KB
mobile/src/main/res/drawable-xhdpi/avatar.png
0 → 100644
View file @
b84db6d5
12.3 KB
mobile/src/main/res/drawable-xhdpi/deck.png
View replaced file @
d4e1efcd
View file @
b84db6d5
9.09 KB
|
W:
|
H:
25.5 KB
|
W:
|
H:
2-up
Swipe
Onion skin
mobile/src/main/res/drawable-xhdpi/home.png
0 → 100644
View file @
b84db6d5
35.4 KB
mobile/src/main/res/drawable-xhdpi/my.png
0 → 100644
View file @
b84db6d5
17 KB
mobile/src/main/res/drawable/click_background_radius.xml
0 → 100644
View file @
b84db6d5
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:state_pressed=
"true"
>
<shape>
<solid
android:color=
"@color/holo_orange_bright"
/>
<corners
android:radius=
"6dp"
/>
</shape>
</item>
<item>
<shape>
<solid
android:color=
"@color/white"
/>
<corners
android:radius=
"6dp"
/>
</shape>
</item>
</selector>
mobile/src/main/res/layout/activity_settings.xml
View file @
b84db6d5
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
android:background=
"#80000000"
android:background=
"#80000000"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<fragment
android:name=
"cn.garymb.ygomobile.ui.
preference
.fragments.SettingFragment"
<fragment
android:name=
"cn.garymb.ygomobile.ui.
settings
.fragments.SettingFragment"
android:id=
"@+id/fragment"
android:id=
"@+id/fragment"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
android:layout_height=
"match_parent"
/>
...
...
mobile/src/main/res/layout/fragment_personal.xml
0 → 100644
View file @
b84db6d5
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginBottom=
"60dp"
android:orientation=
"vertical"
>
<RelativeLayout
android:id=
"@+id/rl_user"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_margin=
"5dp"
android:background=
"@drawable/dialogshort"
>
<de.hdodenhof.circleimageview.CircleImageView
android:id=
"@+id/iv_avatar"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"20dp"
android:layout_marginTop=
"5dp"
android:layout_marginBottom=
"5dp"
android:scaleType=
"centerCrop"
android:src=
"@drawable/avatar"
app:civ_border_color=
"@color/gray"
app:civ_border_width=
"1dp"
/>
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/tv_name"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"15dp"
android:layout_toRightOf=
"@id/iv_avatar"
android:text=
"@string/login_mycard"
android:textColor=
"@color/holo_blue_bright"
/>
<androidx.appcompat.widget.AppCompatImageView
android:id=
"@+id/iv_guide_right"
android:layout_width=
"22dp"
android:layout_height=
"22dp"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:layout_marginRight=
"15dp"
android:src=
"@drawable/p_right"
/>
</RelativeLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginLeft=
"5dp"
android:layout_marginTop=
"5dp"
android:layout_marginRight=
"5dp"
android:background=
"@drawable/dialogshort"
android:orientation=
"vertical"
android:weightSum=
"5"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
android:layout_margin=
"10dp"
android:layout_weight=
"1"
android:background=
"@drawable/list_item_bg"
android:orientation=
"horizontal"
>
<ImageView
android:layout_width=
"60dp"
android:layout_height=
"60dp"
android:layout_gravity=
"center"
android:layout_marginLeft=
"20dp"
android:src=
"@drawable/listicon"
/>
<LinearLayout
android:id=
"@+id/btn_log"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:gravity=
"center"
android:orientation=
"vertical"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center|left"
android:layout_marginLeft=
"20dp"
android:text=
"@string/settings_about_change_log"
android:textColor=
"@color/brightgreen"
android:textStyle=
"bold"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:gravity=
"center|left"
android:orientation=
"horizontal"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center|left"
android:layout_marginLeft=
"20dp"
android:text=
"@string/settings_about_author_pref"
android:textColor=
"@color/brightgreen"
android:textSize=
"10sp"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center|left"
android:layout_marginLeft=
"5dp"
android:text=
"@string/settings_author"
android:textColor=
"@color/holo_green_bright"
android:textSize=
"10sp"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id=
"@+id/btn_qq_group"
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
android:layout_margin=
"10dp"
android:layout_weight=
"1"
android:background=
"@drawable/list_item_bg"
android:orientation=
"horizontal"
>
<ImageView
android:layout_width=
"60dp"
android:layout_height=
"60dp"
android:layout_gravity=
"center"
android:layout_marginLeft=
"20dp"
android:src=
"@drawable/joinqqgroup"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:layout_marginLeft=
"20dp"
android:text=
"@string/Join_QQ"
android:textColor=
"@color/brightgreen"
android:textStyle=
"bold"
/>
</LinearLayout>
<LinearLayout
android:id=
"@+id/btn_settings"
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
android:layout_margin=
"10dp"
android:layout_weight=
"1"
android:background=
"@drawable/list_item_bg"
android:orientation=
"horizontal"
>
<ImageView
android:layout_width=
"60dp"
android:layout_height=
"60dp"
android:layout_gravity=
"center"
android:layout_marginLeft=
"20dp"
android:src=
"@drawable/setting"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:layout_marginLeft=
"20dp"
android:text=
"@string/settings_game"
android:textColor=
"@color/brightgreen"
android:textStyle=
"bold"
/>
</LinearLayout>
<LinearLayout
android:id=
"@+id/btn_reset"
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
android:layout_margin=
"10dp"
android:layout_weight=
"1"
android:background=
"@drawable/list_item_bg"
android:orientation=
"horizontal"
>
<ImageView
android:layout_width=
"60dp"
android:layout_height=
"60dp"
android:layout_gravity=
"center"
android:layout_marginLeft=
"20dp"
android:src=
"@drawable/reset"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:layout_marginLeft=
"20dp"
android:text=
"@string/reset_game_res"
android:textColor=
"@color/brightgreen"
android:textStyle=
"bold"
/>
</LinearLayout>
<LinearLayout
android:id=
"@+id/btn_upgrade"
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
android:layout_margin=
"10dp"
android:layout_weight=
"1"
android:background=
"@drawable/list_item_bg"
android:orientation=
"horizontal"
>
<ImageView
android:layout_width=
"60dp"
android:layout_height=
"60dp"
android:layout_gravity=
"center"
android:layout_marginLeft=
"20dp"
android:src=
"@drawable/downloadimages"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:layout_marginLeft=
"20dp"
android:text=
"@string/settings_about_check_update"
android:textColor=
"@color/brightgreen"
android:textStyle=
"bold"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
mobile/src/main/res/values-ko/strings.xml
View file @
b84db6d5
...
@@ -324,4 +324,6 @@
...
@@ -324,4 +324,6 @@
<string
name=
"action_download_expansions"
>
다운로드 삭제
</string>
<string
name=
"action_download_expansions"
>
다운로드 삭제
</string>
<string
name=
"bot_mode"
>
AI 모드
</string>
<string
name=
"bot_mode"
>
AI 모드
</string>
<string
name=
"replay"
>
리플레이 보기
</string>
<string
name=
"replay"
>
리플레이 보기
</string>
<string
name=
"personal"
>
나의
</string>
<string
name=
"login_mycard"
>
로그인
</string>
</resources>
</resources>
mobile/src/main/res/values-zh/strings.xml
View file @
b84db6d5
...
@@ -202,6 +202,7 @@
...
@@ -202,6 +202,7 @@
<string
name=
"mc_chat"
>
聊天室
</string>
<string
name=
"mc_chat"
>
聊天室
</string>
<string
name=
"noting_to_send"
>
发送内容不能为空
</string>
<string
name=
"noting_to_send"
>
发送内容不能为空
</string>
<string
name=
"sending_failed"
>
发送失败
</string>
<string
name=
"sending_failed"
>
发送失败
</string>
<string
name=
"login_mycard"
>
登录萌卡
</string>
<string
name=
"logining_in"
>
登录中,请稍候...
</string>
<string
name=
"logining_in"
>
登录中,请稍候...
</string>
<string
name=
"logining_failed"
>
登陆失败,请点击重试
</string>
<string
name=
"logining_failed"
>
登陆失败,请点击重试
</string>
<string
name=
"failed_reason"
>
登录失败,原因是
</string>
<string
name=
"failed_reason"
>
登录失败,原因是
</string>
...
@@ -324,4 +325,5 @@
...
@@ -324,4 +325,5 @@
<string
name=
"tip_load_cdb_error"
>
加载数据出错
</string>
<string
name=
"tip_load_cdb_error"
>
加载数据出错
</string>
<string
name=
"replay"
>
查看录像
</string>
<string
name=
"replay"
>
查看录像
</string>
<string
name=
"bot_mode"
>
人机练习
</string>
<string
name=
"bot_mode"
>
人机练习
</string>
<string
name=
"personal"
>
我的
</string>
</resources>
</resources>
mobile/src/main/res/values/strings.xml
View file @
b84db6d5
...
@@ -334,4 +334,6 @@
...
@@ -334,4 +334,6 @@
<string
name=
"action_download_expansions"
>
download\\nexpansions
</string>
<string
name=
"action_download_expansions"
>
download\\nexpansions
</string>
<string
name=
"replay"
>
Watch replay
</string>
<string
name=
"replay"
>
Watch replay
</string>
<string
name=
"bot_mode"
>
Bot game
</string>
<string
name=
"bot_mode"
>
Bot game
</string>
<string
name=
"personal"
>
My
</string>
<string
name=
"login_mycard"
>
login
</string>
</resources>
</resources>
mobile/src/main/res/xml/preference_game.xml
View file @
b84db6d5
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<PreferenceScreen
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<PreferenceCategory
android:title=
"@string/settings_about"
>
<Preference
android:key=
"pref_key_about_check_update"
android:persistent=
"true"
android:title=
"@string/settings_about_check_update"
/>
<Preference
android:key=
"pref_key_change_log"
android:title=
"@string/settings_about_change_log"
/>
</PreferenceCategory>
<PreferenceCategory
android:title=
"@string/settings_game"
>
<PreferenceCategory
android:title=
"@string/settings_game"
>
<!--Preference
<!--Preference
...
...
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