Merge remote-tracking branch 'origin/master' into personal/bkowitz/restapi-updates

This commit is contained in:
Brendan Kowitz 2017-06-09 09:48:19 -07:00
Родитель 0e53d58ba3 df84e64270
Коммит d8426e1bcd
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: F80F54DC08933A8A
79 изменённых файлов: 1294 добавлений и 656 удалений

Просмотреть файл

@ -67,7 +67,7 @@ namespace HealthVaultMobileSample.UWP.Views.Weights
//Add a custom type mapping for the Weight class so the charting library knows how to draw it
var weightConfiguration = Mappers.Xy<Weight>()
.X(dayModel => (double)dayModel.EffectiveDate.Ticks / TimeSpan.FromHours(1).Ticks)
.X(dayModel => (double)dayModel.EffectiveDate.Value.ToDateTimeUnspecified().Ticks / TimeSpan.FromHours(1).Ticks)
.Y(dayModel => (double)converter.Convert(dayModel.Value.Kilograms, typeof(double), null, null));
//Create the Series and add data

Просмотреть файл

@ -13,6 +13,8 @@ using Windows.ApplicationModel.Resources;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Input;
using NodaTime;
using Duration = NodaTime.Duration;
namespace HealthVaultMobileSample.UWP.Views.Weights
{
@ -61,11 +63,13 @@ namespace HealthVaultMobileSample.UWP.Views.Weights
}
else if (QueryTimeframe.SelectedIndex == (int)QueryTimeframeEnum.Last30d)
{
LocalDateTime localNow = SystemClock.Instance.GetCurrentInstant().InZone(DateTimeZoneProviders.Tzdb.GetSystemDefault()).LocalDateTime;
//In this mode, the app specifies a ThingQuery which can be used for functions like
//filtering, or paging through values
ThingQuery query = new ThingQuery()
ThingQuery query = new ThingQuery
{
EffectiveDateMin = DateTime.Now.AddDays(-30)
EffectiveDateMin = localNow.Minus(Period.FromDays(30))
};
Items = await thingClient.GetThingsAsync<Weight>(recordInfo.Id, query);
@ -101,9 +105,11 @@ namespace HealthVaultMobileSample.UWP.Views.Weights
kg = value;
}
LocalDateTime localNow = SystemClock.Instance.GetCurrentInstant().InZone(DateTimeZoneProviders.Tzdb.GetSystemDefault()).LocalDateTime;
List<Weight> list = new List<Weight>();
list.Add(new Weight(
new HealthServiceDateTime(DateTime.Now),
new HealthServiceDateTime(localNow),
new WeightValue(kg, new DisplayValue(value, (Units.SelectedValue as ComboBoxItem).Content.ToString()))));
HealthRecordInfo recordInfo = (await _connection.GetPersonInfoAsync()).SelectedRecord;

Просмотреть файл

@ -1,7 +1,7 @@
{
"dependencies": {
"LiveCharts.Uwp": "0.8.0",
"Microsoft.HealthVault.Client": "1.0.20517.1",
"Microsoft.HealthVault.Client": "1.0.20605.1",
"Microsoft.NETCore.UniversalWindowsPlatform": "5.3.1",
"Microsoft.Xaml.Behaviors.Uwp.Managed": "2.0.0",
"NETStandard.Library": "1.6.1",

Просмотреть файл

@ -67,16 +67,16 @@
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Microsoft.HealthVault, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.HealthVault.1.0.20517.1\lib\netstandard1.4\Microsoft.HealthVault.dll</HintPath>
<HintPath>..\packages\Microsoft.HealthVault.1.0.20605.1\lib\netstandard1.4\Microsoft.HealthVault.dll</HintPath>
</Reference>
<Reference Include="Microsoft.HealthVault.Client, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.HealthVault.Client.1.0.20517.1\lib\monoandroid\Microsoft.HealthVault.Client.dll</HintPath>
<HintPath>..\packages\Microsoft.HealthVault.Client.1.0.20605.1\lib\monoandroid\Microsoft.HealthVault.Client.dll</HintPath>
</Reference>
<Reference Include="Microsoft.HealthVault.Client.Core, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.HealthVault.Client.1.0.20517.1\lib\monoandroid\Microsoft.HealthVault.Client.Core.dll</HintPath>
<HintPath>..\packages\Microsoft.HealthVault.Client.1.0.20605.1\lib\monoandroid\Microsoft.HealthVault.Client.Core.dll</HintPath>
</Reference>
<Reference Include="Microsoft.HealthVault.RestApi, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.HealthVault.1.0.20517.1\lib\netstandard1.4\Microsoft.HealthVault.RestApi.dll</HintPath>
<HintPath>..\packages\Microsoft.HealthVault.1.0.20605.1\lib\netstandard1.4\Microsoft.HealthVault.RestApi.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Rest.ClientRuntime, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Rest.ClientRuntime.2.3.7\lib\netstandard1.4\Microsoft.Rest.ClientRuntime.dll</HintPath>
@ -90,6 +90,12 @@
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.10.0.2\lib\netstandard1.3\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="NodaTime, Version=2.0.2.0, Culture=neutral, PublicKeyToken=4226afe0d9b296d1, processorArchitecture=MSIL">
<HintPath>..\packages\NodaTime.2.0.2\lib\netstandard1.3\NodaTime.dll</HintPath>
</Reference>
<Reference Include="NodaTime.Serialization.JsonNet, Version=2.0.0.0, Culture=neutral, PublicKeyToken=4226afe0d9b296d1, processorArchitecture=MSIL">
<HintPath>..\packages\NodaTime.Serialization.JsonNet.2.0.0\lib\netstandard1.3\NodaTime.Serialization.JsonNet.dll</HintPath>
</Reference>
<Reference Include="OkHttp, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\modernhttpclient.2.4.2\lib\MonoAndroid\OkHttp.dll</HintPath>
</Reference>

Просмотреть файл

@ -10,6 +10,10 @@
<assemblyIdentity name="XLabs.Serialization" publicKeyToken="d65109b36e5040e4" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.5782.15703" newVersion="2.0.5782.15703" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="NodaTime" publicKeyToken="4226afe0d9b296d1" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.2.0" newVersion="2.0.2.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

Просмотреть файл

@ -3,14 +3,16 @@
<package id="ExifLib.PCL" version="1.0.2-pre01" targetFramework="monoandroid71" />
<package id="Grace" version="6.0.1" targetFramework="monoandroid70" />
<package id="Microsoft.CSharp" version="4.3.0" targetFramework="monoandroid70" />
<package id="Microsoft.HealthVault" version="1.0.20517.1" targetFramework="monoandroid71" />
<package id="Microsoft.HealthVault.Client" version="1.0.20517.1" targetFramework="monoandroid71" />
<package id="Microsoft.HealthVault" version="1.0.20605.1" targetFramework="monoandroid71" />
<package id="Microsoft.HealthVault.Client" version="1.0.20605.1" targetFramework="monoandroid71" />
<package id="Microsoft.NETCore.Platforms" version="1.1.0" targetFramework="monoandroid70" />
<package id="Microsoft.Rest.ClientRuntime" version="2.3.7" targetFramework="monoandroid71" />
<package id="Microsoft.Win32.Primitives" version="4.3.0" targetFramework="monoandroid70" />
<package id="modernhttpclient" version="2.4.2" targetFramework="monoandroid70" />
<package id="NETStandard.Library" version="1.6.1" targetFramework="monoandroid70" />
<package id="Newtonsoft.Json" version="10.0.2" targetFramework="monoandroid71" />
<package id="NodaTime" version="2.0.2" targetFramework="monoandroid71" />
<package id="NodaTime.Serialization.JsonNet" version="2.0.0" targetFramework="monoandroid71" />
<package id="System.AppContext" version="4.3.0" targetFramework="monoandroid70" />
<package id="System.Collections" version="4.3.0" targetFramework="monoandroid70" />
<package id="System.Collections.Concurrent" version="4.3.0" targetFramework="monoandroid70" />
@ -47,6 +49,7 @@
<package id="System.Runtime.Numerics" version="4.3.0" targetFramework="monoandroid70" />
<package id="System.Runtime.Serialization.Formatters" version="4.3.0" targetFramework="monoandroid70" />
<package id="System.Runtime.Serialization.Primitives" version="4.3.0" targetFramework="monoandroid70" />
<package id="System.Runtime.Serialization.Xml" version="4.1.1" targetFramework="monoandroid71" />
<package id="System.Security.Cryptography.Algorithms" version="4.3.0" targetFramework="monoandroid70" />
<package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="monoandroid70" />
<package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="monoandroid70" />

Просмотреть файл

@ -10,6 +10,7 @@ using Microsoft.HealthVault.Connection;
using Microsoft.HealthVault.ItemTypes;
using Microsoft.HealthVault.Person;
using Microsoft.HealthVault.Vocabulary;
using NodaTime.Extensions;
using Xamarin.Forms;
namespace HealthVault.Sample.Xamarin.Core.ViewModels
@ -115,7 +116,7 @@ namespace HealthVault.Sample.Xamarin.Core.ViewModels
IThingClient thingClient = _connection.CreateThingClient();
PersonInfo personInfo = await _connection.GetPersonInfoAsync();
await thingClient.UpdateThingsAsync(personInfo.SelectedRecord.Id, new Collection<Medication>() { medication });
await thingClient.UpdateThingsAsync(personInfo.SelectedRecord.Id, new Collection<Medication> { medication });
await NavigationService.NavigateBackAsync();
}
@ -148,7 +149,7 @@ namespace HealthVault.Sample.Xamarin.Core.ViewModels
empty = inputDateEmpty && medication.DateStarted == null;
if (!empty)
{
medication.DateStarted = new ApproximateDateTime(DateStarted);
medication.DateStarted = new ApproximateDateTime(DateStarted.ToLocalDateTime());
}
}
}

Просмотреть файл

@ -10,6 +10,7 @@ using Microsoft.HealthVault.Connection;
using Microsoft.HealthVault.ItemTypes;
using Microsoft.HealthVault.Record;
using Microsoft.HealthVault.Thing;
using NodaTime.Extensions;
using Xamarin.Forms;
namespace HealthVault.Sample.Xamarin.Core.ViewModels
@ -124,7 +125,7 @@ namespace HealthVault.Sample.Xamarin.Core.ViewModels
if (_personalInformation.BirthDate != null)
{
BirthDate = _personalInformation.BirthDate.ToDateTime();
BirthDate = _personalInformation.BirthDate.ToLocalDateTime().ToDateTimeUnspecified();
}
else
{
@ -187,7 +188,7 @@ namespace HealthVault.Sample.Xamarin.Core.ViewModels
_basicInformation.BirthYear = BirthDate.Year;
_basicInformation.Gender = GenderIndex == 0 ? Gender.Male : Gender.Female;
_personalInformation.BirthDate = new HealthServiceDateTime(BirthDate);
_personalInformation.BirthDate = new HealthServiceDateTime(BirthDate.ToLocalDateTime());
await _thingClient.UpdateThingsAsync(_recordId, new List<IThing> { _basicInformation, _personalInformation });

Просмотреть файл

@ -6,6 +6,7 @@ using HealthVault.Sample.Xamarin.Core.Services;
using Microsoft.HealthVault.Clients;
using Microsoft.HealthVault.Connection;
using Microsoft.HealthVault.ItemTypes;
using NodaTime;
using Xamarin.Forms;
namespace HealthVault.Sample.Xamarin.Core.ViewModels
@ -73,7 +74,7 @@ namespace HealthVault.Sample.Xamarin.Core.ViewModels
List<Weight> weightList = new List<Weight>();
weightList.Add(new Weight(
new HealthServiceDateTime(DateTime.Now),
new HealthServiceDateTime(SystemClock.Instance.GetCurrentInstant().InZone(DateTimeZoneProviders.Tzdb.GetSystemDefault()).LocalDateTime),
new WeightValue(kilograms, new DisplayValue(weightNumber, isMetric ? "kg" : "lbs"))));
IThingClient thingClient = _connection.CreateThingClient();

Просмотреть файл

@ -1,7 +1,7 @@
{
"supports": {},
"dependencies": {
"Microsoft.HealthVault.Client": "1.0.20517.1",
"Microsoft.HealthVault.Client": "1.0.20605.1",
"Microsoft.NETCore.Portable.Compatibility": "1.0.1",
"NETStandard.Library": "1.6.1",
"Newtonsoft.Json": "10.0.2",

Просмотреть файл

@ -1,6 +1,6 @@
{
"dependencies": {
"Microsoft.HealthVault.Client": "1.0.20517.1",
"Microsoft.HealthVault.Client": "1.0.20605.1",
"Microsoft.NETCore.UniversalWindowsPlatform": "5.3.3",
"Newtonsoft.Json": "10.0.2",
"Xamarin.Forms": "2.3.4.224",

Просмотреть файл

@ -130,16 +130,16 @@
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Microsoft.HealthVault, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.HealthVault.1.0.20517.1\lib\netstandard1.4\Microsoft.HealthVault.dll</HintPath>
<HintPath>..\packages\Microsoft.HealthVault.1.0.20605.1\lib\netstandard1.4\Microsoft.HealthVault.dll</HintPath>
</Reference>
<Reference Include="Microsoft.HealthVault.Client, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.HealthVault.Client.1.0.20517.1\lib\xamarinios\Microsoft.HealthVault.Client.dll</HintPath>
<HintPath>..\packages\Microsoft.HealthVault.Client.1.0.20605.1\lib\xamarinios\Microsoft.HealthVault.Client.dll</HintPath>
</Reference>
<Reference Include="Microsoft.HealthVault.Client.Core, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.HealthVault.Client.1.0.20517.1\lib\xamarinios\Microsoft.HealthVault.Client.Core.dll</HintPath>
<HintPath>..\packages\Microsoft.HealthVault.Client.1.0.20605.1\lib\xamarinios\Microsoft.HealthVault.Client.Core.dll</HintPath>
</Reference>
<Reference Include="Microsoft.HealthVault.RestApi, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.HealthVault.1.0.20517.1\lib\netstandard1.4\Microsoft.HealthVault.RestApi.dll</HintPath>
<HintPath>..\packages\Microsoft.HealthVault.1.0.20605.1\lib\netstandard1.4\Microsoft.HealthVault.RestApi.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Rest.ClientRuntime, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Rest.ClientRuntime.2.3.7\lib\netstandard1.4\Microsoft.Rest.ClientRuntime.dll</HintPath>
@ -150,6 +150,12 @@
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.10.0.2\lib\netstandard1.3\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="NodaTime, Version=2.0.2.0, Culture=neutral, PublicKeyToken=4226afe0d9b296d1, processorArchitecture=MSIL">
<HintPath>..\packages\NodaTime.2.0.2\lib\netstandard1.3\NodaTime.dll</HintPath>
</Reference>
<Reference Include="NodaTime.Serialization.JsonNet, Version=2.0.0.0, Culture=neutral, PublicKeyToken=4226afe0d9b296d1, processorArchitecture=MSIL">
<HintPath>..\packages\NodaTime.Serialization.JsonNet.2.0.0\lib\netstandard1.3\NodaTime.Serialization.JsonNet.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.Net.Http" />

Просмотреть файл

@ -10,6 +10,10 @@
<assemblyIdentity name="XLabs.Serialization" publicKeyToken="d65109b36e5040e4" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.5782.15703" newVersion="2.0.5782.15703" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="NodaTime" publicKeyToken="4226afe0d9b296d1" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.2.0" newVersion="2.0.2.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

Просмотреть файл

@ -3,14 +3,16 @@
<package id="ExifLib.PCL" version="1.0.2-pre01" targetFramework="xamarinios10" />
<package id="Grace" version="6.0.1" targetFramework="xamarinios10" />
<package id="Microsoft.CSharp" version="4.3.0" targetFramework="xamarinios10" />
<package id="Microsoft.HealthVault" version="1.0.20517.1" targetFramework="xamarinios10" />
<package id="Microsoft.HealthVault.Client" version="1.0.20517.1" targetFramework="xamarinios10" />
<package id="Microsoft.HealthVault" version="1.0.20605.1" targetFramework="xamarinios10" />
<package id="Microsoft.HealthVault.Client" version="1.0.20605.1" targetFramework="xamarinios10" />
<package id="Microsoft.NETCore.Platforms" version="1.1.0" targetFramework="xamarinios10" />
<package id="Microsoft.Rest.ClientRuntime" version="2.3.7" targetFramework="xamarinios10" />
<package id="Microsoft.Win32.Primitives" version="4.3.0" targetFramework="xamarinios10" />
<package id="modernhttpclient" version="2.4.2" targetFramework="xamarinios10" />
<package id="NETStandard.Library" version="1.6.1" targetFramework="xamarinios10" />
<package id="Newtonsoft.Json" version="10.0.2" targetFramework="xamarinios10" />
<package id="NodaTime" version="2.0.2" targetFramework="xamarinios10" />
<package id="NodaTime.Serialization.JsonNet" version="2.0.0" targetFramework="xamarinios10" />
<package id="System.AppContext" version="4.3.0" targetFramework="xamarinios10" />
<package id="System.Collections" version="4.3.0" targetFramework="xamarinios10" />
<package id="System.Collections.Concurrent" version="4.3.0" targetFramework="xamarinios10" />
@ -47,6 +49,7 @@
<package id="System.Runtime.Numerics" version="4.3.0" targetFramework="xamarinios10" />
<package id="System.Runtime.Serialization.Formatters" version="4.3.0" targetFramework="xamarinios10" />
<package id="System.Runtime.Serialization.Primitives" version="4.3.0" targetFramework="xamarinios10" />
<package id="System.Runtime.Serialization.Xml" version="4.1.1" targetFramework="xamarinios10" />
<package id="System.Security.Cryptography.Algorithms" version="4.3.0" targetFramework="xamarinios10" />
<package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="xamarinios10" />
<package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="xamarinios10" />

Просмотреть файл

@ -22,8 +22,8 @@
@helper ErrorMessage(Exception ex)
{
<p>
<span class="response-data-label">Response body:</span> @ex.Message</p>
<h2>Exception Message:</h2>
<p>@ex.Message</p>
MicrosoftKhronosCloudCommonErrorsErrorResponseException commonError = ex as MicrosoftKhronosCloudCommonErrorsErrorResponseException;
if (commonError != null)
@ -31,9 +31,11 @@
ErrorModel deserializeObject = JsonConvert.DeserializeObject<ErrorModel>(commonError.Response.Content);
if (deserializeObject != null)
{
<h2>Response Message:</h2>
<p>@deserializeObject.Error.Message</p>
if (deserializeObject.Error.Details != null)
{
<h2>Response Details:</h2>
<p>@deserializeObject.Error.Details</p>
}
}
@ -43,6 +45,9 @@
}
}
<h2>Stack Trace: </h2>
<pre>@ex.StackTrace</pre>
if (ex.InnerException != null)
{
@ErrorMessage(ex.InnerException)

Просмотреть файл

@ -29,7 +29,7 @@
</appSettings>
<system.web>
<authentication mode="None" />
<customErrors mode="RemoteOnly" />
<customErrors mode="On" />
<compilation debug="true" targetFramework="4.6.1" />
<httpRuntime targetFramework="4.5.2" requestValidationMode="2.0" />
<httpModules>

Просмотреть файл

@ -17,6 +17,9 @@ android {
}
}
packagingOptions {
pickFirst 'META-INF/LICENSE'
}
lintOptions {
warning 'InvalidPackage'
}
@ -24,7 +27,19 @@ android {
dependencies {
compile(name:'android-sdk-simplexml-release', ext:'aar')
compile(name:'android-sdk-restclient-release', ext:'aar')
compile group: 'io.reactivex', name: 'rxjava', version: '1.2.4'
compile group: 'com.microsoft.rest', name: 'client-runtime', version: '1.0.2'
compile group: 'de.mindpipe.android', name: 'android-logging-log4j', version: '1.0.3'
compile group: 'log4j', name: 'log4j', version: '1.2.17'
compile 'com.squareup.retrofit2:retrofit:2.2.0'
compile 'com.squareup.retrofit2:converter-gson:2.2.0'
compile 'com.jjoe64:graphview:4.2.1'
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
compile ('org.simpleframework:simple-xml:2.7.1') {
exclude group: 'xpp3', module: 'xpp3'
exclude group: 'stax', module: 'stax-api'
exclude group: 'stax', module: 'stax'
}
}

Двоичный файл не отображается.

Двоичный файл не отображается.

Просмотреть файл

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.microsoft.hsg.android.hvsample"
xmlns:tools="http://schemas.android.com/tools"
android:versionCode="1"
android:versionName="1.0" >
@ -12,7 +13,8 @@
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
tools:replace="android:icon"
android:icon="@drawable/app_icon"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
@ -25,11 +27,12 @@
</activity>
<activity android:name="com.microsoft.hsg.android.simplexml.ShellActivity" >
</activity>
<activity android:name="AddMedicationActivity"></activity>
<activity android:name="WeightActivity"></activity>
<activity android:name="ProfileActivity"></activity>
<activity android:name="RecordPickerActivity"></activity>
<activity android:name="MainMedicationActivity"></activity>
<activity android:name="AddMedicationActivity"></activity>
<activity android:name="ActionPlanActivity"></activity>
<provider
android:name="com.microsoft.hsg.android.simplexml.store.HVContentProvider"
android:authorities="com.microsoft.hsg.android.store"

Просмотреть файл

@ -0,0 +1,143 @@
package com.microsoft.hsg.android.hvsample;
import java.util.ArrayList;
import java.util.List;
import java.util.Observable;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import com.microsoft.hsg.Connection;
import com.microsoft.hsg.HVException;
import com.microsoft.hsg.android.simplexml.HealthVaultApp;
import com.microsoft.hsg.android.simplexml.HealthVaultSettings;
import com.microsoft.hsg.android.simplexml.ShellActivity;
import com.microsoft.hsg.android.simplexml.client.HealthVaultClient;
import com.microsoft.hsg.android.simplexml.client.HealthVaultRestClient;
import com.microsoft.hsg.android.simplexml.client.RequestCallback;
import com.microsoft.hsg.android.simplexml.methods.getthings3.request.ThingRequestGroup2;
import com.microsoft.hsg.android.simplexml.methods.getthings3.response.ThingResponseGroup2;
import com.microsoft.hsg.android.simplexml.things.thing.Thing2;
import com.microsoft.hsg.android.simplexml.things.types.types.PersonInfo;
import com.microsoft.hsg.android.simplexml.things.types.types.Record;
import com.microsoft.hsg.android.simplexml.things.types.weight.Weight;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.Window;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ListView;
import android.widget.Spinner;
import android.widget.TextView;
import android.widget.Toast;
import android.widget.AdapterView.OnItemSelectedListener;
import healthvault.client.implementation.MicrosoftHealthVaultRestApiImpl;
import healthvault.client.models.ActionPlan;
import healthvault.client.models.ActionPlanInstance;
import healthvault.client.models.ActionPlansResponseActionPlanInstance;
import healthvault.client.models.Objective;
import okhttp3.ResponseBody;
import retrofit2.Response;
import rx.Subscriber;
import rx.Subscription;
import rx.schedulers.Schedulers;
public class ActionPlanActivity extends Activity {
private HealthVaultApp mService;
private HealthVaultClient mClient;
private Record mCurrentRecord;
private static ActionPlansResponseActionPlanInstance mActionPlanInstance;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_actionplan);
mService = HealthVaultApp.getInstance();
mClient = new HealthVaultClient();
if (mService.isAppConnected()) {
mCurrentRecord = HealthVaultApp.getInstance().getCurrentRecord();
getActionPlan();
}
setTitle("Action plan sample");
}
@Override
protected void onStart() {
super.onStart();
mClient.start();
}
@Override
protected void onStop() {
mClient.stop();
super.onStop();
}
@SuppressWarnings("unchecked")
private void getActionPlan() {
mService.getSettings().setRestUrl("https://data.ppe.microsofthealth.net/");
HealthVaultSettings settings = mService.getSettings();
Connection connection = mService.getConnection();
final MicrosoftHealthVaultRestApiImpl restClient = new HealthVaultRestClient(settings, connection, mCurrentRecord).getClient();
restClient.getActionPlansAsync()
.subscribeOn(Schedulers.io())
.observeOn(Schedulers.io())
.subscribe(new Subscriber<Object>() {
@Override
public final void onCompleted() {
}
@Override
public final void onError(final Throwable e) {
Log.e("error", e.getMessage());
}
@Override
public final void onNext(final Object response) {
mActionPlanInstance = (ActionPlansResponseActionPlanInstance) response;
}
});
renderActionPlans();
}
private void renderActionPlans() {
if (mActionPlanInstance != null) {
ActionPlanInstance plan = mActionPlanInstance.plans().get(0);
TextView planName = (TextView) findViewById(R.id.actionplan_name);
TextView planDescription = (TextView) findViewById(R.id.actionplan_description);
TextView objectiveName = (TextView) findViewById(R.id.objective_name);
TextView objectiveDescription = (TextView) findViewById(R.id.objective_description);
TextView taskName = (TextView) findViewById(R.id.task_name);
TextView taskDescription = (TextView) findViewById(R.id.task_description);
planName.setText(plan.name().toString());
planDescription.setText("HealthVault Mobile App Sample");
objectiveName.setText(plan.objectives().get(0).name());
objectiveDescription.setText(plan.objectives().get(0).description());
taskName.setText(plan.associatedTasks().get(0).name());
taskDescription.setText(plan.associatedTasks().get(0).shortDescription());
} else {
Toast.makeText(ActionPlanActivity.this, "No Action plans!", Toast.LENGTH_SHORT).show();
}
}
}

Просмотреть файл

@ -13,6 +13,7 @@ import com.microsoft.hsg.android.simplexml.client.RequestCallback;
import com.microsoft.hsg.android.simplexml.methods.getthings3.request.ThingRequestGroup2;
import com.microsoft.hsg.android.simplexml.methods.getthings3.response.ThingResponseGroup2;
import com.microsoft.hsg.android.simplexml.things.thing.Thing2;
import com.microsoft.hsg.android.simplexml.things.types.medication.Medication;
import com.microsoft.hsg.android.simplexml.things.types.types.PersonInfo;
import com.microsoft.hsg.android.simplexml.things.types.types.Record;
import com.microsoft.hsg.android.simplexml.things.types.weight.Weight;
@ -27,6 +28,7 @@ import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.Spinner;
import android.widget.TextView;
@ -34,11 +36,98 @@ import android.widget.Toast;
import android.widget.AdapterView.OnItemSelectedListener;
public class AddMedicationActivity extends Activity {
private HealthVaultApp mService;
private HealthVaultClient mHVClient;
private Record mCurrentRecord;
private int mIndex = 0;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.add_medication);
mService = HealthVaultApp.getInstance();
mHVClient = new HealthVaultClient();
mCurrentRecord = HealthVaultApp.getInstance().getCurrentRecord();
setTitle("Add medication Sample");
Intent mIntent = getIntent();
mIndex = mIntent.getIntExtra(Constants.IndexParameter, 0);
setTitle("Medication details sample");
}
@Override
protected void onResume() {
super.onResume();
mHVClient.start();
displayMedication();
}
@Override
protected void onPause() {
mHVClient.stop();
super.onPause();
}
private void displayMedication() {
mHVClient.asyncRequest(mCurrentRecord.getThingsAsync(ThingRequestGroup2.thingTypeQuery(Medication.ThingType)),
new medicationRecordCallback());
}
private void renderMedicationRecord(List<Thing2> things) {
if(!things.isEmpty()) {
Medication meds = (Medication) things.get(mIndex).getDataXml().getAny().getThing().getData();
TextView medsName = (TextView) findViewById(R.id.name_text);
TextView strength = (TextView) findViewById(R.id.strength_text);
TextView dosage = (TextView) findViewById(R.id.dosagetype_text);
TextView often = (TextView) findViewById(R.id.howoften_text);
TextView taken = (TextView) findViewById(R.id.howtaken_text);
TextView reason = (TextView) findViewById(R.id.reason_text);
TextView dateStarted = (TextView) findViewById(R.id.datestarted_text);
medsName.setText(meds.getName().getText());
strength.setText(meds.getStrength().getDisplay());
dosage.setText(meds.getDose().getDisplay());
if(meds.getFrequency() != null) {
often.setText(meds.getFrequency().getDisplay().toString());
}
if (meds.getRoute() != null) {
taken.setText(meds.getRoute().getText());
}
if (meds.getIndication() != null) {
reason.setText(meds.getIndication().getText());
}
if (meds.getDateStarted() != null) {
final String monthStart = String.valueOf(meds.getDateStarted().getStructured().getDate().getM());
final String dayStart = String.valueOf(meds.getDateStarted().getStructured().getDate().getD());
final String yearStart = String.valueOf(meds.getDateStarted().getStructured().getDate().getY());
final String prescribed = String.format(monthStart + "/" + dayStart + "/" + yearStart);
dateStarted.setText(prescribed);
}
} else {
Toast.makeText(AddMedicationActivity.this, "Unable to get medication with this index!", Toast.LENGTH_SHORT).show();
}
}
public class medicationRecordCallback<Object> implements RequestCallback {
public medicationRecordCallback() {
}
@Override
public void onError(HVException exception) {
Toast.makeText(AddMedicationActivity.this, String.format("An error occurred. " + exception.getMessage()), Toast.LENGTH_SHORT).show();
}
@Override
public void onSuccess(java.lang.Object obj) {
renderMedicationRecord(((ThingResponseGroup2)obj).getThing());
}
}
}

Просмотреть файл

@ -0,0 +1,5 @@
package com.microsoft.hsg.android.hvsample;
public class Constants {
public static final String IndexParameter = "index";
}

Просмотреть файл

@ -38,7 +38,7 @@ public class MainActivity extends ListActivity implements HealthVaultInitializat
private HealthVaultApp mService;
private HealthVaultClient mHVClient;
private BottomNavigationView mBottomNav;
private static final String mMasterAppId = "c6ba979f-c342-4408-a2bc-0dfb43b2bf8d";
private static final String mMasterAppId = "e92b8605-ad54-4d48-829f-1a5f1dfbe40f";
private static final String mServiceUrl = "https://platform.healthvault-ppe.com/platform/wildcat.ashx";
private static final String mShellUrl = "https://account.healthvault-ppe.com";
private ProgressDialog mConnectProgressDialog;
@ -55,7 +55,7 @@ public class MainActivity extends ListActivity implements HealthVaultInitializat
mHVClient = new HealthVaultClient();
final LinearLayout weightTile = (LinearLayout) findViewById(R.id.weight_tile);
final RelativeLayout weightTile = (RelativeLayout) findViewById(R.id.weight_tile);
weightTile.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
@ -67,7 +67,7 @@ public class MainActivity extends ListActivity implements HealthVaultInitializat
}
});
LinearLayout profileTile = (LinearLayout) findViewById(R.id.profile_tile);
final RelativeLayout profileTile = (RelativeLayout) findViewById(R.id.profile_tile);
profileTile.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View view) {
@ -79,17 +79,29 @@ public class MainActivity extends ListActivity implements HealthVaultInitializat
}
});
LinearLayout addMeddicationTile = (LinearLayout) findViewById(R.id.medication_tile);
addMeddicationTile.setOnClickListener(new View.OnClickListener(){
final RelativeLayout meddicationTile = (RelativeLayout) findViewById(R.id.medication_tile);
meddicationTile.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View view) {
if (mService.isAppConnected()) {
startActivity(new Intent(MainActivity.this, AddMedicationActivity.class));
startActivity(new Intent(MainActivity.this, MainMedicationActivity.class));
} else {
Toast.makeText(MainActivity.this, "Please connect to HV from Setting menu!", Toast.LENGTH_SHORT).show();
}
}
});
final RelativeLayout actionPlanTile = (RelativeLayout) findViewById(R.id.actionplan_tile);
actionPlanTile.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View view) {
if (mService.isAppConnected()) {
startActivity(new Intent(MainActivity.this, ActionPlanActivity.class));
} else {
Toast.makeText(MainActivity.this, "Please connect to HV from Setting menu!", Toast.LENGTH_SHORT).show();
}
}
});
}
@Override
@ -173,7 +185,10 @@ public class MainActivity extends ListActivity implements HealthVaultInitializat
intent = new Intent(MainActivity.this, ProfileActivity.class);
break;
case 2:
intent = new Intent(MainActivity.this, AddMedicationActivity.class);
intent = new Intent(MainActivity.this, MainMedicationActivity.class);
break;
case 3:
intent = new Intent(MainActivity.this, ActionPlanActivity.class);
break;
}
} if(intent != null) {

Просмотреть файл

@ -0,0 +1,148 @@
package com.microsoft.hsg.android.hvsample;
import android.app.Activity;
import android.os.Bundle;
import android.support.annotation.Nullable;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Callable;
import com.microsoft.hsg.HVException;
import com.microsoft.hsg.android.simplexml.HealthVaultApp;
import com.microsoft.hsg.android.simplexml.ShellActivity;
import com.microsoft.hsg.android.simplexml.client.HealthVaultClient;
import com.microsoft.hsg.android.simplexml.client.RequestCallback;
import com.microsoft.hsg.android.simplexml.methods.getthings3.request.ThingRequestGroup2;
import com.microsoft.hsg.android.simplexml.methods.getthings3.response.ThingResponseGroup2;
import com.microsoft.hsg.android.simplexml.things.thing.Thing2;
import com.microsoft.hsg.android.simplexml.things.types.medication.Medication;
import com.microsoft.hsg.android.simplexml.things.types.types.PersonInfo;
import com.microsoft.hsg.android.simplexml.things.types.types.Record;
import com.microsoft.hsg.android.simplexml.things.types.weight.Weight;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;
import android.view.Window;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.RelativeLayout;
import android.widget.Spinner;
import android.widget.TextView;
import android.widget.Toast;
import android.widget.AdapterView.OnItemSelectedListener;
public class MainMedicationActivity extends Activity {
private HealthVaultApp mService;
private HealthVaultClient mHVClient;
private Record mCurrentRecord;
private static final String mCurrentMeds = "Current medications";
private static final String mPastMeds = "Past medications";
private static final int mIndex = 0;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.medication_main);
mService = HealthVaultApp.getInstance();
mHVClient = new HealthVaultClient();
mCurrentRecord = HealthVaultApp.getInstance().getCurrentRecord();
LinearLayout addMeddicationTile = (LinearLayout) findViewById(R.id.medication_layout);
addMeddicationTile.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View view) {
if (mService.isAppConnected()) {
Intent myIntent = new Intent(MainMedicationActivity.this, AddMedicationActivity.class);
myIntent.putExtra(Constants.IndexParameter, mIndex);
startActivity(myIntent);
} else {
Toast.makeText(MainMedicationActivity.this, "Please connect to HV from Setting menu!", Toast.LENGTH_SHORT).show();
}
}
});
setTitle("Medication sample");
}
@Override
protected void onResume() {
super.onResume();
mHVClient.start();
getMedications();
}
@Override
protected void onPause() {
mHVClient.stop();
super.onPause();
}
private void getMedications() {
mHVClient.asyncRequest(mCurrentRecord.getThingsAsync(ThingRequestGroup2.thingTypeQuery(Medication.ThingType)),
new MedicationCallback());
}
private void renderMedications(List<Thing2> things) {
if(!things.isEmpty()) {
Medication meds = (Medication) things.get(mIndex).getDataXml().getAny().getThing().getData();
TextView medicationTitle = (TextView) findViewById(R.id.medication_title);
TextView medsName = (TextView) findViewById(R.id.medication_name);
TextView dosage = (TextView) findViewById(R.id.dosage_strength);
TextView prescribe = (TextView) findViewById(R.id.prescribed_date);
final String dose = meds.getDose().getDisplay().toString();
final String strength = meds.getStrength().getDisplay();
final String name = meds.getName().getText();
medsName.setText(name);
dosage.setText(dose + ", " + strength);
if (meds.getDateDiscontinued() == null) {
medicationTitle.setText(mCurrentMeds);
} else {
medicationTitle.setText(mPastMeds);
final String monthStart = String.valueOf(meds.getDateStarted().getStructured().getDate().getM());
final String dayStart = String.valueOf(meds.getDateStarted().getStructured().getDate().getD());
final String yearStart = String.valueOf(meds.getDateStarted().getStructured().getDate().getY());
final String prescribed = String.format("prescribed: " + monthStart + "/" + dayStart + "/" + yearStart);
String expired = "";
if (meds.getDateDiscontinued() != null) {
final String monthEnd = String.valueOf(meds.getDateStarted().getStructured().getDate().getM());
final String dayEnd = String.valueOf(meds.getDateStarted().getStructured().getDate().getD());
final String yearEnd = String.valueOf(meds.getDateStarted().getStructured().getDate().getY());
expired = String.format("Expired: " + monthEnd + "/" + dayEnd + "/" + yearEnd);
}
prescribe.setText(prescribed + " " + expired);
}
} else {
Toast.makeText(MainMedicationActivity.this, "Currently there are no medications entered for user!", Toast.LENGTH_SHORT).show();
}
}
public class MedicationCallback<Object> implements RequestCallback {
public MedicationCallback() {
}
@Override
public void onError(HVException exception) {
Toast.makeText(MainMedicationActivity.this, String.format("An error occurred. " + exception.getMessage()), Toast.LENGTH_SHORT).show();
}
@Override
public void onSuccess(java.lang.Object obj) {
renderMedications(((ThingResponseGroup2)obj).getThing());
}
}
}

Просмотреть файл

@ -13,6 +13,8 @@ import com.microsoft.hsg.android.simplexml.client.RequestCallback;
import com.microsoft.hsg.android.simplexml.methods.getthings3.request.ThingRequestGroup2;
import com.microsoft.hsg.android.simplexml.methods.getthings3.response.ThingResponseGroup2;
import com.microsoft.hsg.android.simplexml.things.thing.Thing2;
import com.microsoft.hsg.android.simplexml.things.types.medication.Medication;
import com.microsoft.hsg.android.simplexml.things.types.personal.PersonalDemographics;
import com.microsoft.hsg.android.simplexml.things.types.types.PersonInfo;
import com.microsoft.hsg.android.simplexml.things.types.types.Record;
import com.microsoft.hsg.android.simplexml.things.types.weight.Weight;
@ -27,6 +29,7 @@ import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.Spinner;
import android.widget.TextView;
@ -34,11 +37,73 @@ import android.widget.Toast;
import android.widget.AdapterView.OnItemSelectedListener;
public class ProfileActivity extends Activity {
private HealthVaultApp mService;
private HealthVaultClient mHVClient;
private Record mCurrentRecord;
private PersonalImageLoader mImageLoader;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.profile);
mService = HealthVaultApp.getInstance();
mHVClient = new HealthVaultClient();
mImageLoader = new PersonalImageLoader(this, mHVClient);
setTitle("Profile Sample");
}
private void populateProfile(List<Thing2> things) {
PersonalDemographics personalDemographics = (PersonalDemographics) things.get(0).getDataXml().getAny().getThing().getData();
final EditText firstNameEditText = (EditText) findViewById(R.id.first_name_text);
final EditText secondtNameEditText = (EditText) findViewById(R.id.last_name_text);
final EditText countryEditText = (EditText) findViewById(R.id.country_text);
final EditText monthEditText = (EditText) findViewById(R.id.birth_month_text);
final EditText yearEditText = (EditText) findViewById(R.id.birth_year_text);
final EditText genderEditText = (EditText) findViewById(R.id.gender_text);
ImageView imageView = (ImageView) findViewById(R.id.profileImage);
mImageLoader.load(mCurrentRecord.getId(), imageView, R.drawable.record_image_placeholder);
firstNameEditText.setText(personalDemographics.getName().getFirst());
secondtNameEditText.setText(personalDemographics.getName().getLast());
countryEditText.setText(mCurrentRecord.getLocationCountry());
String birthMonth = String.valueOf(personalDemographics.getBirthdate().getDate().getM());
String birthYear = String.valueOf(personalDemographics.getBirthdate().getDate().getY());
monthEditText.setText(birthMonth);
yearEditText.setText(birthYear);
genderEditText.setText("male");
}
@Override
protected void onResume() {
super.onResume();
mHVClient.start();
mCurrentRecord = HealthVaultApp.getInstance().getCurrentRecord();
mHVClient.asyncRequest(mCurrentRecord.getThingsAsync(ThingRequestGroup2.thingTypeQuery(PersonalDemographics.ThingType)),
new ProfileActivity.ProfileCallback());
}
@Override
protected void onPause() {
mHVClient.stop();
super.onPause();
}
public class ProfileCallback<Object> implements RequestCallback {
public ProfileCallback() {
}
@Override
public void onError(HVException exception) {
Toast.makeText(ProfileActivity.this, String.format("An error occurred. " + exception.getMessage()), Toast.LENGTH_LONG).show();
}
@Override
public void onSuccess(java.lang.Object obj) {
populateProfile(((ThingResponseGroup2)obj).getThing());
}
}
}

Просмотреть файл

@ -15,6 +15,7 @@ import com.microsoft.hsg.android.simplexml.client.RequestCallback;
import com.microsoft.hsg.android.simplexml.methods.getthings3.request.ThingRequestGroup2;
import com.microsoft.hsg.android.simplexml.methods.getthings3.response.ThingResponseGroup2;
import com.microsoft.hsg.android.simplexml.things.thing.Thing2;
import com.microsoft.hsg.android.simplexml.things.types.medication.Medication;
import com.microsoft.hsg.android.simplexml.things.types.types.PersonInfo;
import com.microsoft.hsg.android.simplexml.things.types.types.Record;
import com.microsoft.hsg.android.simplexml.things.types.weight.Weight;
@ -51,6 +52,8 @@ public class WeightActivity extends Activity {
mService = HealthVaultApp.getInstance();
mHVClient = new HealthVaultClient();
mCurrentRecord = HealthVaultApp.getInstance().getCurrentRecord();
Button weightsBtn = (Button) findViewById(R.id.add_weight);
final EditText editText = (EditText) findViewById(R.id.weight_input);
@ -79,7 +82,6 @@ public class WeightActivity extends Activity {
protected void onResume() {
super.onResume();
mHVClient.start();
mCurrentRecord = HealthVaultApp.getInstance().getCurrentRecord();
getWeights();
}
@ -122,7 +124,8 @@ public class WeightActivity extends Activity {
final int day = weight.getWhen().getDate().getD();
final int year = weight.getWhen().getDate().getY();
mAdapter.add(String.valueOf(String.format(month + "/" + day + "/" + year)
+ " " + String.valueOf(weight.getValue().getKg())));
+ " " +
String.valueOf(weight.getValue().getKg().shortValue())));
// Populate the weight chart data points
DataPoint dataPoint = new DataPoint(xPoint, weight.getValue().getKg().intValue());

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 2.4 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.5 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 757 B

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.5 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 862 B

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.7 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 5.6 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 430 B

После

Ширина:  |  Высота:  |  Размер: 865 B

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.4 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.1 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 757 B

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 980 B

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 862 B

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.0 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 2.6 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 430 B

После

Ширина:  |  Высота:  |  Размер: 462 B

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 3.7 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 2.6 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 1.7 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 2.1 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 1.6 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.9 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 9.2 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 801 B

После

Ширина:  |  Высота:  |  Размер: 930 B

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 4.6 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 4.8 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 2.5 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 3.4 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 2.4 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 2.1 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 20 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 1.2 KiB

После

Ширина:  |  Высота:  |  Размер: 2.0 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 11 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 6.6 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 5.4 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 2.5 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 34 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.4 KiB

Просмотреть файл

@ -0,0 +1,103 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#e3e3e3"
android:id="@+id/actionplan_layout">
<RelativeLayout
android:id="@+id/actionplan_container"
android:layout_width="match_parent"
android:layout_height="@dimen/actionplan_height_xxlarge"
android:layout_marginLeft="@dimen/horizontal_margin_small"
android:layout_marginRight="@dimen/horizontal_margin_small"
android:layout_marginEnd="@dimen/horizontal_margin_small"
android:background="@color/white">
<TextView
android:id="@+id/actionplan_name"
android:layout_width="217dp"
android:layout_height="@dimen/actionplan_height_medium"
android:layout_marginTop="@dimen/vertical_margin_medium"
android:layout_marginLeft="@dimen/horizontal_margin_medium"
android:textStyle="bold"
android:textColor="@color/pine_green"/>
<TextView
android:id="@+id/actionplan_description"
android:layout_width="250dp"
android:layout_height="@dimen/main_page_height_large"
android:layout_marginLeft="@dimen/horizontal_margin_medium"
android:layout_below="@+id/actionplan_name"/>
</RelativeLayout>
<TextView
android:id="@+id/objectives"
android:layout_width="match_parent"
android:layout_height="@dimen/medication_main_height"
android:layout_marginTop="@dimen/vertical_margin_medium"
android:layout_marginLeft="@dimen/horizontal_margin_medium"
android:textSize="@dimen/medication_name_text_size"
android:text="@string/objectives_label"
android:textColor="@color/pine_green"/>
<RelativeLayout
android:id="@+id/objectives_container"
android:layout_width="match_parent"
android:layout_height="@dimen/actionplan_height_xxlarge"
android:layout_marginTop="@dimen/vertical_margin_small"
android:layout_marginLeft="@dimen/horizontal_margin_medium"
android:layout_marginRight="@dimen/horizontal_margin_small"
android:layout_marginEnd="@dimen/horizontal_margin_small"
android:background="@color/white">
<TextView
android:id="@+id/objective_name"
android:layout_width="217dp"
android:layout_height="@dimen/actionplan_height_medium"
android:layout_marginTop="@dimen/vertical_margin_medium"
android:layout_marginLeft="@dimen/horizontal_margin_medium"
android:textStyle="bold"
android:textColor="@color/pine_green"/>
<TextView
android:id="@+id/objective_description"
android:layout_width="217dp"
android:layout_height="@dimen/main_page_height_large"
android:layout_marginLeft="@dimen/horizontal_margin_medium"
android:layout_below="@+id/objective_name"/>
</RelativeLayout>
<!-- Tasks-->
<TextView
android:id="@+id/tasks"
android:layout_width="match_parent"
android:layout_height="@dimen/medication_main_height"
android:layout_marginTop="@dimen/vertical_margin_medium"
android:layout_marginLeft="@dimen/horizontal_margin_medium"
android:textSize="@dimen/medication_name_text_size"
android:text="@string/tasks_label"
android:textColor="@color/pine_green"/>
<RelativeLayout
android:id="@+id/tasks_container"
android:layout_width="match_parent"
android:layout_height="@dimen/actionplan_height_xxlarge"
android:layout_marginTop="@dimen/vertical_margin_small"
android:layout_marginLeft="@dimen/horizontal_margin_small"
android:layout_marginRight="@dimen/horizontal_margin_small"
android:layout_marginEnd="@dimen/horizontal_margin_small"
android:background="@color/white">
<TextView
android:id="@+id/task_name"
android:layout_width="250dp"
android:layout_height="@dimen/actionplan_height_medium"
android:layout_marginTop="@dimen/vertical_margin_medium"
android:layout_marginLeft="@dimen/horizontal_margin_medium"
android:textStyle="bold"
android:textColor="@color/pine_green"/>
<TextView
android:id="@+id/task_description"
android:layout_width="250dp"
android:layout_height="@dimen/main_page_height_large"
android:layout_marginLeft="@dimen/horizontal_margin_medium"
android:layout_below="@+id/task_name"/>
</RelativeLayout>
</LinearLayout >

Просмотреть файл

@ -7,214 +7,234 @@
android:orientation="vertical"
tools:context=".MainActivity">
<LinearLayout
<RelativeLayout
android:id="@+id/actionplan_tile"
android:layout_width="match_parent"
android:layout_height="@dimen/height_88dp"
android:layout_marginTop="@dimen/margin_10dp"
android:layout_marginLeft="@dimen/margin_10dp"
android:layout_marginRight="@dimen/margin_10dp"
android:layout_marginEnd="@dimen/margin_10dp"
android:background="@color/white"
android:orientation="horizontal"
android:weightSum="1">
<LinearLayout
android:layout_width="@dimen/width_64dp"
android:layout_height="@dimen/height_64dp"
android:layout_marginTop="@dimen/margin_12dp"
android:layout_marginLeft="@dimen/margin_12dp"
android:layout_height="@dimen/actionplan_height_xxlarge"
android:layout_marginTop="@dimen/vertical_margin_small"
android:layout_marginLeft="@dimen/horizontal_margin_small"
android:layout_marginRight="@dimen/horizontal_margin_small"
android:layout_marginEnd="@dimen/horizontal_margin_small"
android:background="@color/white">
<FrameLayout
android:id="@+id/actionplan_imageview_container"
android:layout_width="@dimen/main_page_width_large"
android:layout_height="@dimen/actionplan_height_xlarge"
android:layout_marginTop="@dimen/main_page_vertical_margin"
android:layout_marginLeft="@dimen/main_page_horizontal_margin"
android:background="@drawable/circle_background_actionplan">
<ImageView
android:id="@+id/actionplan_imageview"
android:layout_width="@dimen/width_24dp"
android:layout_height="@dimen/height_28dp"
android:layout_marginLeft="@dimen/marginleft_20dp"
android:layout_marginTop="@dimen/margintop_20dp"
android:src="@drawable/habits_icon_selected"/>
</LinearLayout>
<LinearLayout
android:layout_width="@dimen/main_page_width_medium"
android:layout_height="@dimen/main_page_height_medium"
android:layout_marginLeft="@dimen/horizontal_margin_medium"
android:layout_marginTop="@dimen/vertical_margin_medium"
android:src="@drawable/habits_icon"/>
</FrameLayout>
<TextView
android:id="@+id/actionplan_title"
android:layout_width="217dp"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/margin_12dp"
android:orientation="vertical">
<TextView
android:id="@+id/actionplan_title"
android:layout_width="match_parent"
android:layout_height="@dimen/height_20dp"
android:layout_marginTop="@dimen/margintop_20dp"
android:textStyle="bold"
android:text="@string/actionplan_title"/>
<TextView
android:id="@+id/actionplan_subtitle"
android:layout_height="@dimen/actionplan_height_medium"
android:layout_marginTop="@dimen/vertical_margin_medium"
android:layout_marginLeft="12dp"
android:layout_toRightOf="@+id/actionplan_imageview_container"
android:textStyle="bold"
android:text="@string/actionplan_title"/>
<TextView
android:id="@+id/actionplan_subtitle"
android:layout_width="217dp"
android:layout_height="@dimen/main_page_height_large"
android:layout_marginLeft="12dp"
android:layout_toRightOf="@+id/actionplan_imageview_container"
android:layout_below="@+id/actionplan_title"
android:text="@string/actionplan_subtitle"/>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_toRightOf="@+id/actionplan_subtitle">
<ImageView
android:layout_width="wrap_content"
android:layout_height="@dimen/height_35dp"
android:text="@string/actionplan_subtitle"/>
</LinearLayout>
<ImageView
android:layout_width="wrap_content"
android:layout_height="@dimen/height_35dp"
android:layout_marginTop="@dimen/margin_30dp"
android:layout_marginLeft="@dimen/margin_14dp"
android:src="@drawable/disclosure_icon"/>
</LinearLayout>
<LinearLayout
android:layout_height="@dimen/main_page_height_large"
android:layout_marginTop="@dimen/disclosure_image_vertical_margin"
android:src="@drawable/disclosure_icon"/>
</FrameLayout>
</RelativeLayout>
<RelativeLayout
android:id="@+id/medication_tile"
android:layout_width="match_parent"
android:layout_height="@dimen/height_88dp"
android:layout_marginTop="@dimen/margin_10dp"
android:layout_marginLeft="@dimen/margin_10dp"
android:layout_marginRight="@dimen/margin_10dp"
android:layout_marginEnd="@dimen/margin_10dp"
android:layout_height="@dimen/actionplan_height_xxlarge"
android:layout_marginEnd="@dimen/horizontal_margin_small"
android:layout_marginLeft="20dp"
android:layout_marginRight="@dimen/horizontal_margin_small"
android:layout_marginTop="@dimen/vertical_margin_small"
android:background="@color/white"
android:orientation="horizontal"
android:weightSum="1">
<LinearLayout
android:layout_width="@dimen/width_64dp"
android:layout_height="@dimen/height_64dp"
android:layout_marginTop="@dimen/margin_12dp"
android:layout_marginLeft="@dimen/margin_12dp"
<FrameLayout
android:id="@+id/medication_imageview_container"
android:layout_width="@dimen/main_page_width_large"
android:layout_height="@dimen/actionplan_height_xlarge"
android:layout_marginLeft="@dimen/main_page_horizontal_margin"
android:layout_marginTop="@dimen/main_page_vertical_margin"
android:background="@drawable/circle_background_medication">
<ImageView
android:id="@+id/medication_imageview"
android:layout_width="@dimen/width_24dp"
android:layout_height="@dimen/height_28dp"
android:layout_marginLeft="@dimen/marginleft_20dp"
android:layout_marginTop="@dimen/margintop_20dp"
android:src="@drawable/meds_icon_selected"/>
</LinearLayout>
<LinearLayout
android:layout_width="@dimen/main_page_width_medium"
android:layout_height="@dimen/main_page_height_medium"
android:layout_marginLeft="@dimen/horizontal_margin_medium"
android:layout_marginTop="@dimen/vertical_margin_medium"
android:src="@drawable/meds_icon"/>
</FrameLayout>
<TextView
android:id="@+id/medication_title"
android:layout_width="217dp"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/margin_12dp"
android:orientation="vertical">
<TextView
android:id="@+id/medication_title"
android:layout_width="match_parent"
android:layout_height="@dimen/height_20dp"
android:layout_marginTop="@dimen/margintop_20dp"
android:textStyle="bold"
android:text="@string/medication_title"/>
<TextView
android:layout_height="@dimen/actionplan_height_medium"
android:layout_marginTop="@dimen/vertical_margin_medium"
android:layout_marginLeft="12dp"
android:layout_toRightOf="@+id/medication_imageview_container"
android:text="@string/medication_title"
android:textStyle="bold"/>
<TextView
android:layout_width="217dp"
android:layout_height="35dp"
android:layout_marginLeft="12dp"
android:layout_below="@+id/medication_title"
android:layout_toRightOf="@+id/medication_imageview_container"
android:text="@string/medication_subtitle"/>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_toRightOf="@+id/medication_title">
<ImageView
android:layout_width="wrap_content"
android:layout_height="35dp"
android:text="@string/medication_subtitle"/>
</LinearLayout>
<ImageView
android:layout_width="wrap_content"
android:layout_height="@dimen/height_35dp"
android:layout_marginTop="@dimen/margin_30dp"
android:layout_marginLeft="@dimen/margin_14dp"
android:src="@drawable/disclosure_icon"/>
</LinearLayout>
<LinearLayout
android:layout_height="@dimen/main_page_height_large"
android:layout_marginTop="@dimen/disclosure_image_vertical_margin"
android:src="@drawable/disclosure_icon"/>
</FrameLayout>
</RelativeLayout>
<RelativeLayout
android:id="@+id/weight_tile"
android:layout_width="match_parent"
android:layout_height="@dimen/height_88dp"
android:layout_marginTop="@dimen/margin_10dp"
android:layout_marginLeft="@dimen/margin_10dp"
android:layout_marginRight="@dimen/margin_10dp"
android:layout_marginEnd="@dimen/margin_10dp"
android:layout_height="@dimen/actionplan_height_xxlarge"
android:layout_marginTop="@dimen/vertical_margin_small"
android:layout_marginLeft="@dimen/horizontal_margin_small"
android:layout_marginRight="@dimen/horizontal_margin_small"
android:layout_marginEnd="@dimen/horizontal_margin_small"
android:background="@color/white"
android:orientation="horizontal"
android:weightSum="1">
<LinearLayout
android:layout_width="@dimen/width_64dp"
android:layout_height="@dimen/height_64dp"
android:layout_marginTop="@dimen/margin_12dp"
android:layout_marginLeft="@dimen/margin_12dp"
<FrameLayout
android:id="@+id/weight_imageview_container"
android:layout_width="@dimen/main_page_width_large"
android:layout_height="@dimen/actionplan_height_xlarge"
android:layout_marginTop="@dimen/main_page_vertical_margin"
android:layout_marginLeft="@dimen/main_page_horizontal_margin"
android:background="@drawable/circle_background">
<ImageView
android:id="@+id/imageView"
android:layout_width="@dimen/width_24dp"
android:layout_height="@dimen/height_28dp"
android:layout_marginLeft="@dimen/marginleft_20dp"
android:layout_marginTop="@dimen/margintop_20dp"
android:id="@+id/weight_imageView"
android:layout_width="@dimen/main_page_width_medium"
android:layout_height="@dimen/main_page_height_medium"
android:layout_marginLeft="@dimen/horizontal_margin_medium"
android:layout_marginTop="@dimen/vertical_margin_medium"
android:src="@drawable/weight_icon"/>
</LinearLayout>
<LinearLayout
</FrameLayout>
<TextView
android:id="@+id/weight_title"
android:layout_width="217dp"
android:layout_height="@dimen/actionplan_height_medium"
android:layout_marginTop="@dimen/vertical_margin_medium"
android:layout_marginLeft="12dp"
android:layout_toRightOf="@+id/weight_imageview_container"
android:textStyle="bold"
android:text="@string/weight_title"/>
<TextView
android:id="@+id/weight_subtitle"
android:layout_width="217dp"
android:layout_height="@dimen/main_page_height_large"
android:layout_marginLeft="12dp"
android:layout_below="@+id/weight_title"
android:layout_toRightOf="@+id/weight_imageview_container"
android:text="@string/weight_subtitle"/>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/margin_12dp"
android:orientation="vertical">
<TextView
android:id="@+id/weight_title"
android:layout_width="match_parent"
android:layout_height="@dimen/height_20dp"
android:layout_marginTop="@dimen/margintop_20dp"
android:textStyle="bold"
android:text="@string/weight_title"/>
<TextView
android:id="@+id/weight_subtitle"
android:layout_toRightOf="@+id/weight_title">
<ImageView
android:layout_width="wrap_content"
android:layout_height="@dimen/height_35dp"
android:text="@string/weight_subtitle"/>
android:layout_height="@dimen/main_page_height_large"
android:layout_marginTop="@dimen/disclosure_image_vertical_margin"
android:layout_marginLeft="14dp"
android:src="@drawable/disclosure_icon"/>
</FrameLayout>
</RelativeLayout>
</LinearLayout>
<ImageView
android:layout_width="wrap_content"
android:layout_height="@dimen/height_35dp"
android:layout_marginTop="@dimen/margin_30dp"
android:layout_marginLeft="@dimen/margin_14dp"
android:src="@drawable/disclosure_icon"/>
</LinearLayout>
<LinearLayout
<RelativeLayout
android:id="@+id/profile_tile"
android:layout_width="match_parent"
android:layout_height="@dimen/height_88dp"
android:layout_marginTop="@dimen/margin_10dp"
android:layout_marginLeft="@dimen/margin_10dp"
android:layout_marginRight="@dimen/margin_10dp"
android:layout_marginEnd="@dimen/margin_10dp"
android:layout_height="@dimen/actionplan_height_xxlarge"
android:layout_marginTop="@dimen/vertical_margin_small"
android:layout_marginLeft="@dimen/horizontal_margin_small"
android:layout_marginRight="@dimen/horizontal_margin_small"
android:layout_marginEnd="@dimen/horizontal_margin_small"
android:background="@color/white"
android:orientation="horizontal"
android:weightSum="1">
<LinearLayout
android:layout_width="@dimen/width_64dp"
android:layout_height="@dimen/height_64dp"
android:layout_marginTop="@dimen/margin_12dp"
android:layout_marginLeft="@dimen/margin_12dp"
<FrameLayout
android:id="@+id/profile_imageview_container"
android:layout_width="@dimen/main_page_width_large"
android:layout_height="@dimen/actionplan_height_xlarge"
android:layout_marginTop="@dimen/main_page_vertical_margin"
android:layout_marginLeft="@dimen/main_page_horizontal_margin"
android:background="@drawable/circle_background_profile">
<ImageView
android:id="@+id/profile_imageview"
android:layout_width="@dimen/width_24dp"
android:layout_height="@dimen/height_28dp"
android:layout_marginLeft="@dimen/marginleft_20dp"
android:layout_marginTop="@dimen/margintop_20dp"
android:src="@drawable/weight_icon"/>
</LinearLayout>
<LinearLayout
android:layout_width="@dimen/main_page_width_medium"
android:layout_height="@dimen/main_page_height_medium"
android:layout_marginLeft="@dimen/horizontal_margin_medium"
android:layout_marginTop="@dimen/vertical_margin_medium"
android:src="@drawable/profile_icon"/>
</FrameLayout>
<TextView
android:id="@+id/profile_title"
android:layout_width="217dp"
android:layout_height="@dimen/actionplan_height_medium"
android:layout_marginTop="@dimen/vertical_margin_medium"
android:layout_marginLeft="12dp"
android:layout_toRightOf="@+id/profile_imageview_container"
android:textStyle="bold"
android:text="@string/profile_title"/>
<TextView
android:id="@+id/profile_subtitle"
android:layout_width="217dp"
android:layout_height="@dimen/main_page_height_large"
android:layout_marginLeft="12dp"
android:layout_below="@+id/profile_title"
android:layout_toRightOf="@+id/profile_imageview_container"
android:text="@string/profile_subtitle"/>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/margin_12dp"
android:orientation="vertical">
<TextView
android:id="@+id/profile_title"
android:layout_width="match_parent"
android:layout_height="@dimen/height_20dp"
android:layout_marginTop="@dimen/margintop_20dp"
android:textStyle="bold"
android:text="@string/profile_title"/>
<TextView
android:id="@+id/profile_subtitle"
android:layout_toRightOf="@+id/profile_title">
<ImageView
android:layout_width="wrap_content"
android:layout_height="@dimen/height_35dp"
android:text="@string/profile_subtitle"/>
</LinearLayout>
<ImageView
android:layout_width="wrap_content"
android:layout_height="@dimen/height_35dp"
android:layout_marginTop="@dimen/margin_30dp"
android:layout_marginLeft="@dimen/margin_14dp"
android:src="@drawable/disclosure_icon"/>
</LinearLayout>
android:layout_height="@dimen/main_page_height_large"
android:layout_marginTop="@dimen/disclosure_image_vertical_margin"
android:layout_marginLeft="14dp"
android:src="@drawable/disclosure_icon"/>
</FrameLayout>
</RelativeLayout>
<ListView
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="@dimen/margintop_20dp"
android:layout_marginTop="@dimen/vertical_margin_medium"
android:layout_weight="2"
android:visibility="invisible"></ListView>

Просмотреть файл

@ -1,208 +1,138 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:orientation="vertical">
<!-- Name Labels/Text -->
<TextView
android:id="@+id/name_label"
android:layout_width="@dimen/width_69dp"
android:layout_height="@dimen/height_20dp"
android:layout_marginTop="@dimen/margintop_20dp"
android:layout_marginLeft="@dimen/marginleft_20dp"
android:layout_width="match_parent"
android:layout_height="@dimen/add_medication_labels_hight"
android:layout_marginTop="@dimen/add_medication_labels_top"
android:layout_marginLeft="@dimen/horizontal_margin_medium"
android:textSize="@dimen/add_medication_labels_text_size"
android:textColor="@color/old_lavender"
android:textSize="@dimen/textsize_15sp"
android:text="@string/name_label" />
<EditText
<TextView
android:id="@+id/name_text"
android:layout_width="match_parent"
android:layout_height="@dimen/height_48dp"
android:layout_below="@+id/name_label"
android:layout_marginTop="@dimen/margin_10dp"
android:layout_marginLeft="@dimen/marginleft_20dp"
android:layout_marginRight="@dimen/marginright_20dp"
android:background="@color/Isabelline"
android:ems="10"
android:inputType="text"
android:paddingLeft="@dimen/padding_20dp"
android:text="@string/sample_name_text"
android:textSize="@dimen/textsize_15sp"/>
<!-- Dosage Labels/Text -->
<TextView
android:id="@+id/dosagetype_label"
android:layout_width="@dimen/width_84dp"
android:layout_height="@dimen/height_20dp"
android:layout_below="@id/name_text"
android:layout_marginTop="@dimen/margin_10dp"
android:layout_marginLeft="@dimen/marginleft_20dp"
android:textColor="@color/old_lavender"
android:textSize="@dimen/textsize_15sp"
android:text="@string/dosagetype_label" />
android:layout_height="@dimen/add_medication_text_hight"
android:textSize="@dimen/add_medication_labels_text_size"
android:paddingLeft="@dimen/add_medication_text_padding"
android:textColor="@color/pine_green"/>
<TextView
android:id="@+id/strength_label"
android:layout_width="@dimen/width_69dp"
android:layout_height="@dimen/height_20dp"
android:layout_below="@id/name_text"
android:layout_toRightOf="@id/dosagetype_label"
android:layout_marginLeft="@dimen/margin_96dp"
android:layout_marginTop="@dimen/margin_10dp"
android:layout_width="match_parent"
android:layout_height="@dimen/add_medication_labels_hight"
android:layout_marginTop="@dimen/add_medication_labels_top"
android:layout_marginLeft="@dimen/horizontal_margin_medium"
android:textSize="@dimen/add_medication_labels_text_size"
android:textColor="@color/old_lavender"
android:textSize="@dimen/textsize_15sp"
android:text="@string/strength_label" />
<Spinner
android:id="@+id/dosagetype_text"
android:layout_width="@dimen/width_155dp"
android:layout_height="@dimen/height_48dp"
android:layout_below="@id/dosagetype_label"
android:layout_marginTop="@dimen/margin_10dp"
android:layout_marginLeft="@dimen/marginleft_20dp"
android:paddingLeft="@dimen/padding_20dp"
android:ems="10"
android:inputType="textPersonName"
android:textSize="@dimen/textsize_15sp"
android:background="@android:drawable/btn_dropdown"/>
<EditText
<TextView
android:id="@+id/strength_text"
android:layout_width="@dimen/width_155dp"
android:layout_height="@dimen/height_48dp"
android:layout_below="@id/strength_label"
android:layout_toRightOf="@id/dosagetype_text"
android:layout_marginTop="@dimen/margin_10dp"
android:layout_marginLeft="@dimen/margin_10dp"
android:paddingLeft="@dimen/padding_20dp"
android:ems="10"
android:inputType="textPersonName"
android:textSize="@dimen/textsize_15sp"
android:text="@string/sample_strength_text"
android:background="@color/Isabelline"/>
<!-- Treatment Provider Labels/Text -->
android:layout_width="match_parent"
android:layout_height="@dimen/add_medication_text_hight"
android:textSize="@dimen/add_medication_labels_text_size"
android:paddingLeft="@dimen/add_medication_text_padding"
android:textColor="@color/pine_green"/>
<!-- Dosage Labels/Text -->
<TextView
android:id="@+id/dosagetype_label"
android:layout_width="match_parent"
android:layout_height="@dimen/add_medication_labels_hight"
android:layout_marginTop="@dimen/add_medication_labels_top"
android:layout_marginLeft="@dimen/horizontal_margin_medium"
android:textSize="@dimen/add_medication_labels_text_size"
android:textColor="@color/old_lavender"
android:text="@string/dosagetype_label" />
<TextView
android:id="@+id/treatmentprovider_label"
android:layout_width="@dimen/width_140dp"
android:layout_height="@dimen/height_20dp"
android:layout_below="@id/dosagetype_text"
android:layout_marginTop="@dimen/margin_10dp"
android:layout_marginLeft="@dimen/marginleft_20dp"
android:textColor="@color/old_lavender"
android:textSize="@dimen/textsize_15sp"
android:text="@string/treatmentprovider_label" />
<Spinner
android:id="@+id/treatmentprovider_text"
android:id="@+id/dosagetype_text"
android:layout_width="match_parent"
android:layout_height="@dimen/height_48dp"
android:layout_below="@id/treatmentprovider_label"
android:layout_marginTop="@dimen/margin_10dp"
android:layout_marginLeft="@dimen/marginleft_20dp"
android:layout_marginRight="@dimen/marginright_20dp"
android:paddingLeft="@dimen/padding_20dp"
android:ems="10"
android:inputType="textPersonName"
android:textSize="@dimen/textsize_15sp"
android:background="@android:drawable/btn_dropdown"/>
android:layout_height="@dimen/add_medication_text_hight"
android:textSize="@dimen/add_medication_labels_text_size"
android:paddingLeft="@dimen/add_medication_text_padding"
android:textColor="@color/pine_green"/>
<!-- Reasons Labels/Text -->
<!-- how often Labels/Text -->
<TextView
android:id="@+id/howoften_label"
android:layout_width="match_parent"
android:layout_height="@dimen/add_medication_labels_hight"
android:layout_marginTop="@dimen/add_medication_labels_top"
android:layout_marginLeft="@dimen/horizontal_margin_medium"
android:textSize="@dimen/add_medication_labels_text_size"
android:textColor="@color/old_lavender"
android:text="@string/howoften_label" />
<TextView
android:id="@+id/howoften_text"
android:layout_width="match_parent"
android:layout_height="@dimen/add_medication_text_hight"
android:textSize="@dimen/add_medication_labels_text_size"
android:paddingLeft="@dimen/add_medication_text_padding"
android:textColor="@color/pine_green"/>
<!-- how taken Labels/Text -->
<TextView
android:id="@+id/howtaken_label"
android:layout_width="match_parent"
android:layout_height="@dimen/add_medication_labels_hight"
android:layout_marginTop="@dimen/add_medication_labels_top"
android:layout_marginLeft="@dimen/horizontal_margin_medium"
android:textSize="@dimen/add_medication_labels_text_size"
android:textColor="@color/old_lavender"
android:text="@string/howtaken_label" />
<TextView
android:id="@+id/howtaken_text"
android:layout_width="match_parent"
android:layout_height="@dimen/add_medication_text_hight"
android:textSize="@dimen/add_medication_labels_text_size"
android:paddingLeft="@dimen/add_medication_text_padding"
android:textColor="@color/pine_green"/>
<!-- Reason Labels/Text -->
<TextView
android:id="@+id/reason_label"
android:layout_width="@dimen/width_140dp"
android:layout_height="@dimen/height_20dp"
android:layout_below="@id/treatmentprovider_text"
android:layout_marginTop="@dimen/margin_10dp"
android:layout_marginLeft="@dimen/marginleft_20dp"
android:layout_width="match_parent"
android:layout_height="@dimen/add_medication_labels_hight"
android:layout_marginTop="@dimen/add_medication_labels_top"
android:layout_marginLeft="@dimen/horizontal_margin_medium"
android:textSize="@dimen/add_medication_labels_text_size"
android:textColor="@color/old_lavender"
android:textSize="@dimen/textsize_15sp"
android:text="@string/reason_label" />
<EditText
<TextView
android:id="@+id/reason_text"
android:layout_width="match_parent"
android:layout_height="@dimen/height_48dp"
android:layout_below="@+id/reason_label"
android:layout_marginTop="@dimen/margin_10dp"
android:layout_marginLeft="@dimen/marginleft_20dp"
android:layout_marginRight="@dimen/marginright_20dp"
android:background="@color/Isabelline"
android:ems="10"
android:inputType="text"
android:paddingLeft="@dimen/padding_20dp"
android:text="@string/sample_reason_text"
android:textSize="@dimen/textsize_15sp"/>
android:layout_height="@dimen/add_medication_text_hight"
android:textSize="@dimen/add_medication_labels_text_size"
android:paddingLeft="@dimen/add_medication_text_padding"
android:textColor="@color/pine_green"/>
<!-- Date Started Labels/Text -->
<TextView
android:id="@+id/datestarted_label"
android:layout_width="@dimen/width_140dp"
android:layout_height="@dimen/height_20dp"
android:layout_below="@id/reason_text"
android:layout_marginTop="@dimen/margin_10dp"
android:layout_marginLeft="@dimen/marginleft_20dp"
android:layout_width="match_parent"
android:layout_height="@dimen/add_medication_labels_hight"
android:layout_marginTop="@dimen/add_medication_labels_top"
android:layout_marginLeft="@dimen/horizontal_margin_medium"
android:textSize="@dimen/add_medication_labels_text_size"
android:textColor="@color/old_lavender"
android:textSize="@dimen/textsize_15sp"
android:text="@string/datestarted_label" />
<EditText
android:id="@+id/datestarted_value1_text"
android:layout_width="@dimen/width_100dp"
android:layout_height="@dimen/height_48dp"
android:layout_below="@+id/datestarted_label"
android:layout_marginTop="@dimen/margin_10dp"
android:layout_marginLeft="@dimen/marginleft_20dp"
android:background="@color/Isabelline"
android:ems="10"
android:inputType="text"
android:paddingLeft="@dimen/padding_20dp"
android:text="@string/sample_datestarted_value1_text"
android:textSize="@dimen/textsize_15sp"/>
<EditText
android:id="@+id/datestarted_value2_text"
android:layout_width="@dimen/width_100dp"
android:layout_height="@dimen/height_48dp"
android:layout_below="@+id/datestarted_label"
android:layout_toRightOf="@id/datestarted_value1_text"
android:layout_marginTop="@dimen/margin_10dp"
android:layout_marginLeft="@dimen/margin_10dp"
android:background="@color/Isabelline"
android:ems="10"
android:inputType="text"
android:paddingLeft="@dimen/padding_20dp"
android:text="@string/sample_datestarted_value2_text"
android:textSize="@dimen/textsize_15sp"/>
<EditText
android:id="@+id/datestarted_value3_text"
android:layout_width="@dimen/width_100dp"
android:layout_height="@dimen/height_48dp"
android:layout_alignEnd="@+id/reason_text"
android:layout_below="@+id/datestarted_label"
android:layout_marginTop="@dimen/margin_10dp"
android:layout_marginLeft="@dimen/margin_10dp"
android:layout_toRightOf="@id/datestarted_value2_text"
android:background="@color/Isabelline"
android:ems="10"
android:inputType="text"
android:paddingLeft="@dimen/padding_20dp"
android:text="@string/sample_datestarted_value3_text"
android:textSize="@dimen/textsize_15sp"/>
<Button
android:id="@+id/save_button"
<TextView
android:id="@+id/datestarted_text"
android:layout_width="match_parent"
android:layout_height="@dimen/height_48dp"
android:layout_below="@id/datestarted_value3_text"
android:layout_marginTop="@dimen/margin_48dp"
android:layout_marginLeft="@dimen/marginleft_20dp"
android:layout_marginRight="@dimen/marginright_20dp"
android:background="@color/pine_green"
android:textColor="@color/white"
android:text="@string/save_button"/>
android:layout_height="@dimen/add_medication_text_hight"
android:textSize="@dimen/add_medication_labels_text_size"
android:paddingLeft="@dimen/add_medication_text_padding"
android:textColor="@color/pine_green"/>
</RelativeLayout>
</LinearLayout>

Просмотреть файл

@ -0,0 +1,61 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#e3e3e3"
android:id="@+id/medication_layout">
<TextView
android:id="@+id/medication_title"
android:layout_width="match_parent"
android:layout_height="@dimen/medication_main_height"
android:layout_marginTop="@dimen/vertical_margin_medium"
android:layout_marginLeft="@dimen/horizontal_margin_medium"
android:textSize="@dimen/medication_name_text_size"
android:text="Main medication Page"
android:textColor="@color/pine_green"/>
<RelativeLayout
android:id="@+id/meds_details_layout"
android:layout_marginTop="20dp"
android:background="@color/white"
android:layout_width="match_parent"
android:layout_height="@dimen/medication_list_height">
<TextView
android:id="@+id/medication_name"
android:layout_width="match_parent"
android:layout_height="@dimen/medication_main_height"
android:layout_marginLeft="@dimen/horizontal_margin_medium"
android:layout_marginTop="@dimen/vertical_margin_medium"
android:textSize="@dimen/medication_name_text_size"
android:textColor="@color/pine_green"
android:text="medication_name"/>
<TextView
android:id="@+id/dosage_strength"
android:layout_width="@dimen/medication_dose_width"
android:layout_height="@dimen/medication_dose_height"
android:layout_marginLeft="@dimen/horizontal_margin_medium"
android:textSize="@dimen/medication_dose_text_size"
android:textColor="@color/pine_green"
android:text="dosage_strength"
android:layout_below="@id/medication_name"/>
<TextView
android:id="@+id/prescribed_date"
android:layout_width="match_parent"
android:layout_height="@dimen/medication_prescribe_height"
android:layout_marginLeft="@dimen/horizontal_margin_medium"
android:textColor="@color/old_lavender"
android:layout_below="@id/dosage_strength"/>
<ImageView
android:id="@+id/image_view"
android:layout_width="@dimen/medication_dislosure_image_width"
android:layout_height="@dimen/medication_dislosure_image_height"
android:layout_marginRight="@dimen/horizontal_margin_medium"
android:layout_marginLeft="115dp"
android:src="@drawable/disclosure_icon"
android:layout_toRightOf="@id/dosage_strength"
android:layout_below="@id/medication_name"/>
</RelativeLayout>
</LinearLayout>

Просмотреть файл

@ -6,178 +6,170 @@
<!-- Profile Image -->
<FrameLayout
android:id="@+id/profileImageLayout"
android:layout_width="@dimen/profileimagelayout_width"
android:layout_height="@dimen/profileimagelayout_height"
android:layout_marginLeft="@dimen/profileimagelayout_marginleftt"
android:layout_marginTop="@dimen/margintop_20dp"
android:layout_marginBottom="@dimen/profileimagelayout_marginbottom"
android:id="@+id/profile_image_layout"
android:layout_width="@dimen/profile_image_layout_width"
android:layout_height="@dimen/profile_image_layout_height"
android:layout_marginLeft="142dp"
android:layout_marginTop="@dimen/vertical_margin_medium"
android:layout_marginBottom="28dp"
android:background="@drawable/circle_background_image">
<ImageView
android:id="@+id/profileImage"
android:layout_width="@dimen/profileimage_width"
android:layout_height="@dimen/profileimage_height"
android:layout_marginTop="@dimen/margintop_10dp"
android:layout_gravity="center"
android:src="@drawable/ic_launcher" />
android:layout_width="@dimen/profile_image_width"
android:layout_height="@dimen/profile_image_height"
android:layout_gravity="center" />
</FrameLayout>
<!-- Name Labels/Text -->
<TextView
android:id="@+id/firstNameLabel"
android:layout_width="@dimen/width_69dp"
android:layout_height="@dimen/height_20dp"
android:layout_below="@id/profileImageLayout"
android:layout_marginLeft="@dimen/marginleft_20dp"
android:id="@+id/first_name_label"
android:layout_width="@dimen/profile_label_width"
android:layout_height="@dimen/profile_height_medium"
android:layout_below="@id/profile_image_layout"
android:layout_marginLeft="@dimen/horizontal_margin_medium"
android:textColor="@color/old_lavender"
android:textSize="@dimen/textsize_15sp"
android:textSize="@dimen/profile_text_size"
android:text="@string/label_firstname" />
<TextView
android:id="@+id/lastNameLabel"
android:layout_width="@dimen/width_69dp"
android:layout_height="@dimen/height_20dp"
android:layout_below="@id/profileImageLayout"
android:layout_toRightOf="@id/firstNameLabel"
android:layout_marginLeft="@dimen/margin_96dp"
android:id="@+id/last_name_label"
android:layout_width="@dimen/profile_label_width"
android:layout_height="@dimen/profile_height_medium"
android:layout_below="@id/profile_image_layout"
android:layout_toRightOf="@id/first_name_label"
android:layout_marginLeft="96dp"
android:textColor="@color/old_lavender"
android:textSize="@dimen/textsize_15sp"
android:textSize="@dimen/profile_text_size"
android:text="@string/label_lastname" />
<EditText
android:id="@+id/firstNameText"
android:layout_width="@dimen/width_155dp"
android:layout_height="@dimen/height_48dp"
android:layout_below="@id/firstNameLabel"
android:layout_marginTop="@dimen/margin_12dp"
android:layout_marginLeft="@dimen/marginleft_20dp"
android:paddingLeft="@dimen/padding_20dp"
android:id="@+id/first_name_text"
android:layout_width="@dimen/profile_width_xxlarge"
android:layout_height="@dimen/actionplan_height_large"
android:layout_below="@id/first_name_label"
android:layout_marginTop="@dimen/profile_vertical_margin"
android:layout_marginLeft="@dimen/horizontal_margin_medium"
android:paddingLeft="@dimen/padding_medium"
android:ems="10"
android:inputType="textPersonName"
android:text="@string/sample_first"
android:textSize="@dimen/textsize_15sp"
android:textSize="@dimen/profile_text_size"
android:background="@color/Isabelline"/>
<EditText
android:id="@+id/lastNameText"
android:layout_width="@dimen/width_155dp"
android:layout_height="@dimen/height_48dp"
android:layout_below="@id/lastNameLabel"
android:layout_toRightOf="@id/firstNameText"
android:layout_marginTop="@dimen/margin_12dp"
android:layout_marginLeft="@dimen/margin_10dp"
android:paddingLeft="@dimen/padding_20dp"
android:id="@+id/last_name_text"
android:layout_width="@dimen/profile_width_xxlarge"
android:layout_height="@dimen/actionplan_height_large"
android:layout_below="@id/last_name_label"
android:layout_toRightOf="@id/first_name_text"
android:layout_marginTop="@dimen/profile_vertical_margin"
android:layout_marginLeft="@dimen/horizontal_margin_small"
android:paddingLeft="@dimen/padding_medium"
android:ems="10"
android:inputType="textPersonName"
android:textSize="@dimen/textsize_15sp"
android:text="@string/sample_last"
android:textSize="@dimen/profile_text_size"
android:background="@color/Isabelline"/>
<!-- Birth Labels/Text -->
<TextView
android:id="@+id/birthMonthLabel"
android:layout_width="@dimen/width_80dp"
android:layout_height="@dimen/height_20dp"
android:layout_below="@id/firstNameText"
android:layout_marginLeft="@dimen/marginleft_20dp"
android:layout_marginTop="@dimen/margin_24dp"
android:id="@+id/birth_month_label"
android:layout_width="80dp"
android:layout_height="@dimen/profile_height_medium"
android:layout_below="@id/first_name_text"
android:layout_marginLeft="@dimen/horizontal_margin_medium"
android:layout_marginTop="@dimen/profile_label_vertical_margin"
android:text="@string/label_birthmonth"
android:textColor="@color/old_lavender"
android:textSize="@dimen/textsize_15sp"/>
android:textSize="@dimen/profile_text_size"/>
<TextView
android:id="@+id/birthYearLabel"
android:layout_width="@dimen/width_69dp"
android:layout_height="@dimen/height_20dp"
android:layout_below="@id/lastNameText"
android:layout_toRightOf="@id/birthMonthLabel"
android:layout_marginLeft="@dimen/margin_85dp"
android:layout_marginTop="@dimen/margin_24dp"
android:id="@+id/birth_year_label"
android:layout_width="@dimen/profile_label_width"
android:layout_height="@dimen/profile_height_medium"
android:layout_below="@id/last_name_text"
android:layout_toRightOf="@id/birth_month_label"
android:layout_marginLeft="85dp"
android:layout_marginTop="@dimen/profile_label_vertical_margin"
android:textColor="@color/old_lavender"
android:textSize="@dimen/textsize_15sp"
android:textSize="@dimen/profile_text_size"
android:text="@string/label_birthyear" />
<EditText
android:id="@+id/birthMonthText"
android:layout_width="@dimen/width_155dp"
android:layout_height="@dimen/height_48dp"
android:layout_below="@id/birthMonthLabel"
android:layout_marginTop="@dimen/margin_12dp"
android:layout_marginLeft="@dimen/marginleft_20dp"
android:paddingLeft="@dimen/padding_20dp"
android:id="@+id/birth_month_text"
android:layout_width="@dimen/profile_width_xxlarge"
android:layout_height="@dimen/actionplan_height_large"
android:layout_below="@id/birth_month_label"
android:layout_marginTop="@dimen/profile_vertical_margin"
android:layout_marginLeft="@dimen/horizontal_margin_medium"
android:paddingLeft="@dimen/padding_medium"
android:ems="10"
android:inputType="textPersonName"
android:text="@string/sample_month"
android:textSize="@dimen/textsize_15sp"
android:textSize="@dimen/profile_text_size"
android:background="@color/Isabelline"/>
<EditText
android:id="@+id/birthYearText"
android:layout_width="@dimen/width_155dp"
android:layout_height="@dimen/height_48dp"
android:layout_below="@id/birthYearLabel"
android:layout_toRightOf="@id/birthMonthText"
android:layout_marginTop="@dimen/margin_12dp"
android:layout_marginLeft="@dimen/margin_10dp"
android:paddingLeft="@dimen/padding_20dp"
android:id="@+id/birth_year_text"
android:layout_width="@dimen/profile_width_xxlarge"
android:layout_height="@dimen/actionplan_height_large"
android:layout_below="@id/birth_year_label"
android:layout_toRightOf="@id/birth_month_text"
android:layout_marginTop="@dimen/profile_vertical_margin"
android:layout_marginLeft="@dimen/horizontal_margin_small"
android:paddingLeft="@dimen/padding_medium"
android:ems="10"
android:inputType="textPersonName"
android:textSize="@dimen/textsize_15sp"
android:text="@string/sample_year"
android:textSize="@dimen/profile_text_size"
android:background="@color/Isabelline"/>
<!-- Gender Labels/Text -->
<TextView
android:id="@+id/genderLabel"
android:layout_width="@dimen/width_69dp"
android:layout_height="@dimen/height_20dp"
android:layout_below="@id/birthYearText"
android:layout_marginLeft="@dimen/marginleft_20dp"
android:layout_marginTop="@dimen/margin_24dp"
android:id="@+id/gender_label"
android:layout_width="@dimen/profile_label_width"
android:layout_height="@dimen/profile_height_medium"
android:layout_below="@id/birth_year_text"
android:layout_marginLeft="@dimen/horizontal_margin_medium"
android:layout_marginTop="@dimen/profile_label_vertical_margin"
android:textColor="@color/old_lavender"
android:textSize="@dimen/textsize_15sp"
android:textSize="@dimen/profile_text_size"
android:text="@string/label_gender" />
<EditText
android:id="@+id/genderText"
android:id="@+id/gender_text"
android:layout_width="match_parent"
android:layout_height="@dimen/height_48dp"
android:layout_below="@id/genderLabel"
android:layout_marginTop="@dimen/margin_12dp"
android:layout_marginLeft="@dimen/marginleft_20dp"
android:layout_marginRight="@dimen/marginright_20dp"
android:paddingLeft="@dimen/padding_20dp"
android:layout_height="@dimen/actionplan_height_large"
android:layout_below="@id/gender_label"
android:layout_marginTop="@dimen/profile_vertical_margin"
android:layout_marginLeft="@dimen/horizontal_margin_medium"
android:layout_marginRight="@dimen/horizontal_margin_medium"
android:paddingLeft="@dimen/padding_medium"
android:ems="10"
android:inputType="textPersonName"
android:textSize="@dimen/textsize_15sp"
android:text="@string/sample_gender"
android:textSize="@dimen/profile_text_size"
android:background="@color/Isabelline"/>
<!-- Weight Labels/Text -->
<TextView
android:id="@+id/weightLabel"
android:layout_width="@dimen/width_69dp"
android:layout_height="@dimen/height_20dp"
android:layout_below="@id/genderText"
android:layout_marginLeft="@dimen/marginleft_20dp"
android:layout_marginTop="@dimen/margin_24dp"
android:id="@+id/country_label"
android:layout_width="@dimen/profile_label_width"
android:layout_height="@dimen/profile_height_medium"
android:layout_below="@id/gender_text"
android:layout_marginLeft="@dimen/horizontal_margin_medium"
android:layout_marginTop="@dimen/profile_label_vertical_margin"
android:textColor="@color/old_lavender"
android:textSize="@dimen/textsize_15sp"
android:text="@string/label_profilepage_weight" />
android:textSize="@dimen/profile_text_size"
android:text="@string/label_profilepage_country" />
<EditText
android:id="@+id/weighText"
android:id="@+id/country_text"
android:layout_width="match_parent"
android:layout_height="@dimen/height_48dp"
android:layout_below="@id/weightLabel"
android:layout_marginLeft="@dimen/marginleft_20dp"
android:layout_marginRight="@dimen/marginright_20dp"
android:layout_marginTop="@dimen/margin_12dp"
android:layout_height="@dimen/actionplan_height_large"
android:layout_below="@id/country_label"
android:layout_marginLeft="@dimen/horizontal_margin_medium"
android:layout_marginRight="@dimen/vertical_margin_medium"
android:layout_marginTop="@dimen/profile_vertical_margin"
android:background="@color/Isabelline"
android:ems="10"
android:inputType="text"
android:paddingLeft="@dimen/padding_20dp"
android:text="@string/sample_weight"
android:textSize="@dimen/textsize_15sp"/>
android:paddingLeft="@dimen/padding_medium"
android:textSize="@dimen/profile_text_size"/>
</RelativeLayout>

Просмотреть файл

@ -6,12 +6,12 @@
<ImageView
android:id="@+id/record_icon"
android:layout_width="@dimen/width_60dp"
android:layout_height="@dimen/height_60dp"
android:layout_marginBottom="@dimen/margin_5dp"
android:layout_marginLeft="@dimen/margin_5dp"
android:layout_marginRight="@dimen/margin_5dp"
android:layout_marginTop="@dimen/margin_5dp"
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_marginBottom="@dimen/vertical_margin_xsmall"
android:layout_marginLeft="@dimen/horizontal_margin_xsmall"
android:layout_marginRight="@dimen/horizontal_margin_xsmall"
android:layout_marginTop="@dimen/vertical_margin_xsmall"
android:src="@drawable/ic_launcher" />
<TextView

Просмотреть файл

@ -1,67 +1,66 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
<RelativeLayout
android:id="@+id/graph_container"
android:layout_width="@dimen/weight_graphcontainer_width"
android:layout_height="@dimen/weight_graphcontainer_height"
android:background="@color/pine_green"
android:orientation="vertical">
android:layout_width="@dimen/weight_graph_container_width"
android:layout_height="@dimen/weight_graph_container_height"
android:background="@color/pine_green">
<TextView
android:id="@+id/chart_label"
style="@style/chart_label"/>
<com.jjoe64.graphview.GraphView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/chart_label"
android:id="@+id/graph" />
</LinearLayout>
</RelativeLayout>
<LinearLayout
<RelativeLayout
android:id="@+id/last_weight_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/graph_container"
android:orientation="vertical">
android:layout_below="@id/graph_container">
<TextView
android:id="@+id/last_weight_label"
android:layout_width="match_parent"
android:layout_height="@dimen/weightlayout_height_20dp"
android:layout_marginTop="@dimen/margintop_10dp"
android:layout_marginLeft="@dimen/marginleft_20dp"
android:layout_height="@dimen/weight_layout_height_medium"
android:layout_marginTop="@dimen/vertical_margin_small"
android:layout_marginLeft="@dimen/horizontal_margin_medium"
android:textColor="@color/old_lavender"
android:text="@string/label_lastweight"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/marginleft_20dp"
android:orientation="horizontal">
<TextView
android:id="@+id/last_weight"
android:layout_width="@dimen/lastweighttext_width"
android:layout_height="@dimen/lastweighttext_height"
android:textColor="@color/pine_green"
android:textSize="30sp"/>
<TextView
android:layout_width="292dp"
android:layout_height="wrap_content"
android:text="@string/label_metric"
android:textColor="@color/pine_green"/>
</LinearLayout>
</LinearLayout>
<TextView
android:id="@+id/last_weight"
android:layout_width="@dimen/last_weight_text_width"
android:layout_height="@dimen/last_weight_text_height"
android:layout_marginLeft="@dimen/horizontal_margin_medium"
android:textColor="@color/pine_green"
android:layout_below="@+id/last_weight_label"
android:textSize="30sp"/>
<TextView
android:layout_width="292dp"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:layout_below="@+id/last_weight_label"
android:layout_toRightOf="@+id/last_weight"
android:text="@string/label_metric"
android:textColor="@color/pine_green"/>
</RelativeLayout>
<LinearLayout
<RelativeLayout
android:id="@+id/add_weight_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/last_weight_container"
android:orientation="vertical">
android:layout_below="@id/last_weight_container">
<EditText
android:id="@+id/weight_input"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/marginleft_20dp"
android:layout_marginRight="@dimen/marginright_20dp"
android:layout_marginLeft="@dimen/horizontal_margin_medium"
android:layout_marginRight="@dimen/horizontal_margin_medium"
android:inputType="number"
android:text="" >
</EditText>
@ -69,48 +68,43 @@
android:id="@+id/add_weight"
android:layout_width="match_parent"
android:layout_height="@dimen/weight_button_height"
android:layout_marginLeft="@dimen/marginleft_20dp"
android:layout_marginRight="@dimen/marginright_20dp"
android:layout_marginLeft="@dimen/horizontal_margin_medium"
android:layout_marginRight="@dimen/vertical_margin_medium"
android:layout_below="@+id/weight_input"
android:background="@color/white"
android:text="@string/button_addweight"
android:textAlignment="center">
</Button>
</LinearLayout>
</RelativeLayout>
<LinearLayout
<RelativeLayout
android:id="@+id/labels_container"
android:layout_width="match_parent"
android:layout_height="@dimen/weightlayout_height_40dp"
android:layout_marginTop="@dimen/margintop_10dp"
android:layout_marginLeft="@dimen/lastweighttext_marginleft"
android:layout_marginRight="@dimen/lastweighttext_marginright"
android:layout_height="@dimen/weight_layout_height_medium"
android:layout_below="@id/add_weight_container"
android:orientation="horizontal">
android:layout_marginLeft="@dimen/horizontal_margin_medium"
android:layout_marginRight="@dimen/horizontal_margin_medium"
android:layout_marginTop="@dimen/vertical_margin_small">
<TextView
android:id="@+id/date_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_weight="1"
android:text="@string/label_date" />
android:text="@string/label_date"/>
<TextView
android:id="@+id/weight_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:layout_weight="0.13"
android:text="@string/label_weightpage_weight" />
</LinearLayout>
android:layout_marginLeft="240dp"
android:text="@string/label_weightpage_weight"
android:layout_alignParentEnd="true"/>
</RelativeLayout>
<HorizontalScrollView
android:layout_below="@id/labels_container"
<ListView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/marginleft_20dp"
android:layout_marginRight="@dimen/marginright_20dp">
<ListView
android:layout_width="@dimen/weighthistory_list_width"
android:layout_height="@dimen/weighthistory_list_height"
android:id="@+id/weight_list"/>
</HorizontalScrollView>
</RelativeLayout>
android:layout_marginLeft="@dimen/horizontal_margin_medium"
android:layout_marginRight="@dimen/horizontal_margin_medium"
android:layout_height="@dimen/weigh_thistory_list_height"
android:id="@+id/weight_list"/>
</LinearLayout>

Просмотреть файл

@ -7,12 +7,12 @@
<item
android:id="@+id/menu_actionplan"
android:title="@string/menu_actionplan"
android:icon="@drawable/habits_icon_selected"/>
android:icon="@drawable/habits_icon"/>
<item
android:id="@+id/menu_medication"
android:title="@string/menu_medication"
android:icon="@drawable/meds_icon_selected"/>
android:icon="@drawable/meds_icon"/>
<item
android:id="@+id/menu_weight"

Просмотреть файл

@ -5,7 +5,7 @@
AppBaseTheme from BOTH res/values/styles.xml and
res/values-v11/styles.xml on API 14+ devices.
-->
<style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar">
<style name="AppBaseTheme" parent="android:Theme.Holo.Light">
<!-- API 14 theme customizations can go here. -->
</style>

Просмотреть файл

@ -2,6 +2,7 @@
<item name="pine_green" type="color">#008272</item>
<item name="old_lavender" type="color">#767676</item>
<item name="white" type="color">#ffffff</item>
<item name="black" type="color">#000000</item>
<item name="blue" type="color">#0072C6</item>
<item name="Isabelline" type="color">#eeeeee</item>
</resources>

Просмотреть файл

@ -4,81 +4,99 @@
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
<!--Home Page -->
<!--Weight Page -->
<dimen name="marginleft_20dp">20dp</dimen>
<dimen name="marginright_20dp">20dp</dimen>
<dimen name="margintop_10dp">10dp</dimen>
<dimen name="margintop_20dp">20dp</dimen>
<dimen name="marginbottom_10dp">10dp</dimen>
<dimen name="horizontal_margin_medium">20dp</dimen>
<dimen name="horizontal_margin_small">10dp</dimen>
<dimen name="horizontal_margin_xsmall">5dp</dimen>
<dimen name="vertical_margin_medium">20dp</dimen>
<dimen name="vertical_margin_small">10dp</dimen>
<dimen name="vertical_margin_xsmall">5dp</dimen>
<dimen name="weightlayout_marginleft">20dp</dimen>
<dimen name="weightlayout_marginright">200dp</dimen>
<dimen name="weightlayout_height_40dp">40dp</dimen>
<dimen name="weightlayout_height_20dp">20dp</dimen>
<dimen name="weight_layout_height_large">40dp</dimen>
<dimen name="weight_layout_height_medium">20dp</dimen>
<dimen name="weight_graphcontainer_height">237dp</dimen>
<dimen name="weight_graphcontainer_width">360dp</dimen>
<dimen name="weight_graph_container_height">237dp</dimen>
<dimen name="weight_graph_container_width">360dp</dimen>
<dimen name="lastweightlabel_width">75dp</dimen>
<dimen name="lastweightlabel_height">20dp</dimen>
<dimen name="lastweightlabel_marginleft">20dp</dimen>
<dimen name="lastweightlabel_margintop">26dp</dimen>
<dimen name="last_weight_label_width">75dp</dimen>
<dimen name="last_weight_label_height">20dp</dimen>
<dimen name="lastweighttext_width">80dp</dimen>
<dimen name="lastweighttext_height">62dp</dimen>
<dimen name="lastweighttext_marginleft">20dp</dimen>
<dimen name="lastweighttext_marginright">20dp</dimen>
<dimen name="lastweighttext_marginbottom">20dp</dimen>
<dimen name="last_weight_text_width">80dp</dimen>
<dimen name="last_weight_text_height">62dp</dimen>
<dimen name="lastweightmetric_width">16dp</dimen>
<dimen name="lastweightmetric_height">16dp</dimen>
<dimen name="last_weight_metric_width">16dp</dimen>
<dimen name="last_weight_metric_height">16dp</dimen>
<dimen name="weight_button_height">40dp</dimen>
<dimen name="weighthistory_list_width">360dp</dimen>
<dimen name="weighthistory_list_height">300dp</dimen>
<dimen name="weight_history_list_width">360dp</dimen>
<dimen name="weigh_thistory_list_height">300dp</dimen>
<!--General -->
<dimen name="height_60dp">60dp</dimen>
<dimen name="height_40dp">40dp</dimen>
<dimen name="height_20dp">20dp</dimen>
<dimen name="height_28dp">28dp</dimen>
<dimen name="height_35dp">35dp</dimen>
<dimen name="height_48dp">48dp</dimen>
<dimen name="height_64dp">64dp</dimen>
<dimen name="height_88dp">88dp</dimen>
<dimen name="width_24dp">24dp</dimen>
<dimen name="width_60dp">60dp</dimen>
<dimen name="width_64dp">64dp</dimen>
<dimen name="width_69dp">69dp</dimen>
<dimen name="width_80dp">80dp</dimen>
<dimen name="width_84dp">84dp</dimen>
<dimen name="width_100dp">100dp</dimen>
<dimen name="width_140dp">140dp</dimen>
<dimen name="width_155dp">155dp</dimen>
<dimen name="margin_5dp">5dp</dimen>
<dimen name="margin_10dp">10dp</dimen>
<dimen name="margin_12dp">12dp</dimen>
<dimen name="margin_14dp">14dp</dimen>
<dimen name="margin_24dp">24dp</dimen>
<dimen name="margin_30dp">30dp</dimen>
<dimen name="margin_48dp">48dp</dimen>
<dimen name="margin_85dp">85dp</dimen>
<dimen name="margin_96dp">96dp</dimen>
<dimen name="padding_20dp">20dp</dimen>
<!--Action plan -->
<dimen name="main_page_height_large">35dp</dimen>
<dimen name="main_page_height_medium">28dp</dimen>
<dimen name="main_page_width_medium">24dp</dimen>
<dimen name="main_page_width_large">64dp</dimen>
<dimen name="main_page_vertical_margin">12dp</dimen>
<dimen name="main_page_horizontal_margin">12dp</dimen>
<dimen name="textsize_15sp">15sp</dimen>
<!--Action plan -->
<dimen name="actionplan_height_medium">20dp</dimen>
<dimen name="actionplan_height_large">48dp</dimen>
<dimen name="actionplan_height_xlarge">64dp</dimen>
<dimen name="actionplan_height_xxlarge">88dp</dimen>
<!--General-->
<dimen name="disclosure_image_vertical_margin">30dp</dimen>
<dimen name="padding_medium">20dp</dimen>
<dimen name="padding_small">10dp</dimen>
<!--Profile -->
<dimen name="profileimage_width">50dp</dimen>
<dimen name="profileimage_height">50dp</dimen>
<dimen name="profile_height_medium">20dp</dimen>
<dimen name="profile_image_width">50dp</dimen>
<dimen name="profile_image_height">50dp</dimen>
<dimen name="profile_text_size">15sp</dimen>
<dimen name="profile_width_xxlarge">155dp</dimen>
<dimen name="profile_label_width">69dp</dimen>
<dimen name="profile_label_vertical_margin">24dp</dimen>
<dimen name="profile_vertical_margin">12dp</dimen>
<dimen name="profileimagelayout_width">76dp</dimen>
<dimen name="profileimagelayout_height">76dp</dimen>
<dimen name="profileimagelayout_marginleftt">142dp</dimen>
<dimen name="profileimagelayout_marginbottom">28dp</dimen>
<dimen name="profile_image_layout_width">76dp</dimen>
<dimen name="profile_image_layout_height">76dp</dimen>
<!--Medications -->
<dimen name="medication_main_height">24dp</dimen>
<dimen name="medication_main_width">215dp</dimen>
<dimen name="medication_list_width">360dp</dimen>
<dimen name="medication_list_height">88dp</dimen>
<dimen name="medication_text_size">24sp</dimen>
<!--Medications record-->
<dimen name="medication_name_margin_top">12dp</dimen>
<dimen name="medication_name_width">86dp</dimen>
<dimen name="medication_name_height">24dp</dimen>
<dimen name="medication_name_text_size">18sp</dimen>
<dimen name="medication_dose_width">200dp</dimen>
<dimen name="medication_dose_height">20dp</dimen>
<dimen name="medication_dose_text_size">15sp</dimen>
<dimen name="medication_prescribe_width">187dp</dimen>
<dimen name="medication_prescribe_height">18dp</dimen>
<dimen name="medication_prescribe_text_size">12sp</dimen>
<dimen name="medication_dislosure_image_height">19dp</dimen>
<dimen name="medication_dislosure_image_width">9dp</dimen>
<!--Add Medications record-->
<dimen name="add_medication_labels_hight">20dp</dimen>
<dimen name="add_medication_labels_top">16dp</dimen>
<dimen name="add_medication_labels_text_size">15sp</dimen>
<dimen name="add_medication_text_hight">24dp</dimen>
<dimen name="add_medication_text_text_size">15sp</dimen>
<dimen name="add_medication_text_padding">20dp</dimen>
<dimen name="add_medication_button_hight">48dp</dimen>
<dimen name="add_medication_button_top">35dp</dimen>
</resources>

Просмотреть файл

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">HVSample</string>
<string name="app_name">HealthVault Sample</string>
<string name="action_settings">Settings</string>
<string name="hello_world">Hello world!</string>
<string name="clear">Clear</string>
@ -44,30 +44,26 @@
<!--Profile Page -->
<string name="label_firstname">First</string>
<string name="label_lastname">Last</string>
<string name="sample_first">Victoria</string>
<string name="sample_last">Nguyn</string>
<string name="label_birthmonth">Birth month</string>
<string name="label_birthyear">Birth year</string>
<string name="sample_month">September</string>
<string name="sample_year">1973</string>
<string name="label_gender">Gender</string>
<string name="sample_gender">Female</string>
<string name="label_profilepage_weight">Weight</string>
<string name="sample_weight">150</string>
<string name="label_profilepage_country">Country</string>
<!--Medication Page -->
<!--Add Medication Page -->
<string name="name_label">Name</string>
<string name="sample_name_text">Duloxetine</string>
<string name="dosagetype_label">Dosage type</string>
<string name="strength_label">Strength</string>
<string name="sample_strength_text">37.5 mg</string>
<string name="treatmentprovider_label">Treatment provider</string>
<string name="dosagetype_label">Dosage</string>
<string name="howoften_label">How often taken?</string>
<string name="howtaken_label">How taken?</string>
<string name="reason_label">Reason for taking</string>
<string name="sample_reason_text">Select</string>
<string name="datestarted_label">Date started</string>
<string name="sample_datestarted_value1_text">Value1</string>
<string name="sample_datestarted_value2_text">Value2</string>
<string name="sample_datestarted_value3_text">Value3</string>
<string name="save_button">Save</string>
<string name="edit_button">Edit details</string>
<!--Action Plan Page -->
<string name="objectives_label">Objective</string>
<string name="tasks_label">Task</string>
</resources>

Просмотреть файл

@ -4,7 +4,7 @@
Base application theme, dependent on API level. This theme is replaced
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
-->
<style name="AppBaseTheme" parent="Theme.AppCompat.Light">
<style name="AppBaseTheme" parent="android:Theme.Light">
<!--
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to

Просмотреть файл

@ -1,26 +1,23 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.2'
}
}
allprojects {
repositories {
jcenter()
flatDir {
dirs 'libs'
}
}
repositories {
jcenter()
flatDir {
dirs 'libs'
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
delete rootProject.buildDir
}