Commit b069b3e0 authored by Mygod's avatar Mygod

Don't setToolbar in minidrawer mode

parent 0732dd59
......@@ -70,7 +70,7 @@ class MainActivity extends Activity with ServiceBoundContext with Drawer.OnDrawe
private val handler = new Handler()
private var fab: FloatingActionButton = _
private var fabProgressCircle: FABProgressCircle = _
private var crossfader: Crossfader[CrossFadeSlidingPaneLayout] = _
var crossfader: Crossfader[CrossFadeSlidingPaneLayout] = _
var drawer: Drawer = _
private var testCount: Int = _
......
......@@ -32,9 +32,7 @@ class ToolbarFragment extends Fragment {
super.onViewCreated(view, savedInstanceState)
toolbar = view.findViewById(R.id.toolbar).asInstanceOf[Toolbar]
val activity = getActivity.asInstanceOf[MainActivity]
try activity.drawer.setToolbar(activity, toolbar, true) catch {
case _: Exception => // ignore for now
}
if (activity.crossfader == null) activity.drawer.setToolbar(activity, toolbar, true)
}
def onTrafficUpdated(txRate: Long, rxRate: Long, txTotal: Long, rxTotal: Long): Unit = ()
......
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