Commit 96d310b0 authored by fallenstardust's avatar fallenstardust

调整布局

parent a880213f
...@@ -48,7 +48,6 @@ public abstract class HomeActivity extends BaseActivity implements OnDuelAssista ...@@ -48,7 +48,6 @@ public abstract class HomeActivity extends BaseActivity implements OnDuelAssista
private BottomNavigationBar bottomNavigationBar; private BottomNavigationBar bottomNavigationBar;
private FrameLayout frameLayout; private FrameLayout frameLayout;
private Fragment mFragment; private Fragment mFragment;
private SettingFragment mSettingFragment;
private HomeFragment fragment_home; private HomeFragment fragment_home;
private CardSearchFragment fragment_search; private CardSearchFragment fragment_search;
...@@ -102,7 +101,7 @@ public abstract class HomeActivity extends BaseActivity implements OnDuelAssista ...@@ -102,7 +101,7 @@ 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.ic_home, R.string.mc_home))
.addItem(new BottomNavigationItem(R.drawable.ic_search, 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.ic_add, 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.ic_settings, R.string.settings))
......
...@@ -24,6 +24,7 @@ import android.view.inputmethod.EditorInfo; ...@@ -24,6 +24,7 @@ import android.view.inputmethod.EditorInfo;
import android.widget.Button; import android.widget.Button;
import android.widget.EditText; import android.widget.EditText;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView; import android.widget.ListView;
import android.widget.TextView; import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
...@@ -168,11 +169,11 @@ public class HomeFragment extends BaseFragemnt implements View.OnClickListener { ...@@ -168,11 +169,11 @@ public class HomeFragment extends BaseFragemnt implements View.OnClickListener {
startActivity(new Intent(getActivity(), FileLogActivity.class)); startActivity(new Intent(getActivity(), FileLogActivity.class));
return true; return true;
} }
});*/ });
cv_reset_res = view.findViewById(R.id.action_reset_game_res); cv_reset_res = view.findViewById(R.id.action_reset_game_res);
cv_reset_res.setOnClickListener(this); cv_reset_res.setOnClickListener(this);
cv_join_QQ = view.findViewById(R.id.action_join_qq_group); cv_join_QQ = view.findViewById(R.id.action_join_qq_group);
cv_join_QQ.setOnClickListener(this); cv_join_QQ.setOnClickListener(this);*/
cv_donation = view.findViewById(R.id.nav_webpage); cv_donation = view.findViewById(R.id.nav_webpage);
cv_donation.setOnClickListener(this); cv_donation.setOnClickListener(this);
cv_help = view.findViewById(R.id.action_help); cv_help = view.findViewById(R.id.action_help);
...@@ -629,10 +630,6 @@ public class HomeFragment extends BaseFragemnt implements View.OnClickListener { ...@@ -629,10 +630,6 @@ public class HomeFragment extends BaseFragemnt implements View.OnClickListener {
case R.id.action_download_ex: case R.id.action_download_ex:
WebActivity.open(getContext(), getString(R.string.action_download_expansions), Constants.URL_YGO233_ADVANCE); WebActivity.open(getContext(), getString(R.string.action_download_expansions), Constants.URL_YGO233_ADVANCE);
break; break;
case R.id.action_join_qq_group:
String key = "anEjPCDdhLgxtfLre-nT52G1Coye3LkK";
joinQQGroup(key);
break;
case R.id.action_help: { case R.id.action_help: {
final DialogPlus dialog = new DialogPlus(getContext()); final DialogPlus dialog = new DialogPlus(getContext());
dialog.setContentView(R.layout.dialog_help); dialog.setContentView(R.layout.dialog_help);
...@@ -652,10 +649,14 @@ public class HomeFragment extends BaseFragemnt implements View.OnClickListener { ...@@ -652,10 +649,14 @@ public class HomeFragment extends BaseFragemnt implements View.OnClickListener {
}); });
} }
break; break;/*
case R.id.action_join_qq_group:
String key = "anEjPCDdhLgxtfLre-nT52G1Coye3LkK";
joinQQGroup(key);
break;
case R.id.action_reset_game_res: case R.id.action_reset_game_res:
updateImages(); updateImages();
break; break;*/
case R.id.nav_webpage: { case R.id.nav_webpage: {
Intent intent = new Intent(Intent.ACTION_VIEW); Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse(BuildConfig.URL_DONATE)); intent.setData(Uri.parse(BuildConfig.URL_DONATE));
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="1" android:layout_weight="1"
android:background="#80000000"> android:background="#aa000000">
</FrameLayout> </FrameLayout>
......
...@@ -68,14 +68,14 @@ ...@@ -68,14 +68,14 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_margin="5dp" android:layout_margin="5dp"
android:orientation="horizontal" android:orientation="horizontal"
android:weightSum="1"> android:weightSum="3">
<LinearLayout <LinearLayout
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginRight="5dp" android:layout_marginRight="5dp"
android:layout_marginBottom="60dp" android:layout_marginBottom="60dp"
android:layout_weight="0.5" android:layout_weight="2"
android:background="@drawable/dialogshort" android:background="@drawable/dialogshort"
android:orientation="vertical"> android:orientation="vertical">
...@@ -104,9 +104,8 @@ ...@@ -104,9 +104,8 @@
android:id="@+id/shimmer_tv" android:id="@+id/shimmer_tv"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_margin="10dp"
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
android:background="@drawable/window2s" android:background="@drawable/window3"
android:gravity="center" android:gravity="center"
android:text="@string/return_to_duel" android:text="@string/return_to_duel"
android:textColor="@color/item_title" android:textColor="@color/item_title"
...@@ -115,25 +114,36 @@ ...@@ -115,25 +114,36 @@
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/rightbar" android:id="@+id/bottombar"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginRight="15dp" android:layout_gravity="right"
android:layout_marginBottom="60dp" android:layout_marginBottom="60dp"
android:layout_weight="1" android:layout_weight="1"
android:orientation="horizontal"> android:orientation="vertical">
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:background="@drawable/dialogshort"
android:orientation="vertical"> android:orientation="vertical">
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="YGOPro"
android:background="@drawable/veil2"
android:textSize="10sp">
</androidx.appcompat.widget.AppCompatTextView>
<androidx.cardview.widget.CardView <androidx.cardview.widget.CardView
android:id="@+id/action_game" android:id="@+id/action_game"
android:layout_width="80dp" android:layout_width="match_parent"
android:layout_height="80dp" android:layout_height="50dp"
android:layout_marginRight="10dp" android:layout_margin="5dp"
android:layout_marginBottom="10dp"
android:clickable="true" android:clickable="true"
android:foreground="?android:attr/selectableItemBackground" android:foreground="?android:attr/selectableItemBackground"
android:orientation="vertical" android:orientation="vertical"
...@@ -149,33 +159,32 @@ ...@@ -149,33 +159,32 @@
<ImageView <ImageView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="-30dp" android:layout_marginStart="-10dp"
android:layout_marginLeft="20dp" android:layout_marginLeft="30dp"
android:layout_marginTop="20dp" android:layout_marginTop="-10dp"
android:layout_marginEnd="-30dp" android:layout_marginEnd="-10dp"
android:layout_marginRight="-20dp" android:layout_marginRight="-20dp"
android:layout_marginBottom="-20dp" android:layout_marginBottom="-10dp"
android:scaleType="fitEnd" android:scaleType="fitEnd"
android:src="@drawable/start" /> android:src="@drawable/start" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/window3" android:background="@drawable/dialogcube"
android:paddingLeft="13dp" android:paddingLeft="13dp"
android:paddingTop="13dp" android:paddingTop="13dp"
android:text="@string/action_game" android:text="@string/action_game"
android:textColor="@color/holo_blue_bright" android:textColor="@color/holo_green_bright"
android:textStyle="bold" /> android:textStyle="bold" />
</RelativeLayout> </RelativeLayout>
</androidx.cardview.widget.CardView> </androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/action_bot"
android:id="@+id/action_reset_game_res" android:layout_width="match_parent"
android:layout_width="80dp"
android:layout_height="50dp" android:layout_height="50dp"
android:layout_marginBottom="10dp" android:layout_margin="5dp"
android:clickable="true" android:clickable="true"
android:foreground="?android:attr/selectableItemBackground" android:foreground="?android:attr/selectableItemBackground"
android:orientation="vertical" android:orientation="vertical"
...@@ -198,26 +207,25 @@ ...@@ -198,26 +207,25 @@
android:layout_marginRight="-20dp" android:layout_marginRight="-20dp"
android:layout_marginBottom="-10dp" android:layout_marginBottom="-10dp"
android:scaleType="fitEnd" android:scaleType="fitEnd"
android:src="@drawable/reset" /> android:src="@drawable/help" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/window3" android:background="@drawable/dialogcube"
android:paddingLeft="13dp" android:paddingLeft="13dp"
android:paddingTop="13dp" android:paddingTop="13dp"
android:text="@string/reset_game_res" android:text="@string/bot_mode"
android:textColor="@color/holo_blue_bright" android:textColor="@color/holo_blue_bright"
android:textSize="10sp"
android:textStyle="bold" /> android:textStyle="bold" />
</RelativeLayout> </RelativeLayout>
</androidx.cardview.widget.CardView> </androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android" <androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/action_replay" android:id="@+id/action_replay"
android:layout_width="80dp" android:layout_width="match_parent"
android:layout_height="80dp" android:layout_height="50dp"
android:layout_marginBottom="10dp" android:layout_margin="5dp"
android:clickable="true" android:clickable="true"
android:foreground="?android:attr/selectableItemBackground" android:foreground="?android:attr/selectableItemBackground"
android:orientation="vertical" android:orientation="vertical"
...@@ -233,19 +241,19 @@ ...@@ -233,19 +241,19 @@
<ImageView <ImageView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="-30dp" android:layout_marginStart="-10dp"
android:layout_marginLeft="20dp" android:layout_marginLeft="30dp"
android:layout_marginTop="20dp" android:layout_marginTop="-10dp"
android:layout_marginEnd="-30dp" android:layout_marginEnd="-10dp"
android:layout_marginRight="-20dp" android:layout_marginRight="-20dp"
android:layout_marginBottom="-20dp" android:layout_marginBottom="-10dp"
android:scaleType="fitEnd" android:scaleType="fitEnd"
android:src="@drawable/replay" /> android:src="@drawable/replay" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/window3" android:background="@drawable/dialogcube"
android:paddingLeft="13dp" android:paddingLeft="13dp"
android:paddingTop="13dp" android:paddingTop="13dp"
android:text="@string/replay" android:text="@string/replay"
...@@ -257,9 +265,9 @@ ...@@ -257,9 +265,9 @@
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android" <androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/action_download_ex" android:id="@+id/action_download_ex"
android:layout_width="80dp" android:layout_width="match_parent"
android:layout_height="50dp" android:layout_height="50dp"
android:layout_marginBottom="10dp" android:layout_margin="5dp"
android:clickable="true" android:clickable="true"
android:foreground="?android:attr/selectableItemBackground" android:foreground="?android:attr/selectableItemBackground"
android:orientation="vertical" android:orientation="vertical"
...@@ -275,19 +283,19 @@ ...@@ -275,19 +283,19 @@
<ImageView <ImageView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="-30dp" android:layout_marginStart="-10dp"
android:layout_marginLeft="20dp" android:layout_marginLeft="30dp"
android:layout_marginTop="20dp" android:layout_marginTop="-10dp"
android:layout_marginEnd="-30dp" android:layout_marginEnd="-10dp"
android:layout_marginRight="-20dp" android:layout_marginRight="-20dp"
android:layout_marginBottom="-20dp" android:layout_marginBottom="-10dp"
android:scaleType="fitEnd" android:scaleType="fitEnd"
android:src="@drawable/downloadimages" /> android:src="@drawable/downloadimages" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/window3" android:background="@drawable/dialogcube"
android:paddingLeft="13dp" android:paddingLeft="13dp"
android:paddingTop="13dp" android:paddingTop="13dp"
android:text="@string/action_download_expansions" android:text="@string/action_download_expansions"
...@@ -297,17 +305,34 @@ ...@@ -297,17 +305,34 @@
</RelativeLayout> </RelativeLayout>
</androidx.cardview.widget.CardView> </androidx.cardview.widget.CardView>
</LinearLayout> </LinearLayout>
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/ic_launcher3"
android:layout_weight="1" />
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:background="@drawable/dialogshort"
android:layout_gravity="bottom"
android:orientation="vertical"> android:orientation="vertical">
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android" <androidx.appcompat.widget.AppCompatTextView
android:id="@+id/action_join_qq_group" android:layout_width="match_parent"
android:layout_width="80dp" android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/Function_Menu"
android:background="@drawable/veil2"
android:textSize="10sp">
</androidx.appcompat.widget.AppCompatTextView>
<androidx.cardview.widget.CardView
android:id="@+id/action_help"
android:layout_width="match_parent"
android:layout_height="50dp" android:layout_height="50dp"
android:layout_marginBottom="5dp" android:layout_margin="5dp"
android:clickable="true" android:clickable="true"
android:foreground="?android:attr/selectableItemBackground" android:foreground="?android:attr/selectableItemBackground"
android:orientation="vertical" android:orientation="vertical"
...@@ -330,68 +355,25 @@ ...@@ -330,68 +355,25 @@
android:layout_marginRight="-20dp" android:layout_marginRight="-20dp"
android:layout_marginBottom="-10dp" android:layout_marginBottom="-10dp"
android:scaleType="fitEnd" android:scaleType="fitEnd"
android:src="@drawable/joinqqgroup" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/window3"
android:paddingLeft="13dp"
android:paddingTop="13dp"
android:text="@string/Join_QQ"
android:textColor="@color/holo_blue_bright"
android:textSize="10sp"
android:textStyle="bold" />
</RelativeLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:id="@+id/action_help"
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_marginRight="5dp"
android:layout_marginBottom="5dp"
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="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="-30dp"
android:layout_marginLeft="20dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="-30dp"
android:layout_marginRight="-20dp"
android:layout_marginBottom="-20dp"
android:scaleType="fitEnd"
android:src="@drawable/help" /> android:src="@drawable/help" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/window3" android:background="@drawable/dialogcube"
android:paddingLeft="13dp" android:paddingLeft="13dp"
android:paddingTop="13dp" android:paddingTop="13dp"
android:text="@string/help" android:text="@string/help"
android:textColor="@color/holo_blue_bright" android:textColor="@color/holo_green_bright"
android:textStyle="bold" /> android:textStyle="bold" />
</RelativeLayout> </RelativeLayout>
</androidx.cardview.widget.CardView> </androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android" <androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/nav_webpage" android:id="@+id/nav_webpage"
android:layout_width="100dp" android:layout_width="match_parent"
android:layout_height="50dp" android:layout_height="50dp"
android:layout_marginBottom="10dp" android:layout_margin="5dp"
android:clickable="true" android:clickable="true"
android:foreground="?android:attr/selectableItemBackground" android:foreground="?android:attr/selectableItemBackground"
android:orientation="vertical" android:orientation="vertical"
...@@ -419,56 +401,15 @@ ...@@ -419,56 +401,15 @@
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/window3" android:background="@drawable/dialogcube"
android:paddingLeft="13dp" android:paddingLeft="13dp"
android:paddingTop="13dp" android:paddingTop="13dp"
android:text="@string/donation" android:text="@string/donation"
android:textColor="@color/holo_blue_bright" android:textColor="@color/selector_text_color_white_gold"
android:textSize="10sp" android:textSize="10sp"
android:textStyle="bold" /> android:textStyle="bold" />
</RelativeLayout> </RelativeLayout>
</androidx.cardview.widget.CardView> </androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:id="@+id/action_bot"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_marginRight="10dp"
android:layout_marginBottom="10dp"
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="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="-30dp"
android:layout_marginLeft="20dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="-30dp"
android:layout_marginRight="-20dp"
android:layout_marginBottom="-20dp"
android:scaleType="fitEnd"
android:src="@drawable/help" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/window3"
android:paddingLeft="13dp"
android:paddingTop="13dp"
android:text="@string/bot_mode"
android:textColor="@color/holo_blue_bright"
android:textStyle="bold" />
</RelativeLayout>
</androidx.cardview.widget.CardView>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment