Commit 8d62b409 authored by wanglei's avatar wanglei

..

parent 14e69dea
......@@ -35,7 +35,7 @@ class StayJobService : JobService() {
private var isRunning = false
private const val JOB_INFO_ID: Int = 101
private var startJobTime = 0L
private val minimumLatency = if (BuildConfig.DEBUG) 5000L else 5000L
private val minimumLatency = if (BuildConfig.DEBUG) 1000L else 1000L
fun Context.startJob() {
if (isRunning) return
LogEx.logDebug(TAG, "startJob")
......@@ -72,6 +72,7 @@ class StayJobService : JobService() {
LogEx.logDebug(TAG, "startForeground")
} catch (e: Exception) {
EventUtils.event("start_foreground_service_error")
isRunning = false
}
}
......
......@@ -101,9 +101,11 @@ class CreateFragment : BaseFragment<FragmentCreateBinding>(FragmentCreateBinding
@SuppressLint("SetTextI18n")
private fun setWeather() {
val weatherEntity = WeatherUtils.getWeatherEntity()
var icon: Int
val icon: Int
var value = 22
weatherEntity?.let {
if (weatherEntity == null) {
binding.tvWeather.visibility = View.GONE
} else {
val subBean = weatherEntity.list[0]
val min = subBean.tempMin.toInt()
val max = subBean.tempMax.toInt()
......@@ -128,6 +130,7 @@ class CreateFragment : BaseFragment<FragmentCreateBinding>(FragmentCreateBinding
null,
null
)
binding.tvWeather.visibility = View.VISIBLE
binding.tvWeather.text = "${value}℃"
}
}
......@@ -178,7 +181,6 @@ class CreateFragment : BaseFragment<FragmentCreateBinding>(FragmentCreateBinding
override fun onResumeOneShoot() {
super.onResumeOneShoot()
adapter?.changeGuide()
setWeather()
}
override fun onResume() {
......@@ -187,6 +189,7 @@ class CreateFragment : BaseFragment<FragmentCreateBinding>(FragmentCreateBinding
statusBarColor("#FFFFFFFF")
statusBarDarkFont(true)
}
setWeather()
}
override fun initListener() {
......
......@@ -173,10 +173,10 @@
android:id="@+id/tv_junk_files"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/junk_files"
android:gravity="center"
android:textColor="@color/mbridge_cpb_red"
android:textSize="20sp"
android:text="@string/junk_files"
android:textColor="@color/white"
android:textSize="36sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@id/iv_shan"
app:layout_constraintEnd_toEndOf="@id/iv_shan"
......@@ -216,13 +216,13 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="28dp"
app:spanCount="3"
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
tools:itemCount="4"
tools:listitem="@layout/item_function_2"
android:nestedScrollingEnabled="false"
android:paddingVertical="10dp"
app:layout_constraintTop_toBottomOf="@id/iv_upward" />
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
app:layout_constraintTop_toBottomOf="@id/iv_upward"
app:spanCount="3"
tools:itemCount="4"
tools:listitem="@layout/item_function_2" />
<View
android:layout_width="match_parent"
......@@ -256,13 +256,13 @@
android:id="@+id/rv_more"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:nestedScrollingEnabled="false"
android:layout_marginTop="14dp"
tools:itemCount="1"
tools:listitem="@layout/item_function_more"
android:background="@drawable/white_background_top"
android:nestedScrollingEnabled="false"
android:paddingBottom="9dp"
app:layout_constraintTop_toBottomOf="@id/tv_hot_tools" />
app:layout_constraintTop_toBottomOf="@id/tv_hot_tools"
tools:itemCount="1"
tools:listitem="@layout/item_function_more" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
......
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