summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2014-04-25 12:27:12 -0700
committerYorke Lee <yorkelee@google.com>2014-04-25 14:40:34 -0700
commit8fb6cdbffdc97351ebdfff1b20364da2a5716b7f (patch)
treec9dbcb82a120a42158e4531375ee09230eb907cb
parentcc4660d463daa11b969fd9b8bdd308ae3416c67a (diff)
Use ShapeDrawable for floating action button
Change-Id: I27089e7a2c1dcab6b3cee3235dc7b12e371c3f7b
-rw-r--r--res/drawable/floating_action_button.xml28
-rw-r--r--res/layout/dialtacts_activity.xml2
2 files changed, 29 insertions, 1 deletions
diff --git a/res/drawable/floating_action_button.xml b/res/drawable/floating_action_button.xml
new file mode 100644
index 000000000..2f77232bb
--- /dev/null
+++ b/res/drawable/floating_action_button.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2014 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<shape
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:shape="oval" >
+ <corners
+ android:radius="@dimen/floating_action_button_radius" />
+ <size
+ android:width="@dimen/floating_action_button_width"
+ android:height="@dimen/floating_action_button_height" />
+ <solid
+ android:color="@color/actionbar_background_color" />
+</shape> \ No newline at end of file
diff --git a/res/layout/dialtacts_activity.xml b/res/layout/dialtacts_activity.xml
index 172b110de..6d041034b 100644
--- a/res/layout/dialtacts_activity.xml
+++ b/res/layout/dialtacts_activity.xml
@@ -123,7 +123,7 @@
android:layout_marginRight="@dimen/floating_action_button_margin_right"
android:layout_marginBottom="@dimen/floating_action_button_margin_bottom"
android:id="@+id/floating_action_button"
- android:background="@color/actionbar_background_color"
+ android:background="@drawable/floating_action_button"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true" >
<ImageButton