File tree Expand file tree Collapse file tree
java/info/hannes/logcat/base Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ import android.os.Handler
99import android.os.Looper
1010import android.os.StrictMode
1111import android.view.*
12- import android.widget.Switch
12+ import android.widget.CompoundButton
1313import androidx.appcompat.widget.SearchView
1414import androidx.core.content.FileProvider
1515import androidx.fragment.app.Fragment
@@ -136,6 +136,7 @@ abstract class LogBaseFragment : Fragment() {
136136 searchView?.let {
137137 it.setSearchableInfo(searchManager.getSearchableInfo(activity!! .componentName))
138138 it.setIconifiedByDefault(true )
139+ it.setMaxWidth(Int .MAX_VALUE )
139140 it.setOnQueryTextListener(queryTextListener)
140141 if (currentFilter != " " ) {
141142 if (searchAutoComplete != null && searchItem != null ) {
@@ -145,7 +146,7 @@ abstract class LogBaseFragment : Fragment() {
145146 }
146147 }
147148
148- val switch = menu.findItem(R .id.menu_live).actionView as Switch
149+ val switch = menu.findItem(R .id.menu_live).actionView as CompoundButton
149150 switch.setOnCheckedChangeListener { _, isChecked ->
150151 live = isChecked
151152 if (live)
Original file line number Diff line number Diff line change 1616 android : orderInCategory =" 100"
1717 android : title =" @string/live"
1818 android : visible =" false"
19- app : actionViewClass =" android. widget.Switch "
19+ app : actionViewClass =" androidx.appcompat. widget.SwitchCompat "
2020 app : showAsAction =" always" />
2121
2222 <group
You can’t perform that action at this time.
0 commit comments