diff --git a/app/src/main/java/me/blog/korn123/easydiary/fragments/DailySymbolFragment.kt b/app/src/main/java/me/blog/korn123/easydiary/fragments/DailySymbolFragment.kt index 9ba90f81c..0661ebad2 100644 --- a/app/src/main/java/me/blog/korn123/easydiary/fragments/DailySymbolFragment.kt +++ b/app/src/main/java/me/blog/korn123/easydiary/fragments/DailySymbolFragment.kt @@ -4,6 +4,8 @@ import android.annotation.SuppressLint import android.app.Activity import android.content.Intent import android.os.Bundle +import android.os.Handler +import android.os.Looper import android.view.LayoutInflater import android.view.View import android.view.ViewGroup @@ -175,6 +177,7 @@ class DailySymbolFragment : Fragment() { addOnScrollListener(object : RecyclerView.OnScrollListener() { override fun onScrollStateChanged(recyclerView: RecyclerView, newState: Int) { mBinding.month.text = mDailySymbolList[(mBinding.dailyCardRecyclerView.layoutManager as LinearLayoutManager).findFirstVisibleItemPosition()].date + mBinding.dailyCardRecyclerView.minimumHeight = 0 } }) } @@ -188,7 +191,7 @@ class DailySymbolFragment : Fragment() { val dayOfMonth = SimpleDateFormat("dd", Locale.getDefault()) val dateFormat = SimpleDateFormat(DateUtils.DATE_PATTERN_DASH, Locale.getDefault()) cal.time = Date() - mBinding.month.text = cal.getDisplayName(Calendar.MONTH, Calendar.LONG, Locale.getDefault()).uppercase() + if (mBinding.month.text.isEmpty()) mBinding.month.text = cal.getDisplayName(Calendar.MONTH, Calendar.LONG, Locale.getDefault()).uppercase() mDailySymbolList.clear() for (num in 1..365) { @@ -208,6 +211,7 @@ class DailySymbolFragment : Fragment() { @SuppressLint("NotifyDataSetChanged") fun updateDailySymbol() { init365Day() + mBinding.dailyCardRecyclerView.minimumHeight = mBinding.dailyCardRecyclerView.height mDailySymbolAdapter.notifyDataSetChanged() } diff --git a/app/src/main/java/me/blog/korn123/easydiary/fragments/StockLineChartFragment.kt b/app/src/main/java/me/blog/korn123/easydiary/fragments/StockLineChartFragment.kt index 98b8868af..25479cca4 100644 --- a/app/src/main/java/me/blog/korn123/easydiary/fragments/StockLineChartFragment.kt +++ b/app/src/main/java/me/blog/korn123/easydiary/fragments/StockLineChartFragment.kt @@ -43,7 +43,7 @@ class StockLineChartFragment : androidx.fragment.app.Fragment() { ***************************************************************************************************/ private lateinit var mSDatePickerDialog: DatePickerDialog private lateinit var mEDatePickerDialog: DatePickerDialog - private val mStartCalendar = Calendar.getInstance(Locale.getDefault()).apply { add(Calendar.YEAR, -1) } + private val mStartCalendar = Calendar.getInstance(Locale.getDefault()).apply { add(Calendar.MONTH, -6) } private val mEndCalendar = Calendar.getInstance(Locale.getDefault()) private var mStartMillis = mStartCalendar.timeInMillis private var mEndMillis = 0L @@ -97,7 +97,7 @@ class StockLineChartFragment : androidx.fragment.app.Fragment() { ***************************************************************************************************/ private var mChartMode = R.id.radio_button_option_a private var mCheckedSyncMarker = true - private var mCheckedDrawCircle = false + private var mCheckedDrawCircle = true private var mCheckedDrawMarker = true private var mCheckedEvaluatePrice = true private var mCheckedPrincipalHighlight = true @@ -754,7 +754,8 @@ class StockLineChartFragment : androidx.fragment.app.Fragment() { private fun setDefaultFillChartColor(lineDataSet: LineDataSet, color: Int) { lineDataSet.run { fillColor = color - enableDashedLine(0f, 1f, 0f) + this.color = color +// enableDashedLine(3f, 1f, 0f) setDrawFilled(true) setDrawCircleHole(false) setDrawCircles(false)