Commit 5d29e2e2 authored by wanglei's avatar wanglei

tools页面

parent efe97210
Pipeline #1129 failed with stages
......@@ -44,7 +44,8 @@
android:exported="true"
android:launchMode="singleTask"
android:screenOrientation="portrait"
android:theme="@style/splash.theme">
android:theme="@style/splash.theme"
tools:ignore="DiscouragedApi,LockedOrientationActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
......
......@@ -22,12 +22,12 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
ToolsFragment()
}
private val fragments by lazy {
mutableListOf(homeFragment,toolsFragment)
mutableListOf(homeFragment, toolsFragment)
}
override fun initView() {
BarUtils.setStatusBarColor(this, Color.TRANSPARENT)
// binding.root.updatePadding(top = BarUtils.getStatusBarHeight())
// binding.root.updatePadding(top = BarUtils.getStatusBarHeight())
binding.idVp.run {
adapter = object : FragmentStateAdapter(this@MainActivity) {
override fun getItemCount(): Int {
......@@ -58,7 +58,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
binding.idBottom2.isSelected = false
when (p) {
0 -> binding.idBottom1.isSelected = true
1 -> binding.idBottom2.isSelected = true
1 -> binding.idBottom2.isSelected = true
}
}
......
......@@ -31,13 +31,13 @@ class ToolsAdapter(
private val list = listOf(
ToolsUI(
tittle = "Popular", tools = listOf(
ToolUI(JUNK_CLEANER, context.getString(R.string.clean_junk), R.drawable.cleanjunk_tools),
ToolUI(JUNK_CLEANER, context.getString(R.string.clean_junk), R.drawable.tool_cleanjunk),
// ToolUI(VIRUS_SCAN, context.getString(R.string.virus_scan), R.drawable.virusscan_tools),
ToolUI(PHOTO_COMPRESS, context.getString(R.string.photo_compress), R.drawable.compress_tools),
ToolUI(SIMILAR_PHOTOS, "Similar Photos", R.drawable.similar_tools),
ToolUI(LARGE_FILE_CLEANER, context.getString(R.string.large_file_cleaner), R.drawable.large_tools),
ToolUI(APP_MANAGER, context.getString(R.string.app_manager), R.drawable.appmanager_tools),
ToolUI(SPEAK_CLEANER, context.getString(R.string.speaker_cleaner), R.drawable.speaker_tools),
ToolUI(PHOTO_COMPRESS, context.getString(R.string.photo_compress), R.drawable.tool_photo),
ToolUI(SIMILAR_PHOTOS, "Similar Photos", R.drawable.tool_similar),
ToolUI(LARGE_FILE_CLEANER, context.getString(R.string.large_file_cleaner), R.drawable.tool_large),
ToolUI(APP_MANAGER, context.getString(R.string.app_manager), R.drawable.tool_appmanager),
ToolUI(SPEAK_CLEANER, context.getString(R.string.speaker_cleaner), R.drawable.tool_speaker),
ToolUI(BATTERY_INFO, context.getString(R.string.battery_info), R.drawable.battery_tools)
)
),
......@@ -45,9 +45,9 @@ class ToolsAdapter(
ToolsUI(
tittle = "More",
tools = listOf(
ToolUI(NOTIFICATION_CLEANER, context.getString(R.string.notification_cleaner), R.drawable.notification_tools),
ToolUI(NETWORK_TRAFFIC, context.getString(R.string.network_traffic), R.drawable.network_tools),
ToolUI(RECENT_APP_USAGE, context.getString(R.string.recent_app_usage), R.drawable.recentapp_tools),
ToolUI(NOTIFICATION_CLEANER, context.getString(R.string.notification_cleaner), R.drawable.tool_notification),
ToolUI(NETWORK_TRAFFIC, context.getString(R.string.network_traffic), R.drawable.tool_network),
ToolUI(RECENT_APP_USAGE, context.getString(R.string.recent_app_usage), R.drawable.tool_recentapp),
)
),
......@@ -97,7 +97,6 @@ class ToolsAdapter(
// PHOTO_COMPRESS -> R.color.color_f5f4ff
else -> R.color.color_f7faff
}
toolBinding.card.setCardBackgroundColor(ContextCompat.getColor(context, color))
toolBinding.iv.setImageResource(toolUI.drawable)
toolBinding.tvName.text = toolUI.fName
toolBinding.root.setOnClickListener {
......
......@@ -46,7 +46,7 @@
android:text="Home"
android:textSize="11sp"
app:bl_selected_textColor="@color/theme_color"
app:bl_unSelected_textColor="@color/color_dadde5"
app:bl_unSelected_textColor="@color/color_c3c3c3"
tools:ignore="HardcodedText" />
</androidx.appcompat.widget.LinearLayoutCompat>
......
......@@ -142,10 +142,11 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_margin="4dp"
android:layout_margin="7.5dp"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical">
android:orientation="vertical"
app:bl_solid_color="#FBFDFC">
<ImageView
......@@ -175,10 +176,11 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_margin="4dp"
android:layout_margin="7.5dp"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical">
android:orientation="vertical"
app:bl_solid_color="#FBFDFC">
<ImageView
......@@ -250,10 +252,11 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_margin="4dp"
android:layout_margin="7.5dp"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical">
android:orientation="vertical"
app:bl_solid_color="#FBFDFC">
<ImageView
android:layout_width="49dp"
......@@ -281,10 +284,11 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_margin="4dp"
android:layout_margin="7.5dp"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical">
android:orientation="vertical"
app:bl_solid_color="#FBFDFC">
<ImageView
......
......@@ -4,39 +4,25 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:background="#FDFDFD"
android:orientation="vertical">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white">
<TextView
android:id="@+id/tv_tittle_tools"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="30dp"
android:text="@string/tools"
android:textColor="#222222"
android:textSize="19sp"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="HardcodedText" />
android:layout_height="120dp">
<LinearLayout
app:layout_constraintVertical_bias="0.85"
android:id="@+id/ll_size"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="10dp"
android:layout_marginStart="15dp"
android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_tittle_tools">
app:layout_constraintTop_toTopOf="parent"
app:layout_goneMarginTop="50dp">
<TextView
android:id="@+id/tv_size"
......@@ -61,37 +47,22 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginBottom="35dp"
android:layout_marginEnd="16dp"
android:text="We have already saved you"
android:textColor="#666666"
android:textSize="12sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="@id/ll_size"
app:layout_constraintTop_toBottomOf="@id/ll_size"
tools:ignore="HardcodedText" />
<ImageView
android:id="@+id/iv_icon"
android:layout_width="82dp"
android:layout_height="54dp"
android:layout_marginEnd="20dp"
android:src="@drawable/toolstu"
app:layout_constraintBottom_toBottomOf="parent"
android:textColor="@android:color/black"
android:textSize="15sp"
app:layout_constraintBottom_toBottomOf="@id/ll_size"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.75"
tools:ignore="ContentDescription" />
app:layout_constraintTop_toTopOf="@id/ll_size"
tools:ignore="HardcodedText" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginHorizontal="10dp"
android:layout_marginTop="10dp"
android:overScrollMode="never"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
......
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/card"
......@@ -13,38 +13,29 @@
android:focusable="true"
android:gravity="center"
android:orientation="vertical"
app:cardBackgroundColor="@color/color_f7faff"
app:cardCornerRadius="5dp"
app:cardElevation="0dp"
tools:ignore="UseCompoundDrawables">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<ImageView
android:id="@+id/iv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="10dp"
tools:ignore="ContentDescription"
tools:src="@drawable/appmanager_tools" />
<ImageView
android:id="@+id/iv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="10dp"
tools:ignore="ContentDescription"
tools:src="@drawable/tool_appmanager" />
<TextView
android:id="@+id/tv_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="5dp"
android:layout_marginBottom="17dp"
android:gravity="center"
android:textColor="#555555"
android:textSize="11sp"
android:textStyle="bold"
tools:text="App Manager" />
</LinearLayout>
<TextView
android:id="@+id/tv_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="5dp"
android:layout_marginBottom="17dp"
android:gravity="center"
android:textColor="#555555"
android:textSize="11sp"
android:textStyle="bold"
tools:text="App Manager" />
</androidx.cardview.widget.CardView>
\ No newline at end of file
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="4dp"
app:cardBackgroundColor="@color/white"
app:cardCornerRadius="0dp"
app:cardElevation="0dp">
android:layout_height="wrap_content">
<androidx.constraintlayout.widget.ConstraintLayout
<LinearLayout
android:id="@+id/ll_tittle"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:id="@+id/ll_tittle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="16dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="UseCompoundDrawables">
<TextView
android:id="@+id/tv_tittle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="16dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="UseCompoundDrawables">
<TextView
android:id="@+id/tv_tittle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/black"
android:textSize="18sp"
android:textStyle="bold"
tools:text="Popular" />
</LinearLayout>
android:textColor="@color/black"
android:textSize="18sp"
android:textStyle="bold"
tools:text="Popular" />
</LinearLayout>
<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="5dp"
android:layout_marginTop="20dp"
android:layout_marginBottom="10dp"
app:cardBackgroundColor="@color/white"
app:cardCornerRadius="5dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/ll_tittle">
<GridLayout
android:id="@+id/grid"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:columnCount="3"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/ll_tittle"
tools:ignore="UselessLeaf" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
\ No newline at end of file
app/src/main/res/mipmap-xxhdpi/logo.png

14.2 KB | W: | H:

app/src/main/res/mipmap-xxhdpi/logo.png

12.4 KB | W: | H:

app/src/main/res/mipmap-xxhdpi/logo.png
app/src/main/res/mipmap-xxhdpi/logo.png
app/src/main/res/mipmap-xxhdpi/logo.png
app/src/main/res/mipmap-xxhdpi/logo.png
  • 2-up
  • Swipe
  • Onion skin
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="theme_color">#3DB9DF</color>
<color name="theme_color">#0EC896</color>
<color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color>
<color name="color_c3c3c3">#C3C3C3</color>
......
<resources>
<string name="app_name">Quick Clean</string>
<string name="app_name">One Clean Master</string>
<string name="facebook_app_id" translatable="false">988717899263128</string>
<string name="more_tools">More Tools</string>
<string name="more">More</string>
......
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