Commit 4cf33840 authored by fallenstardust's avatar fallenstardust

添加布局

parent 9b779191
......@@ -491,18 +491,18 @@ public class HomeFragment extends BaseFragemnt implements View.OnClickListener {
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.nav_webpage: {
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse(BuildConfig.URL_DONATE));
startActivity(intent);
}
break;
case R.id.action_about:
break;
case R.id.action_replay:
break;
case R.id.action_bot:
break;
case R.id.action_game:
setRandomCardDetail();
if (mCardDetailRandom != null) {
mCardDetailRandom.show();
}
//openGame();
openGame();
break;
case R.id.action_settings: {
Intent intent = new Intent(getContext(), SettingsActivity.class);
......@@ -545,6 +545,12 @@ public class HomeFragment extends BaseFragemnt implements View.OnClickListener {
case R.id.action_reset_game_res:
updateImages();
break;
case R.id.nav_webpage: {
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse(BuildConfig.URL_DONATE));
startActivity(intent);
}
break;
}
}
}
......@@ -53,8 +53,9 @@
android:orientation="horizontal">
<LinearLayout
android:layout_width="200dp"
android:layout_width="190dp"
android:layout_height="wrap_content"
android:layout_marginRight="5dp"
android:orientation="vertical">
<FrameLayout
......@@ -86,19 +87,19 @@
android:id="@+id/bottombar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginTop="5dp"
android:layout_margin="5dp"
android:orientation="horizontal"
android:weightSum="1">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
android:layout_height="match_parent"
android:orientation="vertical">
<androidx.cardview.widget.CardView
android:id="@+id/action_game"
android:layout_width="102dp"
android:layout_height="110dp"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_marginRight="10dp"
android:layout_marginBottom="10dp"
android:clickable="true"
......@@ -136,16 +137,141 @@
android:textStyle="bold" />
</RelativeLayout>
</androidx.cardview.widget.CardView>
</LinearLayout>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/action_reset_game_res"
android:layout_width="100dp"
android:layout_height="50dp"
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="-10dp"
android:layout_marginLeft="30dp"
android:layout_marginTop="-10dp"
android:layout_marginEnd="-10dp"
android:layout_marginRight="-20dp"
android:layout_marginBottom="-10dp"
android:scaleType="fitEnd"
android:src="@drawable/reset" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/window3"
android:paddingLeft="13dp"
android:paddingTop="13dp"
android:text="@string/reset_game_res"
android:textColor="@color/holo_blue_bright"
android:textSize="10sp"
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_replay"
android:layout_width="100dp"
android:layout_height="100dp"
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/replay" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/window3"
android:paddingLeft="13dp"
android:paddingTop="13dp"
android:text="@string/replay"
android:textColor="@color/holo_blue_bright"
android:textSize="10sp"
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="100dp"
android:layout_height="100dp"
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/downloadimages" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/window3"
android:paddingLeft="13dp"
android:paddingTop="13dp"
android:text="@string/action_download_expansions"
android:textColor="@color/holo_blue_bright"
android:textSize="10sp"
android:textStyle="bold" />
</RelativeLayout>
</androidx.cardview.widget.CardView>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="vertical">
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/action_join_qq_group"
android:layout_width="match_parent"
android:layout_width="100dp"
android:layout_height="50dp"
android:layout_marginBottom="10dp"
android:clickable="true"
......@@ -185,9 +311,51 @@
</RelativeLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:id="@+id/action_help"
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/help"
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_width="100dp"
android:layout_height="50dp"
android:layout_marginBottom="10dp"
android:clickable="true"
......@@ -221,12 +389,11 @@
android:paddingLeft="13dp"
android:paddingTop="13dp"
android:text="@string/donation"
android:textSize="10sp"
android:textColor="@color/holo_blue_bright"
android:textSize="10sp"
android:textStyle="bold" />
</RelativeLayout>
</androidx.cardview.widget.CardView>
</LinearLayout>
</LinearLayout>
</LinearLayout>
......
......@@ -21,6 +21,14 @@
android:id="@+id/action_reset_game_res"
android:icon="@drawable/ic_file_download_black_24dp"
android:title="@string/reset_game_res" />
<item
android:id="@+id/action_replay"
android:icon="@drawable/ic_album"
android:title="@string/replay" />
<item
android:id="@+id/action_bot"
android:icon="@drawable/ic_copy"
android:title="@string/bot_mode" />
<item android:title="@string/menu">
<menu>
......
......@@ -319,4 +319,6 @@
<string name="file_installed">文件已导入</string>
<string name="settings_screen_padding">瀑布屏预留高度</string>
<string name="tip_load_cdb_error">加载数据出错</string>
<string name="replay">查看录像</string>
<string name="bot_mode">人机练习</string>
</resources>
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