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
66ec3716
Commit
66ec3716
authored
Sep 16, 2022
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
横屏homefragment
parent
97052ba2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
474 additions
and
2 deletions
+474
-2
mobile/src/main/java/cn/garymb/ygomobile/ui/home/HomeFragment.java
...c/main/java/cn/garymb/ygomobile/ui/home/HomeFragment.java
+4
-2
mobile/src/main/res/layout/fragment_home_horizontal.xml
mobile/src/main/res/layout/fragment_home_horizontal.xml
+470
-0
No files found.
mobile/src/main/java/cn/garymb/ygomobile/ui/home/HomeFragment.java
View file @
66ec3716
...
...
@@ -78,7 +78,6 @@ import cn.garymb.ygomobile.utils.FileLogUtil;
import
cn.garymb.ygomobile.utils.OkhttpUtil
;
import
cn.garymb.ygomobile.utils.SharedPreferenceUtil
;
import
cn.garymb.ygomobile.utils.YGOUtil
;
import
cn.garymb.ygomobile.widget.overlay.OverlayView
;
import
ocgcore.CardManager
;
import
ocgcore.DataManager
;
import
ocgcore.data.Card
;
...
...
@@ -132,7 +131,10 @@ public class HomeFragment extends BaseFragemnt implements OnDuelAssistantListene
@Override
public
View
onCreateView
(
@NonNull
LayoutInflater
inflater
,
@Nullable
ViewGroup
container
,
@Nullable
Bundle
savedInstanceState
)
{
super
.
onCreateView
(
inflater
,
container
,
savedInstanceState
);
layoutView
=
inflater
.
inflate
(
R
.
layout
.
fragment_home
,
container
,
false
);
if
(
isHorizontal
)
layoutView
=
inflater
.
inflate
(
R
.
layout
.
fragment_home_horizontal
,
container
,
false
);
else
layoutView
=
inflater
.
inflate
(
R
.
layout
.
fragment_home
,
container
,
false
);
initView
(
layoutView
);
initBanner
(
layoutView
,
savedInstanceState
);
//初始化决斗助手
...
...
mobile/src/main/res/layout/fragment_home_horizontal.xml
0 → 100644
View file @
66ec3716
<?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:id=
"@+id/fragment_home"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"horizontal"
android:weightSum=
"5"
>
<LinearLayout
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_margin=
"5dp"
android:layout_weight=
"2"
android:background=
"@drawable/dialogshort"
android:orientation=
"vertical"
>
<androidx.appcompat.widget.AppCompatTextView
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@drawable/veil2"
android:gravity=
"center"
android:text=
"@string/server_list"
android:textSize=
"10sp"
>
</androidx.appcompat.widget.AppCompatTextView>
<FrameLayout
android:id=
"@+id/serverlist"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
<com.tubb.smrv.SwipeMenuRecyclerView
android:id=
"@+id/list_server"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:scrollbars=
"none"
/>
<RelativeLayout
android:id=
"@+id/return_to_duel"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@drawable/window3"
android:orientation=
"vertical"
>
<ImageView
android:id=
"@+id/logo_small"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:src=
"@drawable/ic_launcher3"
/>
<cn.garymb.ygomobile.ui.widget.ShimmerTextView
android:id=
"@+id/shimmer_tv"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_alignParentLeft=
"true"
android:layout_marginStart=
"-263dp"
android:layout_marginLeft=
"1dp"
android:layout_toEndOf=
"@id/logo_small"
android:gravity=
"center"
android:text=
"@string/return_to_duel"
android:textColor=
"@color/item_title"
/>
</RelativeLayout>
</FrameLayout>
</LinearLayout>
<LinearLayout
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"3"
android:orientation=
"vertical"
android:weightSum=
"5"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
android:layout_margin=
"5dp"
android:layout_weight=
"2"
android:background=
"@drawable/dialogshort"
android:orientation=
"vertical"
>
<androidx.appcompat.widget.AppCompatTextView
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@drawable/veil2"
android:gravity=
"center"
android:text=
"@string/McNews"
android:textSize=
"10sp"
/>
<androidx.cardview.widget.CardView
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:id=
"@+id/cv_banner"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_margin=
"5dp"
android:clickable=
"true"
android:foreground=
"?android:attr/selectableItemBackground"
android:orientation=
"vertical"
app:cardBackgroundColor=
"@color/transparent"
app:cardCornerRadius=
"5dp"
app:cardElevation=
"0dp"
app:cardUseCompatPadding=
"false"
app:elevation=
"0dp"
>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<com.stx.xhb.androidx.XBanner
android:id=
"@+id/xb_banner"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
app:AutoPlayTime=
"4500"
app:clipChildrenTopBottomMargin=
"5dp"
app:isHandLoop=
"true"
app:pageChangeDuration=
"800"
app:pointsPosition=
"RIGHT"
app:pointsVisibility=
"true"
app:tipTextSize=
"12sp"
/>
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/tv_banner_loading"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:gravity=
"center"
android:text=
"@string/loading_failed"
android:textSize=
"15sp"
/>
</RelativeLayout>
</androidx.cardview.widget.CardView>
</LinearLayout>
<LinearLayout
android:id=
"@+id/bottombar"
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
android:layout_gravity=
"right"
android:layout_weight=
"3"
android:orientation=
"horizontal"
android:weightSum=
"3"
>
<LinearLayout
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_gravity=
"bottom"
android:layout_margin=
"5dp"
android:layout_weight=
"2"
android:background=
"@drawable/dialogshort"
android:orientation=
"vertical"
android:weightSum=
"2"
>
<androidx.appcompat.widget.AppCompatTextView
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@drawable/veil2"
android:gravity=
"center"
android:text=
"@string/action_game"
android:textSize=
"10sp"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
android:layout_weight=
"1"
android:orientation=
"horizontal"
android:weightSum=
"2"
>
<androidx.cardview.widget.CardView
android:id=
"@+id/action_game"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_margin=
"5dp"
android:layout_weight=
"1"
android:clickable=
"true"
android:foreground=
"?android:attr/selectableItemBackground"
android:orientation=
"vertical"
app:cardBackgroundColor=
"@color/transparent"
app:cardElevation=
"0dp"
app:cardUseCompatPadding=
"false"
app:elevation=
"0dp"
>
<RelativeLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
>
<ImageView
android:layout_width=
"300dp"
android:layout_height=
"300dp"
android:layout_marginLeft=
"30dp"
android:layout_marginTop=
"30dp"
android:layout_marginRight=
"-30dp"
android:layout_marginBottom=
"-30dp"
android:scaleType=
"fitEnd"
android:src=
"@drawable/start"
/>
<TextView
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@drawable/dialogcube"
android:paddingLeft=
"13dp"
android:paddingTop=
"13dp"
android:text=
"YGOPro"
android:textColor=
"@color/brightgreen"
android:textSize=
"@dimen/dp_40"
android:textStyle=
"bold"
/>
</RelativeLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:id=
"@+id/action_bot"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_margin=
"5dp"
android:layout_weight=
"1"
android:clickable=
"true"
android:foreground=
"?android:attr/selectableItemBackground"
android:orientation=
"vertical"
app:cardBackgroundColor=
"@color/transparent"
app:cardElevation=
"0dp"
app:cardUseCompatPadding=
"false"
app:elevation=
"0dp"
>
<RelativeLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
>
<ImageView
android:layout_width=
"300dp"
android:layout_height=
"300dp"
android:layout_marginLeft=
"30dp"
android:layout_marginTop=
"30dp"
android:layout_marginRight=
"-30dp"
android:layout_marginBottom=
"-30dp"
android:scaleType=
"fitEnd"
android:src=
"@drawable/bot"
/>
<TextView
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@drawable/dialogcube"
android:paddingLeft=
"13dp"
android:paddingTop=
"13dp"
android:text=
"@string/bot_mode"
android:textColor=
"@color/brightgreen"
android:textSize=
"30dp"
android:textStyle=
"bold"
/>
</RelativeLayout>
</androidx.cardview.widget.CardView>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
android:layout_weight=
"1"
android:orientation=
"horizontal"
android:weightSum=
"2"
>
<androidx.cardview.widget.CardView
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:id=
"@+id/action_replay"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_margin=
"5dp"
android:layout_weight=
"1"
android:clickable=
"true"
android:foreground=
"?android:attr/selectableItemBackground"
android:orientation=
"vertical"
app:cardBackgroundColor=
"@color/transparent"
app:cardElevation=
"0dp"
app:cardUseCompatPadding=
"false"
app:elevation=
"0dp"
>
<RelativeLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
>
<ImageView
android:layout_width=
"300dp"
android:layout_height=
"300dp"
android:layout_marginLeft=
"30dp"
android:layout_marginTop=
"30dp"
android:layout_marginRight=
"-30dp"
android:layout_marginBottom=
"-30dp"
android:scaleType=
"fitEnd"
android:src=
"@drawable/replay"
/>
<TextView
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@drawable/dialogcube"
android:paddingLeft=
"13dp"
android:paddingTop=
"13dp"
android:text=
"@string/replay"
android:textColor=
"@color/brightgreen"
android:textSize=
"30dp"
android:textStyle=
"bold"
/>
</RelativeLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:id=
"@+id/action_download_ex"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_margin=
"5dp"
android:layout_weight=
"1"
android:clickable=
"true"
android:foreground=
"?android:attr/selectableItemBackground"
android:orientation=
"vertical"
app:cardBackgroundColor=
"@color/transparent"
app:cardElevation=
"0dp"
app:cardUseCompatPadding=
"false"
app:elevation=
"0dp"
>
<RelativeLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
>
<ImageView
android:layout_width=
"300dp"
android:layout_height=
"300dp"
android:layout_marginLeft=
"30dp"
android:layout_marginTop=
"30dp"
android:layout_marginRight=
"-30dp"
android:layout_marginBottom=
"-30dp"
android:scaleType=
"fitEnd"
android:src=
"@drawable/downloadimages"
/>
<TextView
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@drawable/dialogcube"
android:paddingLeft=
"13dp"
android:paddingTop=
"13dp"
android:text=
"@string/action_download_expansions"
android:textColor=
"@color/brightgreen"
android:textSize=
"30dp"
android:textStyle=
"bold"
/>
</RelativeLayout>
<androidx.appcompat.widget.LinearLayoutCompat
android:id=
"@+id/ll_new_notice"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"right|bottom"
android:orientation=
"horizontal"
android:visibility=
"gone"
>
<cn.garymb.ygomobile.ui.widget.ShimmerTextView
android:id=
"@+id/shimmer_tv2"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:text=
"NEW!"
android:textColor=
"@color/holo_orange_bright"
android:textSize=
"15sp"
android:textStyle=
"bold|italic"
/>
<ImageView
android:layout_width=
"20dp"
android:layout_height=
"20dp"
android:layout_gravity=
"center"
android:src=
"@drawable/ic_expansions"
/>
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.cardview.widget.CardView>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_gravity=
"bottom"
android:layout_margin=
"5dp"
android:layout_weight=
"1"
android:background=
"@drawable/dialogshort"
android:orientation=
"vertical"
android:weightSum=
"2"
>
<androidx.appcompat.widget.AppCompatTextView
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@drawable/veil2"
android:gravity=
"center"
android:text=
"@string/Function_Menu"
android:textSize=
"10sp"
>
</androidx.appcompat.widget.AppCompatTextView>
<androidx.cardview.widget.CardView
android:id=
"@+id/action_help"
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
android:layout_margin=
"5dp"
android:layout_weight=
"1"
android:clickable=
"true"
android:foreground=
"?android:attr/selectableItemBackground"
android:orientation=
"vertical"
app:cardBackgroundColor=
"@color/transparent"
app:cardElevation=
"0dp"
app:cardUseCompatPadding=
"false"
app:elevation=
"0dp"
>
<RelativeLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
>
<ImageView
android:layout_width=
"300dp"
android:layout_height=
"300dp"
android:layout_marginLeft=
"30dp"
android:layout_marginTop=
"30dp"
android:layout_marginRight=
"-30dp"
android:layout_marginBottom=
"-30dp"
android:scaleType=
"fitEnd"
android:src=
"@drawable/help"
/>
<TextView
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@drawable/dialogcube"
android:paddingLeft=
"13dp"
android:paddingTop=
"13dp"
android:text=
"@string/help"
android:textSize=
"30dp"
android:textColor=
"@color/holo_blue_bright"
android:textStyle=
"bold"
/>
</RelativeLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:id=
"@+id/nav_webpage"
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
android:layout_margin=
"5dp"
android:layout_weight=
"1"
android:clickable=
"true"
android:foreground=
"?android:attr/selectableItemBackground"
android:orientation=
"vertical"
app:cardBackgroundColor=
"@color/transparent"
app:cardElevation=
"0dp"
app:cardUseCompatPadding=
"false"
app:elevation=
"0dp"
>
<RelativeLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
>
<ImageView
android:layout_width=
"300dp"
android:layout_height=
"300dp"
android:layout_marginLeft=
"30dp"
android:layout_marginTop=
"30dp"
android:layout_marginRight=
"-30dp"
android:layout_marginBottom=
"-30dp"
android:scaleType=
"fitEnd"
android:src=
"@drawable/about"
/>
<TextView
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@drawable/dialogcube"
android:paddingLeft=
"13dp"
android:paddingTop=
"13dp"
android:text=
"@string/donation"
android:textColor=
"@color/holo_blue_bright"
android:textSize=
"30dp"
android:textStyle=
"bold"
/>
</RelativeLayout>
</androidx.cardview.widget.CardView>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
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