Commit 9aaff624 authored by wanglei's avatar wanglei

重写电池信息页面

parent 311ed22d
......@@ -17,6 +17,9 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
ActivityMainBinding.inflate(layoutInflater)
}
private val homeFragment by lazy {
}
override fun initView() {
updateMediaStore()
initStatusBar()
......
......@@ -8,7 +8,7 @@ import com.base.easyfilemanager.activity.MainActivity
object SplashJumpUtils {
fun jumpNextPage(context: Activity) {
context.startActivity(Intent(context, BatteryActivity::class.java))
context.startActivity(Intent(context, MainActivity::class.java))
context.finish()
}
}
\ No newline at end of file
package com.base.easyfilemanager.adapter
import android.annotation.SuppressLint
import android.view.View
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import androidx.recyclerview.widget.RecyclerView.ViewHolder
import com.base.easyfilemanager.R
import com.base.easyfilemanager.helps.XmlEx.inflate
class AppFunctionAdapter(
val where: Int = 0,
val click: (name: String) -> Unit
) : RecyclerView.Adapter<AppFunctionAdapter.JJJ>() {
val list = when (where) {
else -> arrayListOf<Fun>()
}
class JJJ(view: View) : ViewHolder(view)
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): JJJ {
val layout = when (where) {
else -> R.layout.item_fun_home_1
}
return JJJ(layout.inflate(parent))
}
override fun getItemCount(): Int {
return list.size
}
override fun onBindViewHolder(holder: JJJ, position: Int) {
val data = list[position]
val context = holder.itemView.context
if (data.isAd) {
} else {
}
}
@SuppressLint("NotifyDataSetChanged")
fun removeItem(name: String) {
list.removeIf { it.name == name }
notifyDataSetChanged()
}
data class Fun(
val name: String = "",
val icon: Int = 0,
val des: String = "",
val button: String = "",
) {
var isAd = false
}
companion object {
const val JUNK_CLEANER = "Junk Cleaner"
const val RECENT_APP_USAGE = "Recent App Usage"
const val LARGE_FILE_CLEANER = "Large File Cleaner"
const val NOTIFICATION_CLEANER = "Notification Cleaner"
const val NETWORK_TRAFFIC = "Network Traffic"
const val APP_MANAGER = "App Manager"
const val SIMILAR_PHOTOS = "Similar Photos"
const val PHOTO_COMPRESS = "Photo Compress"
val homeLast1 = arrayListOf<Fun>()
val homeLast2 = arrayListOf<Fun>()
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="22dp" />
<solid android:color="#4990FA" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#FFFFFF" />
<corners android:radius="18dp" />
</shape>
\ No newline at end of file
......@@ -9,7 +9,7 @@
<fragment
android:id="@+id/fragment_category"
android:name="com.base.easyfilemanager.fragment.FileCategoryFragment"
android:name="com.base.easyfilemanager.fragment.HomeFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_constraintBottom_toBottomOf="parent"
......
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
app/src/main/res/mipmap-xxhdpi/yuan.png

31.2 KB | W: | H:

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

63.8 KB | W: | H:

app/src/main/res/mipmap-xxhdpi/yuan.png
app/src/main/res/mipmap-xxhdpi/yuan.png
app/src/main/res/mipmap-xxhdpi/yuan.png
app/src/main/res/mipmap-xxhdpi/yuan.png
  • 2-up
  • Swipe
  • Onion skin
<resources>
<string name="app_name">Easy File Manager</string>
<string name="facebook_app_id">979649830566328</string>
<!-- TODO: Remove or change this placeholder text -->
<string name="hello_blank_fragment">Hello blank fragment</string>
</resources>
\ No newline at end of file
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