Fix corner radius for background
This commit is contained in:
@@ -3,11 +3,13 @@
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@color/material_blue_grey_300" />
|
||||
<corners android:radius="4dp"/>
|
||||
</shape>
|
||||
</item>
|
||||
<item android:left="8dp">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@android:color/white" />
|
||||
<corners android:bottomRightRadius="4dp" android:topRightRadius="4dp"/>
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
||||
|
||||
@@ -3,11 +3,13 @@
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@color/material_green_700" />
|
||||
<corners android:radius="4dp"/>
|
||||
</shape>
|
||||
</item>
|
||||
<item android:left="8dp">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@android:color/white" />
|
||||
<corners android:bottomRightRadius="4dp" android:topRightRadius="4dp"/>
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Based on: https://github.com/android/platform_frameworks_base/blob/505e3ab/core/res/res/layout/simple_list_item_2.xml -->
|
||||
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:ads="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/background_selectable"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:id="@+id/indicator" >
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/background_selectable"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:id="@+id/indicator">
|
||||
<LinearLayout android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
@@ -51,8 +50,8 @@
|
||||
<TextView android:id="@+id/address"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical|left"
|
||||
android:gravity="center_vertical|left"
|
||||
android:layout_gravity="center_vertical|start"
|
||||
android:gravity="center_vertical|start"
|
||||
android:layout_weight="1"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
@@ -61,8 +60,8 @@
|
||||
<TextView android:id="@+id/traffic"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical|right"
|
||||
android:gravity="center_vertical|right"
|
||||
android:layout_gravity="center_vertical|end"
|
||||
android:gravity="center_vertical|end"
|
||||
android:layout_weight="1"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
@@ -75,10 +74,9 @@
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:visibility="gone"
|
||||
ads:adSize="320x132"
|
||||
ads:adUnitId="ca-app-pub-9097031975646651/5224027521" />
|
||||
app:adSize="320x132"
|
||||
app:adUnitId="ca-app-pub-9097031975646651/5224027521" />
|
||||
</LinearLayout>
|
||||
</android.support.v7.widget.CardView>
|
||||
|
||||
@@ -66,5 +66,4 @@ class GlobalConfigFragment extends PreferenceFragment {
|
||||
progressDialog = null
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -365,10 +365,8 @@ class MainActivity extends Activity with ServiceBoundContext with Drawer.OnDrawe
|
||||
|
||||
private def displayFragment(fragment: ToolbarFragment) {
|
||||
val transaction = getFragmentManager.beginTransaction().replace(R.id.content, fragment)
|
||||
if (fragment != profilesFragment)
|
||||
transaction.addToBackStack(null).commitAllowingStateLoss()
|
||||
else
|
||||
transaction.commitAllowingStateLoss()
|
||||
if (fragment != profilesFragment) transaction.addToBackStack(null)
|
||||
transaction.commitAllowingStateLoss()
|
||||
drawer.closeDrawer()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user