Skip to content

Commit

Permalink
Use android-ktx ViewGroup.forEach
Browse files Browse the repository at this point in the history
  • Loading branch information
kubode committed Feb 7, 2018
1 parent e00010a commit e7b2222
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
Expand Up @@ -22,6 +22,7 @@ import android.view.View
import android.view.ViewGroup
import android.view.inputmethod.InputMethodManager
import android.widget.TextView
import androidx.view.forEach
import com.google.firebase.analytics.FirebaseAnalytics
import com.xwray.groupie.GroupAdapter
import com.xwray.groupie.ViewHolder
Expand All @@ -39,7 +40,6 @@ import io.github.droidkaigi.confsched2018.presentation.sessions.item.SimpleSessi
import io.github.droidkaigi.confsched2018.presentation.sessions.item.SpeechSessionItem
import io.github.droidkaigi.confsched2018.util.SessionAlarm
import io.github.droidkaigi.confsched2018.util.ext.color
import io.github.droidkaigi.confsched2018.util.ext.eachChildView
import io.github.droidkaigi.confsched2018.util.ext.observe
import io.github.droidkaigi.confsched2018.util.ext.setLinearDivider
import io.github.droidkaigi.confsched2018.util.ext.toGone
Expand Down Expand Up @@ -213,7 +213,7 @@ class SearchFragment : DaggerFragment() {
}

if (view is ViewGroup) {
view.eachChildView {
view.forEach {
changeSearchViewTextColor(it)
}
}
Expand Down
Expand Up @@ -7,6 +7,7 @@ import android.support.design.widget.BottomNavigationView
import android.view.Gravity
import android.view.ViewGroup
import android.widget.FrameLayout
import androidx.view.forEach
import timber.log.Timber

@SuppressLint("RestrictedApi")
Expand All @@ -17,7 +18,7 @@ fun BottomNavigationView.disableShiftMode() {
shiftingMode.isAccessible = true
shiftingMode.setBoolean(menuView, false)
shiftingMode.isAccessible = false
menuView.eachChildView {
menuView.forEach {
val item = it as BottomNavigationItemView
// NOTE: This removing the BottomNavigationItem labels including small and large text container.
item.removeViewAt(1)
Expand Down

This file was deleted.

0 comments on commit e7b2222

Please sign in to comment.