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
a4387131
Commit
a4387131
authored
Aug 10, 2022
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
只使用textbadge
parent
66cb179c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
10 deletions
+13
-10
mobile/src/main/java/cn/garymb/ygomobile/ui/home/HomeActivity.java
...c/main/java/cn/garymb/ygomobile/ui/home/HomeActivity.java
+11
-8
mobile/src/main/res/layout/fragment_mycard.xml
mobile/src/main/res/layout/fragment_mycard.xml
+1
-1
mobile/src/main/res/values/styles.xml
mobile/src/main/res/values/styles.xml
+1
-1
No files found.
mobile/src/main/java/cn/garymb/ygomobile/ui/home/HomeActivity.java
View file @
a4387131
...
@@ -98,14 +98,6 @@ public abstract class HomeActivity extends BaseActivity implements BottomNavigat
...
@@ -98,14 +98,6 @@ public abstract class HomeActivity extends BaseActivity implements BottomNavigat
private
void
initBottomNavigationBar
()
{
private
void
initBottomNavigationBar
()
{
frameLayout
=
(
FrameLayout
)
findViewById
(
R
.
id
.
fragment_content
);
frameLayout
=
(
FrameLayout
)
findViewById
(
R
.
id
.
fragment_content
);
mTextBadgeItem
=
new
TextBadgeItem
()
.
setBorderWidth
(
4
)
//文本大小
.
setGravity
(
Gravity
.
LEFT
)
//位置 默认右上
.
setBackgroundColorResource
(
R
.
color
.
holo_orange_bright
)
//背景颜色
.
setAnimationDuration
(
200
)
//动画时间
.
setText
(
"3"
)
.
setHideOnSelect
(
false
)
//true当选中状态时消失,非选中状态再次显示
.
show
();
// 获取页面上的底部导航栏控件
// 获取页面上的底部导航栏控件
bottomNavigationBar
=
(
BottomNavigationBar
)
findViewById
(
R
.
id
.
bottom_navigation_bar
);
bottomNavigationBar
=
(
BottomNavigationBar
)
findViewById
(
R
.
id
.
bottom_navigation_bar
);
bottomNavigationBar
bottomNavigationBar
...
@@ -134,6 +126,17 @@ public abstract class HomeActivity extends BaseActivity implements BottomNavigat
...
@@ -134,6 +126,17 @@ public abstract class HomeActivity extends BaseActivity implements BottomNavigat
getSupportActionBar
().
hide
();
getSupportActionBar
().
hide
();
}
}
private
void
showNewsCounts
()
{
mTextBadgeItem
=
new
TextBadgeItem
()
.
setBorderWidth
(
4
)
//文本大小
.
setGravity
(
Gravity
.
LEFT
)
//位置 默认右上
.
setBackgroundColorResource
(
R
.
color
.
holo_orange_bright
)
//背景颜色
.
setAnimationDuration
(
200
)
//动画时间
.
setText
(
"3"
)
.
setHideOnSelect
(
false
)
//true当选中状态时消失,非选中状态再次显示
.
show
();
}
@Override
@Override
public
void
onTabSelected
(
int
position
)
{
public
void
onTabSelected
(
int
position
)
{
switch
(
position
)
{
switch
(
position
)
{
...
...
mobile/src/main/res/layout/fragment_mycard.xml
View file @
a4387131
...
@@ -60,7 +60,7 @@
...
@@ -60,7 +60,7 @@
<androidx.appcompat.widget.AppCompatImageView
<androidx.appcompat.widget.AppCompatImageView
android:id=
"@+id/img_logout"
android:id=
"@+id/img_logout"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"
40dp
"
android:layout_height=
"
match_parent
"
android:src=
"@drawable/ic_guide_right"
/>
android:src=
"@drawable/ic_guide_right"
/>
</LinearLayout>
</LinearLayout>
...
...
mobile/src/main/res/values/styles.xml
View file @
a4387131
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
<style
name=
"AppTheme"
parent=
"AppBaseTheme"
>
<style
name=
"AppTheme"
parent=
"AppBaseTheme"
>
<item
name=
"colorPrimary"
>
@color/colorPrimary
</item>
<item
name=
"colorPrimary"
>
@color/colorPrimary
</item>
<item
name=
"colorPrimaryDark"
>
@color/color
PrimaryDark
</item>
<item
name=
"colorPrimaryDark"
>
@color/color
Navy
</item>
<item
name=
"colorAccent"
>
@color/colorAccent
</item>
<item
name=
"colorAccent"
>
@color/colorAccent
</item>
<item
name=
"android:windowActionBar"
>
false
</item>
<item
name=
"android:windowActionBar"
>
false
</item>
<item
name=
"android:windowNoTitle"
>
true
</item>
<item
name=
"android:windowNoTitle"
>
true
</item>
...
...
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