@@ -7,19 +7,20 @@ Android custom view that displays a simple Speedometer.
7
7
8
8
The setup of the custom view should be as simple as placing this snippet in your xml layout:
9
9
10
- <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
11
- xmlns:tools="http://schemas.android.com/tools"
12
- xmlns:custom="http://schemas.android.com/apk/res/com.luminiasoft.labs.views"
13
- android:layout_width="match_parent"
14
- android:layout_height="match_parent">
15
- <com.luminiasoft.labs.views.Speedometer
16
- android:id="@+id/Speedometer"
17
- android:layout_width="wrap_content"
18
- android:layout_height="wrap_content"
19
- custom:currentSpeed="100"
20
- custom:maxSpeed="300" />
21
- </RelativeLayout>
22
-
10
+ ``` xml
11
+ <RelativeLayout xmlns : android =" http://schemas.android.com/apk/res/android"
12
+ xmlns:tools=" http://schemas.android.com/tools"
13
+ xmlns:custom=" http://schemas.android.com/apk/res/com.luminiasoft.labs.views"
14
+ android:layout_width=" match_parent"
15
+ android:layout_height=" match_parent" >
16
+ <com .luminiasoft.labs.views.Speedometer
17
+ android:id=" @+id/Speedometer"
18
+ android : layout_width =" wrap_content"
19
+ android : layout_height =" wrap_content"
20
+ custom : currentSpeed =" 100"
21
+ custom : maxSpeed =" 300" />
22
+ </RelativeLayout >
23
+ ```
23
24
24
25
Of course, don't forget to include the ` /values/attrs.xml ` file in your project for this to work.
25
26
0 commit comments