Skip to content

Commit

Permalink
[49894] [49894] Modified HVAC layout to perform responsibly on tablet…
Browse files Browse the repository at this point in the history
… screen in addition to

standard smartphone sized screen.
Changed the text on activity_settings to say connect.

Signed-off-by: Barbara Harmon <[email protected]>
  • Loading branch information
Barbara Harmon committed Oct 1, 2015
1 parent e13f706 commit fe0d5ee
Show file tree
Hide file tree
Showing 4 changed files with 93 additions and 52 deletions.
5 changes: 3 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ apply plugin: 'com.android.application'

android {
compileSdkVersion 22
buildToolsVersion "21.1.2"
buildToolsVersion "22.0.1"

defaultConfig {
applicationId "com.jaguarlandrover.hvacdemo"
minSdkVersion 15
minSdkVersion 19
targetSdkVersion 22
versionCode 1
versionName "1.0"
Expand All @@ -22,6 +22,7 @@ android {
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.1.1'
compile 'com.android.support:design:22.2.0'
compile project(':rvi')
compile files('libs/gson-2.3.1.jar')
}
137 changes: 88 additions & 49 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
@@ -1,69 +1,99 @@
<!--
Copyright (c) 2015 Jaguar Land Rover.
This program is licensed under the terms and conditions of the
Mozilla Public License, version 2.0. The full text of the
Mozilla Public License is at https://www.mozilla.org/MPL/2.0/
File: activity_main.xml
Project: RVI android app
Description: HVAC page/screen for the RVI android app
Created by Lilli Szafranski and Barbara Harmon May 2015.
Edited by Barbara Harmon August 2015.
Edited by Barbara Harmon October 2015 - responsive layout.
-->


<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:layout_centerVertical="true"
android:background="#222"
android:gravity="center"
android:orientation="vertical"
android:paddingBottom="@dimen/paddingBottom"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/paddingTop"
tools:context=".MainActivity">

<ImageButton
android:id="@+id/hazard_button"
android:layout_width="wrap_content"
android:layout_height="60dp"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="3"
android:background="@null"
android:onClick="hazardButtonPressed"
android:scaleType="fitCenter"
android:scaleType="centerInside"
android:src="@drawable/hazard_off"/>

<Space
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"/>

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="@dimen/marginTop"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="2"
android:orientation="horizontal">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="15dp"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_weight="2"
android:gravity="end"
android:text="@string/hvac_left"
android:textColor="@color/orangeViv"/>

<Space
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_weight="1.5"/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="50dp"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_weight="2"
android:text="@string/hvac_right"
android:textColor="@color/orangeViv"/>

</LinearLayout>

<LinearLayout
android:id="@+id/spinner_seat_button_linear_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/hazard_button"
android:layout_centerHorizontal="true"
android:layout_gravity="center"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="7"
android:gravity="center"
android:orientation="horizontal">

<NumberPicker
android:id="@+id/left_temp_picker"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginBottom="@dimen/marginBottom"
android:layout_weight="1"
android:background="@drawable/hvac_gradient"
android:scaleY=".85"/>
android:scaleY="1.2"/>

<ImageButton
android:id="@+id/left_seat_temp_button"
android:layout_width="80dp"
android:layout_height="wrap_content"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/marginLeft"
android:layout_marginTop="@dimen/marginTop"
android:layout_weight="1"
android:background="@null"
android:onClick="seatTempButtonPressed"
android:paddingLeft="@dimen/paddingLeft"
Expand All @@ -74,10 +104,11 @@

<ImageButton
android:id="@+id/right_seat_temp_button"
android:layout_width="80dp"
android:layout_height="wrap_content"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginRight="@dimen/marginRight"
android:layout_marginTop="@dimen/marginTop"
android:layout_weight="1"
android:background="@null"
android:onClick="seatTempButtonPressed"
android:paddingLeft="@dimen/paddingLeft"
Expand All @@ -87,35 +118,42 @@

<NumberPicker
android:id="@+id/right_temp_picker"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginBottom="@dimen/marginBottom"
android:layout_weight="1"
android:background="@drawable/hvac_gradient"
android:scaleY=".85"/>
android:scaleY="1.2"/>

</LinearLayout>

<Space
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"/>

<RelativeLayout
android:id="@+id/layout_fan_slider"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/spinner_seat_button_linear_layout"
android:layout_centerInParent="true"
android:layout_height="0dp"
android:layout_gravity="center"
android:layout_marginBottom="@dimen/marginBottom"
android:layout_weight="3"
android:orientation="horizontal">

<ImageView
android:id="@+id/fan_graphic"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="30dp"
android:layout_marginLeft="50dp"
android:src="@drawable/fan"/>

<SeekBar
android:id="@+id/fan_speed_seekbar"
android:layout_width="225dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginLeft="100dp"
android:layout_marginRight="@dimen/marginRight"
android:progressBackgroundTint="#faac58"
android:progressTint="#faac58"
Expand All @@ -126,7 +164,8 @@

<GridLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="0dp"
android:layout_weight="8"
android:alignmentMode="alignBounds"
android:columnCount="5"
android:orientation="vertical"
Expand Down Expand Up @@ -155,8 +194,6 @@
<Space
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_columnSpan="3"
android:layout_row="1"
android:layout_weight="3"/>

<ImageButton
Expand Down Expand Up @@ -256,41 +293,43 @@
android:layout_weight="1"
android:adjustViewBounds="true"
android:background="@null"
android:contentDescription="@null"
android:onClick="toggleButtonPressed"
android:paddingLeft="@dimen/paddingLeft"
android:paddingRight="@dimen/paddingRight"
android:scaleType="centerInside"
android:src="@drawable/fan_dir_up_off"/>

<ImageView
android:id="@+id/logo_graphic"
<Space
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_columnSpan="3"
android:layout_marginTop="25dp"
android:layout_row="1"
android:layout_weight="3"
android:adjustViewBounds="true"
android:paddingLeft="@dimen/paddingLeft"
android:paddingRight="@dimen/paddingRight"
android:scaleType="centerInside"
android:src="@drawable/jlr_logo_color"/>
android:layout_weight="3"/>

<ImageButton
android:id="@+id/defrost_front_button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="clip_horizontal"
android:layout_weight="1"
android:adjustViewBounds="true"
android:background="@null"
android:contentDescription="@null"
android:onClick="toggleButtonPressed"
android:paddingLeft="@dimen/paddingLeft"
android:paddingRight="@dimen/paddingRight"
android:scaleType="fitCenter"
android:scaleType="centerInside"
android:src="@drawable/defrost_front_off"/>
</LinearLayout>

</GridLayout>

<ImageView
android:id="@+id/logo_graphic"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="2"
android:background="@null"
android:gravity="bottom"
android:scaleType="centerInside"
android:src="@drawable/jlr_logo_color"/>

</LinearLayout>
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
android:layout_marginRight="@dimen/marginRight"
android:background="@drawable/black_button"
android:onClick="settingsSubmitButtonClicked"
android:text="add vehicle"
android:text="connect"
android:textColor="@color/white"
android:textStyle="bold"/>

Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
<dimen name="activity_vertical_margin">16dp</dimen>
<dimen name="settings_textview_top_margin">15dp</dimen>
<dimen name="settings_proxy_entry_left_margin">20dp</dimen>

</resources>

0 comments on commit fe0d5ee

Please sign in to comment.