mirror of
https://github.com/bitwarden/android.git
synced 2024-12-20 16:21:55 +03:00
Android UI improvements. Added hockeyapp for android. Recycle lsitview elements.
This commit is contained in:
parent
748698b33f
commit
b4a80751b2
17 changed files with 134 additions and 75 deletions
|
@ -24,6 +24,7 @@ namespace Bit.Android
|
||||||
base.OnCreate(bundle);
|
base.OnCreate(bundle);
|
||||||
Console.WriteLine("A OnCreate");
|
Console.WriteLine("A OnCreate");
|
||||||
|
|
||||||
|
HockeyApp.Android.CrashManager.Register(this);
|
||||||
global::Xamarin.Forms.Forms.Init(this, bundle);
|
global::Xamarin.Forms.Forms.Init(this, bundle);
|
||||||
|
|
||||||
LoadApplication(new App.App(
|
LoadApplication(new App.App(
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.bitwarden.vault" android:versionCode="1" android:versionName="0.0.2" android:installLocation="auto">
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.8bit.bitwarden" android:versionCode="1" android:versionName="0.0.2" android:installLocation="auto">
|
||||||
<uses-sdk android:minSdkVersion="15" android:targetSdkVersion="23" />
|
<uses-sdk android:minSdkVersion="15" android:targetSdkVersion="23" />
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
<uses-permission android:name="android.permission.USE_FINGERPRINT" />
|
<uses-permission android:name="android.permission.USE_FINGERPRINT" />
|
||||||
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
|
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
|
||||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||||
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
|
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
|
||||||
<uses-permission android:name="com.bitwarden.vault.permission.C2D_MESSAGE" />
|
<uses-permission android:name="com.8bit.bitwarden.permission.C2D_MESSAGE" />
|
||||||
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
|
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
|
||||||
<application android:label="bitwarden" android:theme="@style/BitwardenTheme"></application>
|
<application android:label="bitwarden" android:theme="@style/BitwardenTheme"></application>
|
||||||
</manifest>
|
</manifest>
|
|
@ -15,6 +15,7 @@ using Android.App;
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
[assembly: ComVisible(false)]
|
[assembly: ComVisible(false)]
|
||||||
|
[assembly: MetaData("net.hockeyapp.android.appIdentifier", Value = "d3834185b4a643479047b86c65293d42")]
|
||||||
|
|
||||||
// Version information for an assembly consists of the following four values:
|
// Version information for an assembly consists of the following four values:
|
||||||
//
|
//
|
||||||
|
|
79
src/Android/Resources/Resource.Designer.cs
generated
79
src/Android/Resources/Resource.Designer.cs
generated
|
@ -1310,32 +1310,32 @@ namespace Bit.Android
|
||||||
public partial class Color
|
public partial class Color
|
||||||
{
|
{
|
||||||
|
|
||||||
// aapt resource value: 0x7f0a0069
|
|
||||||
public const int abc_background_cache_hint_selector_material_dark = 2131361897;
|
|
||||||
|
|
||||||
// aapt resource value: 0x7f0a006a
|
// aapt resource value: 0x7f0a006a
|
||||||
public const int abc_background_cache_hint_selector_material_light = 2131361898;
|
public const int abc_background_cache_hint_selector_material_dark = 2131361898;
|
||||||
|
|
||||||
// aapt resource value: 0x7f0a006b
|
// aapt resource value: 0x7f0a006b
|
||||||
public const int abc_color_highlight_material = 2131361899;
|
public const int abc_background_cache_hint_selector_material_light = 2131361899;
|
||||||
|
|
||||||
|
// aapt resource value: 0x7f0a006c
|
||||||
|
public const int abc_color_highlight_material = 2131361900;
|
||||||
|
|
||||||
// aapt resource value: 0x7f0a0015
|
// aapt resource value: 0x7f0a0015
|
||||||
public const int abc_input_method_navigation_guard = 2131361813;
|
public const int abc_input_method_navigation_guard = 2131361813;
|
||||||
|
|
||||||
// aapt resource value: 0x7f0a006c
|
|
||||||
public const int abc_primary_text_disable_only_material_dark = 2131361900;
|
|
||||||
|
|
||||||
// aapt resource value: 0x7f0a006d
|
// aapt resource value: 0x7f0a006d
|
||||||
public const int abc_primary_text_disable_only_material_light = 2131361901;
|
public const int abc_primary_text_disable_only_material_dark = 2131361901;
|
||||||
|
|
||||||
// aapt resource value: 0x7f0a006e
|
// aapt resource value: 0x7f0a006e
|
||||||
public const int abc_primary_text_material_dark = 2131361902;
|
public const int abc_primary_text_disable_only_material_light = 2131361902;
|
||||||
|
|
||||||
// aapt resource value: 0x7f0a006f
|
// aapt resource value: 0x7f0a006f
|
||||||
public const int abc_primary_text_material_light = 2131361903;
|
public const int abc_primary_text_material_dark = 2131361903;
|
||||||
|
|
||||||
// aapt resource value: 0x7f0a0070
|
// aapt resource value: 0x7f0a0070
|
||||||
public const int abc_search_url_text = 2131361904;
|
public const int abc_primary_text_material_light = 2131361904;
|
||||||
|
|
||||||
|
// aapt resource value: 0x7f0a0071
|
||||||
|
public const int abc_search_url_text = 2131361905;
|
||||||
|
|
||||||
// aapt resource value: 0x7f0a0016
|
// aapt resource value: 0x7f0a0016
|
||||||
public const int abc_search_url_text_normal = 2131361814;
|
public const int abc_search_url_text_normal = 2131361814;
|
||||||
|
@ -1346,14 +1346,14 @@ namespace Bit.Android
|
||||||
// aapt resource value: 0x7f0a0018
|
// aapt resource value: 0x7f0a0018
|
||||||
public const int abc_search_url_text_selected = 2131361816;
|
public const int abc_search_url_text_selected = 2131361816;
|
||||||
|
|
||||||
// aapt resource value: 0x7f0a0071
|
|
||||||
public const int abc_secondary_text_material_dark = 2131361905;
|
|
||||||
|
|
||||||
// aapt resource value: 0x7f0a0072
|
// aapt resource value: 0x7f0a0072
|
||||||
public const int abc_secondary_text_material_light = 2131361906;
|
public const int abc_secondary_text_material_dark = 2131361906;
|
||||||
|
|
||||||
// aapt resource value: 0x7f0a0068
|
// aapt resource value: 0x7f0a0073
|
||||||
public const int accent = 2131361896;
|
public const int abc_secondary_text_material_light = 2131361907;
|
||||||
|
|
||||||
|
// aapt resource value: 0x7f0a0069
|
||||||
|
public const int accent = 2131361897;
|
||||||
|
|
||||||
// aapt resource value: 0x7f0a0019
|
// aapt resource value: 0x7f0a0019
|
||||||
public const int accent_material_dark = 2131361817;
|
public const int accent_material_dark = 2131361817;
|
||||||
|
@ -1373,6 +1373,9 @@ namespace Bit.Android
|
||||||
// aapt resource value: 0x7f0a001e
|
// aapt resource value: 0x7f0a001e
|
||||||
public const int background_material_light = 2131361822;
|
public const int background_material_light = 2131361822;
|
||||||
|
|
||||||
|
// aapt resource value: 0x7f0a0064
|
||||||
|
public const int black = 2131361892;
|
||||||
|
|
||||||
// aapt resource value: 0x7f0a001f
|
// aapt resource value: 0x7f0a001f
|
||||||
public const int bright_foreground_disabled_material_dark = 2131361823;
|
public const int bright_foreground_disabled_material_dark = 2131361823;
|
||||||
|
|
||||||
|
@ -1412,8 +1415,8 @@ namespace Bit.Android
|
||||||
// aapt resource value: 0x7f0a0008
|
// aapt resource value: 0x7f0a0008
|
||||||
public const int common_action_bar_splitter = 2131361800;
|
public const int common_action_bar_splitter = 2131361800;
|
||||||
|
|
||||||
// aapt resource value: 0x7f0a0073
|
// aapt resource value: 0x7f0a0074
|
||||||
public const int common_google_signin_btn_text_dark = 2131361907;
|
public const int common_google_signin_btn_text_dark = 2131361908;
|
||||||
|
|
||||||
// aapt resource value: 0x7f0a0009
|
// aapt resource value: 0x7f0a0009
|
||||||
public const int common_google_signin_btn_text_dark_default = 2131361801;
|
public const int common_google_signin_btn_text_dark_default = 2131361801;
|
||||||
|
@ -1427,8 +1430,8 @@ namespace Bit.Android
|
||||||
// aapt resource value: 0x7f0a000a
|
// aapt resource value: 0x7f0a000a
|
||||||
public const int common_google_signin_btn_text_dark_pressed = 2131361802;
|
public const int common_google_signin_btn_text_dark_pressed = 2131361802;
|
||||||
|
|
||||||
// aapt resource value: 0x7f0a0074
|
// aapt resource value: 0x7f0a0075
|
||||||
public const int common_google_signin_btn_text_light = 2131361908;
|
public const int common_google_signin_btn_text_light = 2131361909;
|
||||||
|
|
||||||
// aapt resource value: 0x7f0a000d
|
// aapt resource value: 0x7f0a000d
|
||||||
public const int common_google_signin_btn_text_light_default = 2131361805;
|
public const int common_google_signin_btn_text_light_default = 2131361805;
|
||||||
|
@ -1442,8 +1445,8 @@ namespace Bit.Android
|
||||||
// aapt resource value: 0x7f0a000e
|
// aapt resource value: 0x7f0a000e
|
||||||
public const int common_google_signin_btn_text_light_pressed = 2131361806;
|
public const int common_google_signin_btn_text_light_pressed = 2131361806;
|
||||||
|
|
||||||
// aapt resource value: 0x7f0a0075
|
// aapt resource value: 0x7f0a0076
|
||||||
public const int common_plus_signin_btn_text_dark = 2131361909;
|
public const int common_plus_signin_btn_text_dark = 2131361910;
|
||||||
|
|
||||||
// aapt resource value: 0x7f0a0000
|
// aapt resource value: 0x7f0a0000
|
||||||
public const int common_plus_signin_btn_text_dark_default = 2131361792;
|
public const int common_plus_signin_btn_text_dark_default = 2131361792;
|
||||||
|
@ -1457,8 +1460,8 @@ namespace Bit.Android
|
||||||
// aapt resource value: 0x7f0a0001
|
// aapt resource value: 0x7f0a0001
|
||||||
public const int common_plus_signin_btn_text_dark_pressed = 2131361793;
|
public const int common_plus_signin_btn_text_dark_pressed = 2131361793;
|
||||||
|
|
||||||
// aapt resource value: 0x7f0a0076
|
// aapt resource value: 0x7f0a0077
|
||||||
public const int common_plus_signin_btn_text_light = 2131361910;
|
public const int common_plus_signin_btn_text_light = 2131361911;
|
||||||
|
|
||||||
// aapt resource value: 0x7f0a0004
|
// aapt resource value: 0x7f0a0004
|
||||||
public const int common_plus_signin_btn_text_light_default = 2131361796;
|
public const int common_plus_signin_btn_text_light_default = 2131361796;
|
||||||
|
@ -1472,8 +1475,8 @@ namespace Bit.Android
|
||||||
// aapt resource value: 0x7f0a0005
|
// aapt resource value: 0x7f0a0005
|
||||||
public const int common_plus_signin_btn_text_light_pressed = 2131361797;
|
public const int common_plus_signin_btn_text_light_pressed = 2131361797;
|
||||||
|
|
||||||
// aapt resource value: 0x7f0a0064
|
// aapt resource value: 0x7f0a0065
|
||||||
public const int darkgray = 2131361892;
|
public const int darkgray = 2131361893;
|
||||||
|
|
||||||
// aapt resource value: 0x7f0a004f
|
// aapt resource value: 0x7f0a004f
|
||||||
public const int design_fab_shadow_end_color = 2131361871;
|
public const int design_fab_shadow_end_color = 2131361871;
|
||||||
|
@ -1523,8 +1526,8 @@ namespace Bit.Android
|
||||||
// aapt resource value: 0x7f0a002c
|
// aapt resource value: 0x7f0a002c
|
||||||
public const int foreground_material_light = 2131361836;
|
public const int foreground_material_light = 2131361836;
|
||||||
|
|
||||||
// aapt resource value: 0x7f0a0065
|
// aapt resource value: 0x7f0a0066
|
||||||
public const int gray = 2131361893;
|
public const int gray = 2131361894;
|
||||||
|
|
||||||
// aapt resource value: 0x7f0a002d
|
// aapt resource value: 0x7f0a002d
|
||||||
public const int highlighted_text_material_dark = 2131361837;
|
public const int highlighted_text_material_dark = 2131361837;
|
||||||
|
@ -1568,8 +1571,8 @@ namespace Bit.Android
|
||||||
// aapt resource value: 0x7f0a0062
|
// aapt resource value: 0x7f0a0062
|
||||||
public const int hockeyapp_text_white = 2131361890;
|
public const int hockeyapp_text_white = 2131361890;
|
||||||
|
|
||||||
// aapt resource value: 0x7f0a0066
|
// aapt resource value: 0x7f0a0067
|
||||||
public const int lightgray = 2131361894;
|
public const int lightgray = 2131361895;
|
||||||
|
|
||||||
// aapt resource value: 0x7f0a0031
|
// aapt resource value: 0x7f0a0031
|
||||||
public const int material_blue_grey_800 = 2131361841;
|
public const int material_blue_grey_800 = 2131361841;
|
||||||
|
@ -1607,8 +1610,8 @@ namespace Bit.Android
|
||||||
// aapt resource value: 0x7f0a003c
|
// aapt resource value: 0x7f0a003c
|
||||||
public const int material_grey_900 = 2131361852;
|
public const int material_grey_900 = 2131361852;
|
||||||
|
|
||||||
// aapt resource value: 0x7f0a0067
|
// aapt resource value: 0x7f0a0068
|
||||||
public const int primary = 2131361895;
|
public const int primary = 2131361896;
|
||||||
|
|
||||||
// aapt resource value: 0x7f0a003d
|
// aapt resource value: 0x7f0a003d
|
||||||
public const int primary_dark_material_dark = 2131361853;
|
public const int primary_dark_material_dark = 2131361853;
|
||||||
|
@ -1658,11 +1661,11 @@ namespace Bit.Android
|
||||||
// aapt resource value: 0x7f0a004c
|
// aapt resource value: 0x7f0a004c
|
||||||
public const int switch_thumb_disabled_material_light = 2131361868;
|
public const int switch_thumb_disabled_material_light = 2131361868;
|
||||||
|
|
||||||
// aapt resource value: 0x7f0a0077
|
|
||||||
public const int switch_thumb_material_dark = 2131361911;
|
|
||||||
|
|
||||||
// aapt resource value: 0x7f0a0078
|
// aapt resource value: 0x7f0a0078
|
||||||
public const int switch_thumb_material_light = 2131361912;
|
public const int switch_thumb_material_dark = 2131361912;
|
||||||
|
|
||||||
|
// aapt resource value: 0x7f0a0079
|
||||||
|
public const int switch_thumb_material_light = 2131361913;
|
||||||
|
|
||||||
// aapt resource value: 0x7f0a004d
|
// aapt resource value: 0x7f0a004d
|
||||||
public const int switch_thumb_normal_material_dark = 2131361869;
|
public const int switch_thumb_normal_material_dark = 2131361869;
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<resources>
|
<resources>
|
||||||
<style name="BitwardenTheme" parent="android:Theme.Material.Light.DarkActionBar">
|
<style name="BitwardenTheme" parent="android:Theme.Material.Light.DarkActionBar">
|
||||||
<item name="android:colorPrimary">@color/primary</item>
|
<item name="android:colorPrimary">@color/primary</item>
|
||||||
<item name="android:textColorPrimary">@color/darkgray</item>
|
<item name="android:textColorPrimary">@color/black</item>
|
||||||
<item name="android:colorAccent">@color/accent</item>
|
<item name="android:colorAccent">@color/accent</item>
|
||||||
<item name="android:windowBackground">@color/lightgray</item>
|
<item name="android:windowBackground">@color/lightgray</item>
|
||||||
</style>
|
</style>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<resources>
|
<resources>
|
||||||
<color name="white">#FFFFFF</color>
|
<color name="white">#FFFFFF</color>
|
||||||
<color name="darkgray">#333333</color>
|
<color name="black">#000000</color>
|
||||||
<color name="gray">#738182</color>
|
<color name="darkgray">#333333</color>
|
||||||
<color name="lightgray">#efeff4</color>
|
<color name="gray">#738182</color>
|
||||||
<color name="primary">#222d32</color>
|
<color name="lightgray">#efeff4</color>
|
||||||
<color name="accent">#3c8dbc</color>
|
<color name="primary">#222d32</color>
|
||||||
|
<color name="accent">#3c8dbc</color>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<resources>
|
<resources>
|
||||||
<style name="BitwardenTheme" parent="android:Theme.Holo.Light.DarkActionBar">
|
<style name="BitwardenTheme" parent="android:Theme.Holo.Light.DarkActionBar">
|
||||||
<item name="android:colorPrimary">@color/primary</item>
|
<item name="android:colorPrimary">@color/primary</item>
|
||||||
<item name="android:textColorPrimary">@color/darkgray</item>
|
<item name="android:textColorPrimary">@color/black</item>
|
||||||
<item name="android:colorAccent">@color/accent</item>
|
<item name="android:colorAccent">@color/accent</item>
|
||||||
<item name="android:windowBackground">@color/lightgray</item>
|
<item name="android:windowBackground">@color/lightgray</item>
|
||||||
</style>
|
</style>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -6,6 +6,14 @@ namespace Bit.App.Controls
|
||||||
{
|
{
|
||||||
public class ExtendedEntry : Entry
|
public class ExtendedEntry : Entry
|
||||||
{
|
{
|
||||||
|
public ExtendedEntry()
|
||||||
|
{
|
||||||
|
if(Device.OS == TargetPlatform.Android)
|
||||||
|
{
|
||||||
|
PlaceholderColor = Color.FromHex("c7c7cd");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static readonly BindableProperty HasBorderProperty =
|
public static readonly BindableProperty HasBorderProperty =
|
||||||
BindableProperty.Create(nameof(HasBorder), typeof(bool), typeof(ExtendedEntry), true);
|
BindableProperty.Create(nameof(HasBorder), typeof(bool), typeof(ExtendedEntry), true);
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,11 @@ namespace Bit.App.Controls
|
||||||
{
|
{
|
||||||
public ExtendedTextCell()
|
public ExtendedTextCell()
|
||||||
{
|
{
|
||||||
|
if(Device.OS == TargetPlatform.Android)
|
||||||
|
{
|
||||||
|
TextColor = Color.Black;
|
||||||
|
}
|
||||||
|
|
||||||
DetailColor = Color.FromHex("777777");
|
DetailColor = Color.FromHex("777777");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,7 +46,13 @@ namespace Bit.App.Controls
|
||||||
|
|
||||||
public void OnDisclousureTapped()
|
public void OnDisclousureTapped()
|
||||||
{
|
{
|
||||||
DisclousureTapped?.Invoke(this, EventArgs.Empty);
|
if(DisclousureTapped == null)
|
||||||
|
{
|
||||||
|
OnTapped();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
DisclousureTapped.Invoke(this, EventArgs.Empty);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,11 @@ namespace Bit.App.Controls
|
||||||
Style = (Style)Application.Current.Resources["text-muted"],
|
Style = (Style)Application.Current.Resources["text-muted"],
|
||||||
HorizontalOptions = LayoutOptions.FillAndExpand
|
HorizontalOptions = LayoutOptions.FillAndExpand
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if(Device.OS == TargetPlatform.Android)
|
||||||
|
{
|
||||||
|
Label.FontSize = Device.GetNamedSize(NamedSize.Micro, typeof(Label));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Entry = new ExtendedEntry
|
Entry = new ExtendedEntry
|
||||||
|
@ -36,6 +41,12 @@ namespace Bit.App.Controls
|
||||||
HorizontalOptions = LayoutOptions.FillAndExpand
|
HorizontalOptions = LayoutOptions.FillAndExpand
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if(Device.OS == TargetPlatform.Android)
|
||||||
|
{
|
||||||
|
Entry.FontSize = Device.GetNamedSize(NamedSize.Small, typeof(Label));
|
||||||
|
Entry.TextColor = Color.Black;
|
||||||
|
}
|
||||||
|
|
||||||
if(useLabelAsPlaceholder)
|
if(useLabelAsPlaceholder)
|
||||||
{
|
{
|
||||||
Entry.Placeholder = labelText;
|
Entry.Placeholder = labelText;
|
||||||
|
|
|
@ -8,7 +8,6 @@ namespace Bit.App.Controls
|
||||||
{
|
{
|
||||||
Label = new Label
|
Label = new Label
|
||||||
{
|
{
|
||||||
VerticalOptions = LayoutOptions.CenterAndExpand,
|
|
||||||
LineBreakMode = LineBreakMode.TailTruncation
|
LineBreakMode = LineBreakMode.TailTruncation
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -16,14 +15,13 @@ namespace Bit.App.Controls
|
||||||
{
|
{
|
||||||
FontSize = Device.GetNamedSize(NamedSize.Small, typeof(Label)),
|
FontSize = Device.GetNamedSize(NamedSize.Small, typeof(Label)),
|
||||||
LineBreakMode = LineBreakMode.TailTruncation,
|
LineBreakMode = LineBreakMode.TailTruncation,
|
||||||
VerticalOptions = LayoutOptions.End,
|
Style = (Style)Application.Current.Resources["text-muted"]
|
||||||
Style = (Style)Application.Current.Resources["text-muted"],
|
|
||||||
};
|
};
|
||||||
|
|
||||||
var labelDetailStackLayout = new StackLayout
|
var labelDetailStackLayout = new StackLayout
|
||||||
{
|
{
|
||||||
HorizontalOptions = LayoutOptions.StartAndExpand,
|
HorizontalOptions = LayoutOptions.StartAndExpand,
|
||||||
VerticalOptions = LayoutOptions.FillAndExpand,
|
VerticalOptions = LayoutOptions.CenterAndExpand,
|
||||||
Children = { Label, Detail },
|
Children = { Label, Detail },
|
||||||
Padding = new Thickness(15, 5, 5, 5),
|
Padding = new Thickness(15, 5, 5, 5),
|
||||||
Spacing = 0
|
Spacing = 0
|
||||||
|
@ -32,7 +30,7 @@ namespace Bit.App.Controls
|
||||||
Button = new Button
|
Button = new Button
|
||||||
{
|
{
|
||||||
HorizontalOptions = LayoutOptions.End,
|
HorizontalOptions = LayoutOptions.End,
|
||||||
VerticalOptions = LayoutOptions.FillAndExpand,
|
VerticalOptions = LayoutOptions.CenterAndExpand,
|
||||||
WidthRequest = 50
|
WidthRequest = 50
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -42,6 +40,12 @@ namespace Bit.App.Controls
|
||||||
Children = { labelDetailStackLayout, Button }
|
Children = { labelDetailStackLayout, Button }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if(Device.OS == TargetPlatform.Android)
|
||||||
|
{
|
||||||
|
Label.TextColor = Color.Black;
|
||||||
|
Detail.FontSize = Device.GetNamedSize(NamedSize.Micro, typeof(Label));
|
||||||
|
}
|
||||||
|
|
||||||
View = containerStackLayout;
|
View = containerStackLayout;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@ namespace Bit.App.Pages
|
||||||
NoFooter = true,
|
NoFooter = true,
|
||||||
Root = new TableRoot
|
Root = new TableRoot
|
||||||
{
|
{
|
||||||
new TableSection()
|
new TableSection
|
||||||
{
|
{
|
||||||
PasswordCell
|
PasswordCell
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,7 +48,10 @@ namespace Bit.App.Pages
|
||||||
{
|
{
|
||||||
MessagingCenter.Send(Application.Current, "ShowStatusBar", true);
|
MessagingCenter.Send(Application.Current, "ShowStatusBar", true);
|
||||||
|
|
||||||
var padding = new Thickness(15, 20);
|
var padding = Device.OnPlatform(
|
||||||
|
iOS: new Thickness(15, 20),
|
||||||
|
Android: new Thickness(15, 8),
|
||||||
|
WinPhone: new Thickness(15, 20));
|
||||||
|
|
||||||
PasswordCell = new FormEntryCell(AppResources.MasterPassword, IsPassword: true,
|
PasswordCell = new FormEntryCell(AppResources.MasterPassword, IsPassword: true,
|
||||||
useLabelAsPlaceholder: true, imageSource: "lock", containerPadding: padding);
|
useLabelAsPlaceholder: true, imageSource: "lock", containerPadding: padding);
|
||||||
|
@ -166,11 +169,13 @@ namespace Bit.App.Pages
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var key = _cryptoService.MakeKeyFromPassword(PasswordCell.Entry.Text, EmailCell.Entry.Text);
|
var normalizedEmail = EmailCell.Entry.Text.ToLower();
|
||||||
|
|
||||||
|
var key = _cryptoService.MakeKeyFromPassword(PasswordCell.Entry.Text, normalizedEmail);
|
||||||
|
|
||||||
var request = new TokenRequest
|
var request = new TokenRequest
|
||||||
{
|
{
|
||||||
Email = EmailCell.Entry.Text,
|
Email = normalizedEmail,
|
||||||
MasterPasswordHash = _cryptoService.HashPasswordBase64(key, PasswordCell.Entry.Text),
|
MasterPasswordHash = _cryptoService.HashPasswordBase64(key, PasswordCell.Entry.Text),
|
||||||
Device = new DeviceRequest(_appIdService, _deviceInfo)
|
Device = new DeviceRequest(_appIdService, _deviceInfo)
|
||||||
};
|
};
|
||||||
|
|
|
@ -38,8 +38,13 @@ namespace Bit.App.Pages
|
||||||
|
|
||||||
private void Init()
|
private void Init()
|
||||||
{
|
{
|
||||||
|
var padding = Device.OnPlatform(
|
||||||
|
iOS: new Thickness(15, 20),
|
||||||
|
Android: new Thickness(15, 8),
|
||||||
|
WinPhone: new Thickness(15, 20));
|
||||||
|
|
||||||
CodeCell = new FormEntryCell("Verification Code", useLabelAsPlaceholder: true,
|
CodeCell = new FormEntryCell("Verification Code", useLabelAsPlaceholder: true,
|
||||||
imageSource: "lock", containerPadding: new Thickness(15, 20));
|
imageSource: "lock", containerPadding: padding);
|
||||||
|
|
||||||
CodeCell.Entry.Keyboard = Keyboard.Numeric;
|
CodeCell.Entry.Keyboard = Keyboard.Numeric;
|
||||||
CodeCell.Entry.ReturnType = Enums.ReturnType.Go;
|
CodeCell.Entry.ReturnType = Enums.ReturnType.Go;
|
||||||
|
|
|
@ -30,8 +30,13 @@ namespace Bit.App.Pages
|
||||||
|
|
||||||
private void Init()
|
private void Init()
|
||||||
{
|
{
|
||||||
|
var padding = Device.OnPlatform(
|
||||||
|
iOS: new Thickness(15, 20),
|
||||||
|
Android: new Thickness(15, 8),
|
||||||
|
WinPhone: new Thickness(15, 20));
|
||||||
|
|
||||||
EmailCell = new FormEntryCell(AppResources.EmailAddress, entryKeyboard: Keyboard.Email,
|
EmailCell = new FormEntryCell(AppResources.EmailAddress, entryKeyboard: Keyboard.Email,
|
||||||
useLabelAsPlaceholder: true, imageSource: "envelope", containerPadding: new Thickness(15, 20));
|
useLabelAsPlaceholder: true, imageSource: "envelope", containerPadding: padding);
|
||||||
|
|
||||||
EmailCell.Entry.ReturnType = Enums.ReturnType.Go;
|
EmailCell.Entry.ReturnType = Enums.ReturnType.Go;
|
||||||
EmailCell.Entry.Completed += Entry_Completed;
|
EmailCell.Entry.Completed += Entry_Completed;
|
||||||
|
|
|
@ -40,7 +40,10 @@ namespace Bit.App.Pages
|
||||||
{
|
{
|
||||||
MessagingCenter.Send(Application.Current, "ShowStatusBar", true);
|
MessagingCenter.Send(Application.Current, "ShowStatusBar", true);
|
||||||
|
|
||||||
var padding = new Thickness(15, 20);
|
var padding = Device.OnPlatform(
|
||||||
|
iOS: new Thickness(15, 20),
|
||||||
|
Android: new Thickness(15, 8),
|
||||||
|
WinPhone: new Thickness(15, 20));
|
||||||
|
|
||||||
PasswordHintCell = new FormEntryCell("Master Password Hint (optional)", useLabelAsPlaceholder: true,
|
PasswordHintCell = new FormEntryCell("Master Password Hint (optional)", useLabelAsPlaceholder: true,
|
||||||
imageSource: "lightbulb", containerPadding: padding);
|
imageSource: "lightbulb", containerPadding: padding);
|
||||||
|
@ -169,10 +172,11 @@ namespace Bit.App.Pages
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var key = _cryptoService.MakeKeyFromPassword(PasswordCell.Entry.Text, EmailCell.Entry.Text);
|
var normalizedEmail = EmailCell.Entry.Text.ToLower();
|
||||||
|
var key = _cryptoService.MakeKeyFromPassword(PasswordCell.Entry.Text, normalizedEmail);
|
||||||
var request = new RegisterRequest
|
var request = new RegisterRequest
|
||||||
{
|
{
|
||||||
Email = EmailCell.Entry.Text,
|
Email = normalizedEmail,
|
||||||
MasterPasswordHash = _cryptoService.HashPasswordBase64(key, PasswordCell.Entry.Text),
|
MasterPasswordHash = _cryptoService.HashPasswordBase64(key, PasswordCell.Entry.Text),
|
||||||
MasterPasswordHint = !string.IsNullOrWhiteSpace(PasswordHintCell.Entry.Text) ? PasswordHintCell.Entry.Text : null
|
MasterPasswordHint = !string.IsNullOrWhiteSpace(PasswordHintCell.Entry.Text) ? PasswordHintCell.Entry.Text : null
|
||||||
};
|
};
|
||||||
|
@ -188,7 +192,7 @@ namespace Bit.App.Pages
|
||||||
}
|
}
|
||||||
|
|
||||||
_googleAnalyticsService.TrackAppEvent("Registered");
|
_googleAnalyticsService.TrackAppEvent("Registered");
|
||||||
await _homePage.DismissRegisterAndLoginAsync(EmailCell.Entry.Text);
|
await _homePage.DismissRegisterAndLoginAsync(normalizedEmail);
|
||||||
}
|
}
|
||||||
|
|
||||||
private class FormTableView : ExtendedTableView
|
private class FormTableView : ExtendedTableView
|
||||||
|
|
|
@ -71,7 +71,7 @@ namespace Bit.App.Pages
|
||||||
ToolbarItems.Add(new AddSiteToolBarItem(this));
|
ToolbarItems.Add(new AddSiteToolBarItem(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
ListView = new ListView
|
ListView = new ListView(ListViewCachingStrategy.RecycleElement)
|
||||||
{
|
{
|
||||||
IsGroupingEnabled = true,
|
IsGroupingEnabled = true,
|
||||||
ItemsSource = PresentationFolders,
|
ItemsSource = PresentationFolders,
|
||||||
|
|
Loading…
Reference in a new issue