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
1b20a7be
Commit
1b20a7be
authored
May 19, 2025
by
wangfugui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除DeckSquareActivity
parent
a6273141
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
144 deletions
+1
-144
mobile/src/main/AndroidManifest.xml
mobile/src/main/AndroidManifest.xml
+1
-9
mobile/src/main/java/cn/garymb/ygomobile/deck_square/DeckSquareActivity.java
...a/cn/garymb/ygomobile/deck_square/DeckSquareActivity.java
+0
-78
mobile/src/main/java/cn/garymb/ygomobile/deck_square/DeckSquareTabAdapter.java
...cn/garymb/ygomobile/deck_square/DeckSquareTabAdapter.java
+0
-57
No files found.
mobile/src/main/AndroidManifest.xml
View file @
1b20a7be
...
...
@@ -161,15 +161,7 @@
android:name=
"cn.garymb.ygomobile.ex_card.ExCardActivity"
android:launchMode=
"singleTop"
android:theme=
"@style/AppTheme.Mycard"
/>
<activity
android:name=
"cn.garymb.ygomobile.deck_square.DeckSquareActivity"
android:launchMode=
"singleTop"
android:theme=
"@style/AppTheme.Mycard"
>
<!-- <intent-filter>-->
<!-- <action android:name="android.intent.action.MAIN" />-->
<!-- <category android:name="android.intent.category.LAUNCHER" />-->
<!-- </intent-filter>-->
</activity>
<service
android:name=
"com.tencent.smtt.export.external.DexClassLoaderProviderService"
...
...
mobile/src/main/java/cn/garymb/ygomobile/deck_square/DeckSquareActivity.java
deleted
100644 → 0
View file @
a6273141
package
cn.garymb.ygomobile.deck_square
;
import
android.os.Bundle
;
import
android.view.View
;
import
androidx.navigation.ui.AppBarConfiguration
;
import
cn.garymb.ygomobile.deck_square.api_response.LoginResponse
;
import
cn.garymb.ygomobile.lite.databinding.ActivityDeckSquareBinding
;
import
cn.garymb.ygomobile.ui.activities.BaseActivity
;
import
cn.garymb.ygomobile.utils.LogUtil
;
import
cn.garymb.ygomobile.utils.SharedPreferenceUtil
;
public
class
DeckSquareActivity
extends
BaseActivity
{
private
AppBarConfiguration
appBarConfiguration
;
private
ActivityDeckSquareBinding
binding
;
private
static
final
String
TAG
=
DeckSquareListAdapter
.
class
.
getSimpleName
();
private
DeckSquareTabAdapter
adapter
;
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
binding
=
ActivityDeckSquareBinding
.
inflate
(
getLayoutInflater
());
setContentView
(
binding
.
getRoot
());
setSupportActionBar
(
binding
.
toolbar
);
binding
.
loginBtn
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
view
)
{
// In your Activity or Fragment
LoginDialog
loginDialog
=
new
LoginDialog
(
getContext
(),
new
LoginDialog
.
LoginListener
()
{
@Override
public
void
notifyResult
(
boolean
success
,
LoginResponse
response
)
{
// Handle login logic
if
(
success
)
{
LogUtil
.
i
(
TAG
,
"login success"
+
SharedPreferenceUtil
.
getServerToken
());
//response.token;
}
}
});
loginDialog
.
show
();
// Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
// .setAnchorView(R.id.login_btn)
// .setAction("Action", null).show();
}
});
createTabFragment
();
}
@Override
public
boolean
onSupportNavigateUp
()
{
onBackPressed
();
return
true
;
}
@Override
protected
void
onDestroy
()
{
super
.
onDestroy
();
LogUtil
.
i
(
TAG
,
"deck square activity destroy"
);
}
private
void
createTabFragment
()
{
adapter
=
new
DeckSquareTabAdapter
(
getSupportFragmentManager
(),
binding
.
packagetablayout
,
getContext
());
binding
.
viewPager
.
setAdapter
(
adapter
);
/* setupWithViewPager() is used to link the TabLayout to the ViewPager */
binding
.
packagetablayout
.
setupWithViewPager
(
binding
.
viewPager
);
}
}
\ No newline at end of file
mobile/src/main/java/cn/garymb/ygomobile/deck_square/DeckSquareTabAdapter.java
deleted
100644 → 0
View file @
a6273141
package
cn.garymb.ygomobile.deck_square
;
import
android.content.Context
;
import
androidx.fragment.app.Fragment
;
import
androidx.fragment.app.FragmentManager
;
import
androidx.fragment.app.FragmentStatePagerAdapter
;
import
com.google.android.material.tabs.TabLayout
;
import
cn.garymb.ygomobile.lite.R
;
//管理tab
public
class
DeckSquareTabAdapter
extends
FragmentStatePagerAdapter
{
TabLayout
tabLayout
;
/* 仅用于获取strings.xml中的字符串。It's used just for getting strings from strings.xml */
Context
context
;
public
DeckSquareTabAdapter
(
FragmentManager
fm
,
TabLayout
_tabLayout
,
Context
context
)
{
super
(
fm
);
this
.
tabLayout
=
_tabLayout
;
this
.
context
=
context
;
}
@Override
public
Fragment
getItem
(
int
position
)
{
Fragment
fragment
=
null
;
if
(
position
==
0
)
{
fragment
=
new
DeckSquareFragment
();
}
else
if
(
position
==
1
)
{
fragment
=
new
DeckSquareMyDeckFragment
();
}
else
if
(
position
==
2
)
{
fragment
=
new
MCOnlineManageFragment
();
}
return
fragment
;
}
@Override
public
int
getCount
()
{
return
3
;
}
@Override
public
CharSequence
getPageTitle
(
int
position
)
{
String
title
=
null
;
if
(
position
==
0
)
{
title
=
context
.
getString
(
R
.
string
.
ex_card_list_title
);
}
else
if
(
position
==
1
)
{
title
=
"我的卡组"
;
}
else
if
(
position
==
2
)
{
title
=
"我的登录"
;
}
return
title
;
}
}
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