Refine the layout

This commit is contained in:
Max Lv
2016-12-20 13:54:17 +08:00
parent c87930b261
commit 406661e346
3 changed files with 9 additions and 4 deletions
+3 -3
View File
@@ -44,7 +44,7 @@
<LinearLayout android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginTop="4dp"
android:id="@+id/details">
<TextView android:id="@+id/address"
android:layout_width="match_parent"
@@ -54,7 +54,7 @@
android:layout_weight="1"
android:maxLines="1"
android:ellipsize="end"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="?android:attr/textColorSecondary"/>
<TextView android:id="@+id/traffic"
android:layout_width="match_parent"
@@ -64,7 +64,7 @@
android:layout_weight="1"
android:maxLines="1"
android:ellipsize="end"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="?android:attr/textColorSecondary"/>
</LinearLayout>
</LinearLayout>
@@ -66,4 +66,5 @@ class GlobalConfigFragment extends PreferenceFragment {
progressDialog = null
}
}
}
@@ -335,7 +335,11 @@ class MainActivity extends Activity with ServiceBoundContext with Drawer.OnDrawe
}
private def displayFragment(fragment: ToolbarFragment) {
getFragmentManager.beginTransaction().replace(R.id.content, fragment).commitAllowingStateLoss()
val transaction = getFragmentManager.beginTransaction().replace(R.id.content, fragment)
if (fragment != profilesFragment)
transaction.addToBackStack(null).commitAllowingStateLoss()
else
transaction.commitAllowingStateLoss()
drawer.closeDrawer()
}