Skip to content

Commit

Permalink
💄 颜色样式美化
Browse files Browse the repository at this point in the history
  • Loading branch information
AnkioTomas committed Dec 28, 2023
1 parent 2bfc235 commit a7c70e0
Show file tree
Hide file tree
Showing 7 changed files with 94 additions and 62 deletions.
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/fade_mask.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
<gradient
android:type="linear"
android:startColor="#00000000"
android:endColor="?attr/colorSurfaceContainer"
android:endColor="?attr/colorSurfaceContainerLow"
android:angle="-90"/> <!-- 渐变方向 -->
</shape>
9 changes: 9 additions & 0 deletions app/src/main/res/drawable/float_fee.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960">
<path
android:fillColor="#FF000000"
android:pathData="M46,834v-708h868v708L46,834ZM172,708h616v-456L172,252v456ZM172,708v-456,456ZM320,680h80v-40h40q17,0 28.5,-11.5T480,600v-120q0,-17 -11.5,-28.5T440,440L320,440v-40h160v-80h-80v-40h-80v40h-40q-17,0 -28.5,11.5T240,360v120q0,17 11.5,28.5T280,520h120v40L240,560v80h80v40ZM640,650 L720,570L560,570l80,80ZM560,400h160l-80,-80 -80,80Z"/>
</vector>
9 changes: 0 additions & 9 deletions app/src/main/res/drawable/float_moeny.xml

This file was deleted.

9 changes: 9 additions & 0 deletions app/src/main/res/drawable/float_money.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960">
<path
android:fillColor="#FF000000"
android:pathData="M229,615v-55L129,560v-111h200v-49L185,400q-23,0 -39.5,-16.5T129,344v-160q0,-23 16.5,-39t39.5,-16h44v-55h111v55h100v111L240,240v49h145q23,0 39,16t16,39v160q0,23 -16,39.5T385,560h-45v55L229,615ZM573,877 L388,691l84,-83 101,101 214,-213 84,83L573,877Z"/>
</vector>
98 changes: 50 additions & 48 deletions app/src/main/res/layout/float_editor.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:layout_marginBottom="@dimen/padding"
app:cardBackgroundColor="?attr/colorSurfaceContainer"
app:cardBackgroundColor="?attr/colorSurfaceContainerLow"
app:cardCornerRadius="@dimen/radius"
app:strokeWidth="0dp"
app:strokeWidth="1dp"
app:strokeColor="?attr/colorSurfaceContainerHighest" app:cardElevation="0dp">

<RelativeLayout
Expand All @@ -52,16 +52,16 @@

<View
android:layout_width="match_parent"
android:layout_height="100dp"
android:layout_height="80dp"
android:layout_alignParentTop="true"
android:layout_marginTop="0dp"
android:layout_marginTop="20dp"
android:background="@drawable/fade_mask" />

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_marginTop="20dp"
android:layout_marginTop="10dp"
android:orientation="vertical"
android:padding="@dimen/padding">

Expand All @@ -78,6 +78,11 @@
android:layout_width="0dp"
android:layout_height="0dp" android:layout_weight="1" />






<ImageView
android:id="@+id/typeIcon"
android:layout_width="@dimen/icon_size"
Expand Down Expand Up @@ -111,30 +116,15 @@
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:padding="@dimen/float_padding">
<net.ankio.auto.ui.componets.IconView
android:id="@+id/payFrom"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:iconSrc="@mipmap/ic_launcher_round"
app:iconTintEnabled="false"
app:text="微信零钱"
app:textColor="?attr/colorOnSurface" />

<LinearLayout
android:id="@+id/payInfoFromContainer"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView

android:id="@+id/payFromIcon"
android:layout_width="@dimen/float_icon_size"
android:layout_height="@dimen/float_icon_size"
android:src="@mipmap/ic_launcher_round" />


<TextView

android:id="@+id/payFromName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/one_padding"
android:layout_marginEnd="@dimen/one_padding"
android:text="微信零钱"
android:textColor="?attr/colorOnSurface"
style="@style/TextAppearance.AppCompat.Medium" />
</LinearLayout>

<View
android:layout_width="0dp"
Expand All @@ -152,7 +142,6 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"

android:gravity="center"
android:padding="0dp">
<com.google.android.material.button.MaterialButton
Expand All @@ -167,44 +156,57 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/cateIconContainer"
android:gravity="center_vertical"
android:gravity="center"
android:padding="@dimen/float_padding">

<net.ankio.auto.ui.componets.IconView
android:id="@+id/category"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:iconSrc="@drawable/default_cate"
app:iconTintEnabled="true"
app:text="分类"
app:textColor="?attr/colorOnSurface" />

<net.ankio.auto.ui.componets.IconView
android:id="@+id/moneyType"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/padding"
app:iconSrc="@drawable/float_money"
app:iconTintEnabled="true"
app:text="人民币"
app:textColor="?attr/colorOnSurface" />

<net.ankio.auto.ui.componets.IconView
android:id="@+id/fee"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/padding"
app:iconSrc="@drawable/float_fee"
app:iconTintEnabled="true"
app:text="-0.01"
app:textColor="?attr/colorError" />
<View
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="1" />
</LinearLayout>
<LinearLayout
android:id="@+id/timeContainer"
android:gravity="center_vertical"
android:padding="@dimen/float_padding"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView

android:id="@+id/timeIcon"
android:layout_width="@dimen/float_icon_size"
android:layout_height="@dimen/float_icon_size"
android:src="@drawable/float_time"
app:tint="?attr/colorOnSurface"
/>

<TextView

android:id="@+id/timeDate"
<net.ankio.auto.ui.componets.IconView
android:id="@+id/time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/one_padding"
android:layout_marginEnd="@dimen/one_padding"
android:text="2023年12月21日 11:11:00"
android:textColor="?attr/colorOnSurface"
style="@style/TextAppearance.AppCompat.Medium"
/>
app:iconSrc="@drawable/float_time"
app:iconTintEnabled="true"
app:text="2023年12月21日 11:11:00"
app:textColor="?attr/colorOnSurface" />

</LinearLayout>


Expand Down
21 changes: 21 additions & 0 deletions app/src/main/res/values-night/colors.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (C) 2023 ankio(ankio@ankio.net)
~ Licensed under the Apache License, Version 3.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-3.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->

<resources>
<color name="info">#3B71CA</color>
<color name="danger">#DC4C64</color>
<color name="warning">#E4A11B</color>
<color name="success">#14A44D</color>
</resources>
8 changes: 4 additions & 4 deletions app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
<color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color>
<color name="white2">#CACACA</color>
<color name="info">#3B71CA</color>
<color name="danger">#DC4C64</color>
<color name="warning">#E4A11B</color>
<color name="success">#14A44D</color>
<color name="info">#155FDA</color>
<color name="danger">#E52544</color>
<color name="warning">#CE7E0A</color>
<color name="success">#189D4C</color>
<color name="gray30">#30000000</color>
<color name="gray40">#45000000</color>
</resources>

0 comments on commit a7c70e0

Please sign in to comment.