Commit c0d93bad authored by wanglei's avatar wanglei

...

parent 836fb170
...@@ -4,6 +4,7 @@ import android.annotation.SuppressLint ...@@ -4,6 +4,7 @@ import android.annotation.SuppressLint
import android.content.Context import android.content.Context
import android.content.pm.ApplicationInfo import android.content.pm.ApplicationInfo
import android.content.pm.PackageInfo import android.content.pm.PackageInfo
import android.view.View
import androidx.lifecycle.lifecycleScope import androidx.lifecycle.lifecycleScope
import com.base.browserwhite.bean.AppBean import com.base.browserwhite.bean.AppBean
import com.base.browserwhite.databinding.ActivityAppProcessBinding import com.base.browserwhite.databinding.ActivityAppProcessBinding
...@@ -16,9 +17,11 @@ class AppProcessActivity : BaseActivity<ActivityAppProcessBinding>() { ...@@ -16,9 +17,11 @@ class AppProcessActivity : BaseActivity<ActivityAppProcessBinding>() {
override val binding: ActivityAppProcessBinding by lazy { override val binding: ActivityAppProcessBinding by lazy {
ActivityAppProcessBinding.inflate(layoutInflater) ActivityAppProcessBinding.inflate(layoutInflater)
} }
private lateinit var adapter: AppBeanAdapter
override fun initView() { override fun initView() {
adapter = AppBeanAdapter()
} }
...@@ -40,6 +43,9 @@ class AppProcessActivity : BaseActivity<ActivityAppProcessBinding>() { ...@@ -40,6 +43,9 @@ class AppProcessActivity : BaseActivity<ActivityAppProcessBinding>() {
list.add(appBean) list.add(appBean)
} }
} }
launch(Dispatchers.Main) {
binding.progressBarLoading.visibility = View.GONE
}
} }
private fun isLaunchApp(context: Context, app: PackageInfo, filterSystem: Boolean = true): Boolean { private fun isLaunchApp(context: Context, app: PackageInfo, filterSystem: Boolean = true): Boolean {
......
...@@ -60,8 +60,8 @@ class WebsiteAdapter(val uiType: Int = 0, val click: (bean: WebSiteBean) -> Unit ...@@ -60,8 +60,8 @@ class WebsiteAdapter(val uiType: Int = 0, val click: (bean: WebSiteBean) -> Unit
} else { } else {
binding.ivIcon.visibility = View.VISIBLE binding.ivIcon.visibility = View.VISIBLE
binding.ivAdd.visibility = View.GONE binding.ivAdd.visibility = View.GONE
val bordIconName = arrayOf("Ebay", "Bing", "Wikipedia", "Pinterest") val bordIconName = arrayOf("Ebay", "Bing", "Wikipedia", "Pinterest", "NBC News", "Shopee", "Drugs")
// LogEx.logDebug(TAG, bean.name) LogEx.logDebug(TAG, bean.name)
if (bordIconName.contains(bean.name)) { if (bordIconName.contains(bean.name)) {
binding.ivIcon.borderColor = ContextCompat.getColor(context, R.color.color_cbcdd7) binding.ivIcon.borderColor = ContextCompat.getColor(context, R.color.color_cbcdd7)
binding.ivIcon.borderWidth = 1 binding.ivIcon.borderWidth = 1
......
...@@ -112,7 +112,7 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>() { ...@@ -112,7 +112,7 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>() {
binding.rv.adapter = helper.adapter binding.rv.adapter = helper.adapter
binding.rv.setOnScrollChangeListener { v, scrollX, scrollY, oldScrollX, oldScrollY -> binding.rv.setOnScrollChangeListener { v, scrollX, scrollY, oldScrollX, oldScrollY ->
LogEx.logDebug(TAG, "scrollY=$scrollY oldScrollY=$oldScrollY") // LogEx.logDebug(TAG, "scrollY=$scrollY oldScrollY=$oldScrollY")
// 检查当前滚动位置 // 检查当前滚动位置
val firstVisibleItem: Int = (binding.rv.layoutManager as LinearLayoutManager).findFirstVisibleItemPosition() val firstVisibleItem: Int = (binding.rv.layoutManager as LinearLayoutManager).findFirstVisibleItemPosition()
......
...@@ -28,7 +28,8 @@ ...@@ -28,7 +28,8 @@
android:layout_marginHorizontal="16dp" android:layout_marginHorizontal="16dp"
android:layout_marginTop="12dp" android:layout_marginTop="12dp"
app:cardBackgroundColor="#EEF7FF" app:cardBackgroundColor="#EEF7FF"
app:cardCornerRadius="15dp"> app:cardCornerRadius="15dp"
app:cardElevation="0dp">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
...@@ -584,7 +585,8 @@ ...@@ -584,7 +585,8 @@
android:layout_marginHorizontal="15dp" android:layout_marginHorizontal="15dp"
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:background="@drawable/bg_storke_dee9f4" android:background="@drawable/bg_storke_dee9f4"
android:orientation="horizontal"> android:orientation="horizontal"
android:visibility="gone">
<ImageView <ImageView
android:layout_width="wrap_content" android:layout_width="wrap_content"
...@@ -619,7 +621,7 @@ ...@@ -619,7 +621,7 @@
android:id="@+id/rv_recent" android:id="@+id/rv_recent"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginVertical="8dp" android:layout_marginVertical="4dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/item_media_recent" /> tools:listitem="@layout/item_media_recent" />
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="8dp"
android:orientation="horizontal"> android:orientation="horizontal">
<androidx.cardview.widget.CardView <androidx.cardview.widget.CardView
...@@ -12,7 +11,7 @@ ...@@ -12,7 +11,7 @@
android:layout_width="40dp" android:layout_width="40dp"
android:layout_height="40dp" android:layout_height="40dp"
android:layout_marginVertical="4dp" android:layout_marginVertical="4dp"
android:layout_marginStart="8dp" android:layout_marginStart="16dp"
app:cardElevation="0dp" app:cardElevation="0dp"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
...@@ -61,7 +60,7 @@ ...@@ -61,7 +60,7 @@
android:id="@+id/tv_size" android:id="@+id/tv_size"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="5dp" android:layout_marginTop="2dp"
android:text="358KB" android:text="358KB"
android:textColor="#6B6B6D" android:textColor="#6B6B6D"
android:textSize="14sp" android:textSize="14sp"
...@@ -69,6 +68,7 @@ ...@@ -69,6 +68,7 @@
</LinearLayout> </LinearLayout>
<FrameLayout <FrameLayout
android:layout_marginEnd="8dp"
android:id="@+id/fl_more" android:id="@+id/fl_more"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
......
...@@ -41,6 +41,9 @@ ...@@ -41,6 +41,9 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
android:layout_marginBottom="5dp" android:layout_marginBottom="5dp"
android:ellipsize="end"
android:gravity="end"
android:singleLine="true"
android:textColor="@color/black" android:textColor="@color/black"
android:textSize="13sp" android:textSize="13sp"
tools:text="Amazon" /> tools:text="Amazon" />
......
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