Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preview layouts with values by using design-time layout attributes. #436

Merged
merged 1 commit into from
Jan 11, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 28 additions & 9 deletions studio/app/src/main/res/layout-land/statistics.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
Expand All @@ -24,7 +25,9 @@
android:paddingRight="10dp"
android:text="@string/stat_distance" />

<TextView android:id="@+id/stat_distance" />
<TextView
android:id="@+id/stat_distance"
tools:text="2.72 km" />
</TableRow>

<TableRow
Expand All @@ -35,7 +38,9 @@
android:paddingRight="10dp"
android:text="@string/stat_overallaveragespeed" />

<TextView android:id="@+id/stat_overallaveragespeed" />
<TextView
android:id="@+id/stat_overallaveragespeed"
tools:text="3.27 km/h" />
</TableRow>

<TableRow
Expand All @@ -46,7 +51,9 @@
android:paddingRight="10dp"
android:text="@string/stat_averagespeed" />

<TextView android:id="@+id/stat_averagespeed" />
<TextView
android:id="@+id/stat_averagespeed"
tools:text="3.27 km/h" />
</TableRow>

<TableRow
Expand All @@ -57,7 +64,9 @@
android:paddingRight="10dp"
android:text="@string/stat_maximumspeed" />

<TextView android:id="@+id/stat_maximumspeed" />
<TextView
android:id="@+id/stat_maximumspeed"
tools:text="22.50 km/h" />
</TableRow>

<TableRow
Expand All @@ -68,7 +77,9 @@
android:paddingRight="10dp"
android:text="@string/stat_waypoints" />

<TextView android:id="@+id/stat_waypoints" />
<TextView
android:id="@+id/stat_waypoints"
tools:text="269" />
</TableRow>
</TableLayout>

Expand All @@ -86,7 +97,9 @@
android:paddingRight="10dp"
android:text="@string/stat_starttime" />

<nl.sogeti.android.gpstracker.util.DateView android:id="@+id/stat_starttime" />
<nl.sogeti.android.gpstracker.util.DateView
android:id="@+id/stat_starttime"
tools:text="15:10 February 29, 2016" />
</TableRow>

<TableRow
Expand All @@ -97,7 +110,9 @@
android:paddingRight="10dp"
android:text="@string/stat_endtime" />

<nl.sogeti.android.gpstracker.util.DateView android:id="@+id/stat_endtime" />
<nl.sogeti.android.gpstracker.util.DateView
android:id="@+id/stat_endtime"
tools:text="16:00 February 29, 2016" />
</TableRow>
<!-- <TableRow -->
<!-- android:layout_width="wrap_content" -->
Expand Down Expand Up @@ -127,7 +142,9 @@
android:paddingRight="10dp"
android:text="@string/stat_elapsedtime" />

<TextView android:id="@+id/stat_elapsedtime" />
<TextView
android:id="@+id/stat_elapsedtime"
tools:text="0h:49m:54s" />
</TableRow>

<TableRow
Expand All @@ -138,7 +155,9 @@
android:paddingRight="10dp"
android:text="@string/stat_ascension" />

<TextView android:id="@+id/stat_ascension" />
<TextView
android:id="@+id/stat_ascension"
tools:text="20 meter" />
</TableRow>

</TableLayout>
Expand Down
5 changes: 4 additions & 1 deletion studio/app/src/main/res/layout/contrib.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="wrap_content">

Expand All @@ -8,5 +9,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:autoLink="web|email"
android:linksClickable="true" />
android:linksClickable="true"
tools:text="@string/dialog_contrib_message" />

</ScrollView>
4 changes: 3 additions & 1 deletion studio/app/src/main/res/layout/fragment_about.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
Expand All @@ -9,7 +10,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:layout_weight="0" />
android:layout_weight="0"
tools:text="Version 1.3.5 build 123"/>

<WebView
android:id="@+id/fragment_about_webview"
Expand Down
28 changes: 21 additions & 7 deletions studio/app/src/main/res/layout/map.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/mapScreen"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
Expand Down Expand Up @@ -59,7 +60,9 @@
android:layout_marginTop="5dp"
android:background="#80aaaaaa"
android:textColor="#000000"
android:visibility="invisible" />
android:visibility="invisible"
tools:text="22km/h"
tools:visibility="visible" />

<TextView
android:id="@+id/speedview01"
Expand All @@ -71,7 +74,9 @@
android:layout_marginTop="45dp"
android:background="#80aaaaaa"
android:textColor="#000000"
android:visibility="invisible" />
android:visibility="invisible"
tools:text="17 km/h"
tools:visibility="visible" />

<TextView
android:id="@+id/speedview02"
Expand All @@ -83,7 +88,9 @@
android:layout_marginTop="100dp"
android:background="#80aaaaaa"
android:textColor="#ff000000"
android:visibility="invisible" />
android:visibility="invisible"
tools:text="13 km/h"
tools:visibility="visible" />

<TextView
android:id="@+id/speedview03"
Expand All @@ -95,7 +102,9 @@
android:layout_marginTop="150dp"
android:background="#80aaaaaa"
android:textColor="#ff000000"
android:visibility="invisible" />
android:visibility="invisible"
tools:text="9 km/h"
tools:visibility="visible" />

<TextView
android:id="@+id/speedview04"
Expand All @@ -107,7 +116,9 @@
android:layout_marginTop="200dp"
android:background="#80aaaaaa"
android:textColor="#ff000000"
android:visibility="invisible" />
android:visibility="invisible"
tools:text="4 km/h"
tools:visibility="visible" />

<TextView
android:id="@+id/speedview05"
Expand All @@ -119,7 +130,9 @@
android:layout_marginTop="250dp"
android:background="#80aaaaaa"
android:textColor="#ff000000"
android:visibility="invisible" />
android:visibility="invisible"
tools:text="0 km/h"
tools:visibility="visible" />

<ImageView
android:id="@+id/speedbar"
Expand All @@ -130,7 +143,8 @@
android:layout_marginRight="10dp"
android:layout_marginTop="10dp"
android:src="@drawable/speedindexbar"
android:visibility="invisible" />
android:visibility="invisible"
tools:visibility="visible" />

<include layout="@layout/toolbar" />

Expand Down
4 changes: 3 additions & 1 deletion studio/app/src/main/res/layout/section_header.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<TextView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/listitem_name"
style="?android:attr/listSeparatorTextViewStyle"
android:layout_width="fill_parent"
android:layout_height="?android:attr/listPreferredItemHeight"
android:gravity="center"
android:paddingLeft="6dip"
android:paddingRight="6dip"
android:textAppearance="?android:attr/textAppearanceMedium" />
android:textAppearance="?android:attr/textAppearanceMedium"
tools:text="Local" />
6 changes: 4 additions & 2 deletions studio/app/src/main/res/layout/sharedialog.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
Expand Down Expand Up @@ -71,7 +72,8 @@
android:layout_below="@+id/TextView4"
android:clickable="true"
android:inputType="textAutoCorrect"
android:singleLine="true" />
android:singleLine="true"
tools:text="Track 2016-02-29 15:10" />

<ProgressBar
android:id="@+id/tweet_progress"
Expand All @@ -91,7 +93,7 @@
android:inputType="textAutoCorrect"
android:maxLength="140"
android:maxLines="3"
android:text="" />
tools:text="@string/tweettext" />

<ImageView
android:id="@+id/imageView"
Expand Down
37 changes: 28 additions & 9 deletions studio/app/src/main/res/layout/statistics.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
Expand All @@ -19,7 +20,9 @@
android:paddingRight="15dp"
android:text="@string/stat_distance" />

<TextView android:id="@+id/stat_distance" />
<TextView
android:id="@+id/stat_distance"
tools:text="2.72 km" />
</TableRow>

<TableRow
Expand All @@ -30,7 +33,9 @@
android:paddingRight="15dp"
android:text="@string/stat_overallaveragespeed" />

<TextView android:id="@+id/stat_overallaveragespeed" />
<TextView
android:id="@+id/stat_overallaveragespeed"
tools:text="3.27 km/h" />
</TableRow>

<TableRow
Expand All @@ -41,7 +46,9 @@
android:paddingRight="15dp"
android:text="@string/stat_averagespeed" />

<TextView android:id="@+id/stat_averagespeed" />
<TextView
android:id="@+id/stat_averagespeed"
tools:text="3.27 km/h" />
</TableRow>

<TableRow
Expand All @@ -52,7 +59,9 @@
android:paddingRight="15dp"
android:text="@string/stat_maximumspeed" />

<TextView android:id="@+id/stat_maximumspeed" />
<TextView
android:id="@+id/stat_maximumspeed"
tools:text="22.50 km/h" />
</TableRow>

<TableRow
Expand All @@ -63,7 +72,9 @@
android:paddingRight="15dp"
android:text="@string/stat_waypoints" />

<TextView android:id="@+id/stat_waypoints" />
<TextView
android:id="@+id/stat_waypoints"
tools:text="269" />
</TableRow>

<TableRow
Expand All @@ -74,7 +85,9 @@
android:paddingRight="15dp"
android:text="@string/stat_starttime" />

<nl.sogeti.android.gpstracker.util.DateView android:id="@+id/stat_starttime" />
<nl.sogeti.android.gpstracker.util.DateView
android:id="@+id/stat_starttime"
tools:text="15:10 February 29, 2016" />
</TableRow>

<TableRow
Expand All @@ -85,7 +98,9 @@
android:paddingRight="15dp"
android:text="@string/stat_endtime" />

<nl.sogeti.android.gpstracker.util.DateView android:id="@+id/stat_endtime" />
<nl.sogeti.android.gpstracker.util.DateView
android:id="@+id/stat_endtime"
tools:text="16:00 February 29, 2016" />
</TableRow>

<TableRow
Expand All @@ -96,7 +111,9 @@
android:paddingRight="15dp"
android:text="@string/stat_elapsedtime" />

<TextView android:id="@+id/stat_elapsedtime" />
<TextView
android:id="@+id/stat_elapsedtime"
tools:text="0h:49m:54s" />
</TableRow>

<TableRow
Expand All @@ -107,7 +124,9 @@
android:paddingRight="15dp"
android:text="@string/stat_ascension" />

<TextView android:id="@+id/stat_ascension" />
<TextView
android:id="@+id/stat_ascension"
tools:text="20 meter" />
</TableRow>

<nl.sogeti.android.gpstracker.actions.utils.ViewFlipper
Expand Down
Loading