properly update event list empty placeholder text color

This commit is contained in:
tibbi 2017-02-09 18:51:31 +01:00
parent e742aa8095
commit 0a5604bd30
2 changed files with 3 additions and 1 deletions

View File

@ -10,6 +10,7 @@ import com.simplemobiletools.calendar.R
import com.simplemobiletools.calendar.activities.EventActivity
import com.simplemobiletools.calendar.activities.SimpleActivity
import com.simplemobiletools.calendar.adapters.EventListAdapter
import com.simplemobiletools.calendar.extensions.config
import com.simplemobiletools.calendar.extensions.seconds
import com.simplemobiletools.calendar.helpers.DBHelper
import com.simplemobiletools.calendar.helpers.EVENT_ID
@ -87,6 +88,8 @@ class EventListFragment : Fragment(), DBHelper.GetEventsListener, DBHelper.Event
private fun checkPlaceholderVisibility() {
mView.calendar_empty_list_placeholder.beVisibleIf(mAllEvents.isEmpty())
mView.calendar_events_list.beGoneIf(mAllEvents.isEmpty())
if (activity != null)
mView.calendar_empty_list_placeholder.setTextColor(activity.config.textColor)
}
private fun editEvent(eventId: Int) {

View File

@ -21,7 +21,6 @@
android:id="@+id/calendar_empty_list_placeholder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:alpha="0.5"
android:gravity="center_horizontal"
android:lineSpacingExtra="1dp"
android:padding="@dimen/big_margin"