mirror of
https://github.com/bitwarden/android.git
synced 2024-12-24 09:58:27 +03:00
UI updates to ios extension
This commit is contained in:
parent
e22918a562
commit
afbc5a903b
7 changed files with 67 additions and 32 deletions
|
@ -145,6 +145,7 @@ Global
|
||||||
{1F78403F-9A28-405B-9289-B9DBEB55F074}.Debug|x64.ActiveCfg = Debug|iPhone
|
{1F78403F-9A28-405B-9289-B9DBEB55F074}.Debug|x64.ActiveCfg = Debug|iPhone
|
||||||
{1F78403F-9A28-405B-9289-B9DBEB55F074}.Debug|x86.ActiveCfg = Debug|iPhone
|
{1F78403F-9A28-405B-9289-B9DBEB55F074}.Debug|x86.ActiveCfg = Debug|iPhone
|
||||||
{1F78403F-9A28-405B-9289-B9DBEB55F074}.Release|Any CPU.ActiveCfg = Release|iPhone
|
{1F78403F-9A28-405B-9289-B9DBEB55F074}.Release|Any CPU.ActiveCfg = Release|iPhone
|
||||||
|
{1F78403F-9A28-405B-9289-B9DBEB55F074}.Release|Any CPU.Build.0 = Release|iPhone
|
||||||
{1F78403F-9A28-405B-9289-B9DBEB55F074}.Release|ARM.ActiveCfg = Release|iPhone
|
{1F78403F-9A28-405B-9289-B9DBEB55F074}.Release|ARM.ActiveCfg = Release|iPhone
|
||||||
{1F78403F-9A28-405B-9289-B9DBEB55F074}.Release|iPhone.ActiveCfg = Release|iPhone
|
{1F78403F-9A28-405B-9289-B9DBEB55F074}.Release|iPhone.ActiveCfg = Release|iPhone
|
||||||
{1F78403F-9A28-405B-9289-B9DBEB55F074}.Release|iPhone.Build.0 = Release|iPhone
|
{1F78403F-9A28-405B-9289-B9DBEB55F074}.Release|iPhone.Build.0 = Release|iPhone
|
||||||
|
@ -274,6 +275,7 @@ Global
|
||||||
{32F5A2D6-F54D-4DA1-AE26-0A980D48F422}.Debug|x64.ActiveCfg = Debug|iPhone
|
{32F5A2D6-F54D-4DA1-AE26-0A980D48F422}.Debug|x64.ActiveCfg = Debug|iPhone
|
||||||
{32F5A2D6-F54D-4DA1-AE26-0A980D48F422}.Debug|x86.ActiveCfg = Debug|iPhone
|
{32F5A2D6-F54D-4DA1-AE26-0A980D48F422}.Debug|x86.ActiveCfg = Debug|iPhone
|
||||||
{32F5A2D6-F54D-4DA1-AE26-0A980D48F422}.Release|Any CPU.ActiveCfg = Release|iPhone
|
{32F5A2D6-F54D-4DA1-AE26-0A980D48F422}.Release|Any CPU.ActiveCfg = Release|iPhone
|
||||||
|
{32F5A2D6-F54D-4DA1-AE26-0A980D48F422}.Release|Any CPU.Build.0 = Release|iPhone
|
||||||
{32F5A2D6-F54D-4DA1-AE26-0A980D48F422}.Release|ARM.ActiveCfg = Release|iPhone
|
{32F5A2D6-F54D-4DA1-AE26-0A980D48F422}.Release|ARM.ActiveCfg = Release|iPhone
|
||||||
{32F5A2D6-F54D-4DA1-AE26-0A980D48F422}.Release|iPhone.ActiveCfg = Release|iPhone
|
{32F5A2D6-F54D-4DA1-AE26-0A980D48F422}.Release|iPhone.ActiveCfg = Release|iPhone
|
||||||
{32F5A2D6-F54D-4DA1-AE26-0A980D48F422}.Release|iPhone.Build.0 = Release|iPhone
|
{32F5A2D6-F54D-4DA1-AE26-0A980D48F422}.Release|iPhone.Build.0 = Release|iPhone
|
||||||
|
|
|
@ -22,18 +22,15 @@ namespace Bit.iOS.Extension
|
||||||
public override void ViewDidLoad()
|
public override void ViewDidLoad()
|
||||||
{
|
{
|
||||||
base.ViewDidLoad();
|
base.ViewDidLoad();
|
||||||
View.BackgroundColor = UIColor.FromPatternImage(new UIImage("boxed-bg.png"));
|
|
||||||
NavigationController.NavigationBar.TintColor = UIColor.White;
|
|
||||||
NavigationController.NavigationBar.BarTintColor = new UIColor(0.24f, 0.55f, 0.74f, 1.0f);
|
|
||||||
NavigationController.NavigationBar.TitleTextAttributes = new UIStringAttributes() { ForegroundColor = UIColor.White };
|
|
||||||
|
|
||||||
List<string> sites = new List<string>();
|
List<Tuple<string, string>> sites = new List<Tuple<string, string>>();
|
||||||
for(int i = 1; i <= 100; i++)
|
for(int i = 1; i <= 100; i++)
|
||||||
{
|
{
|
||||||
sites.Add("Site " + i);
|
sites.Add(new Tuple<string, string>("Site " + i, "Username " + i));
|
||||||
}
|
}
|
||||||
|
|
||||||
tableView.Source = new TableSource(sites, this);
|
tableView.Source = new TableSource(sites, this);
|
||||||
|
AutomaticallyAdjustsScrollViewInsets = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
partial void CancelClicked(UIBarButtonItem sender)
|
partial void CancelClicked(UIBarButtonItem sender)
|
||||||
|
@ -54,11 +51,11 @@ namespace Bit.iOS.Extension
|
||||||
{
|
{
|
||||||
private const string CellIdentifier = "TableCell";
|
private const string CellIdentifier = "TableCell";
|
||||||
|
|
||||||
private IEnumerable<string> _tableItems;
|
private IEnumerable<Tuple<string, string>> _tableItems;
|
||||||
private Context _context;
|
private Context _context;
|
||||||
private ActionViewController _controller;
|
private ActionViewController _controller;
|
||||||
|
|
||||||
public TableSource(IEnumerable<string> items, ActionViewController controller)
|
public TableSource(IEnumerable<Tuple<string, string>> items, ActionViewController controller)
|
||||||
{
|
{
|
||||||
_tableItems = items;
|
_tableItems = items;
|
||||||
_context = controller.Context;
|
_context = controller.Context;
|
||||||
|
@ -78,10 +75,11 @@ namespace Bit.iOS.Extension
|
||||||
// if there are no cells to reuse, create a new one
|
// if there are no cells to reuse, create a new one
|
||||||
if(cell == null)
|
if(cell == null)
|
||||||
{
|
{
|
||||||
cell = new UITableViewCell(UITableViewCellStyle.Default, CellIdentifier);
|
cell = new UITableViewCell(UITableViewCellStyle.Subtitle, CellIdentifier);
|
||||||
}
|
}
|
||||||
|
|
||||||
cell.TextLabel.Text = item;
|
cell.TextLabel.Text = item.Item1;
|
||||||
|
cell.DetailTextLabel.Text = item.Item2;
|
||||||
return cell;
|
return cell;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,10 +14,6 @@ namespace Bit.iOS.Extension
|
||||||
[Register ("ActionViewController")]
|
[Register ("ActionViewController")]
|
||||||
partial class ActionViewController
|
partial class ActionViewController
|
||||||
{
|
{
|
||||||
[Outlet]
|
|
||||||
[GeneratedCode ("iOS Designer", "1.0")]
|
|
||||||
UINavigationItem NavItem { get; set; }
|
|
||||||
|
|
||||||
[Outlet]
|
[Outlet]
|
||||||
[GeneratedCode ("iOS Designer", "1.0")]
|
[GeneratedCode ("iOS Designer", "1.0")]
|
||||||
UITableView tableView { get; set; }
|
UITableView tableView { get; set; }
|
||||||
|
@ -31,10 +27,6 @@ namespace Bit.iOS.Extension
|
||||||
|
|
||||||
void ReleaseDesignerOutlets ()
|
void ReleaseDesignerOutlets ()
|
||||||
{
|
{
|
||||||
if (NavItem != null) {
|
|
||||||
NavItem.Dispose ();
|
|
||||||
NavItem = null;
|
|
||||||
}
|
|
||||||
if (tableView != null) {
|
if (tableView != null) {
|
||||||
tableView.Dispose ();
|
tableView.Dispose ();
|
||||||
tableView = null;
|
tableView = null;
|
||||||
|
|
|
@ -28,8 +28,7 @@ namespace Bit.iOS.Extension
|
||||||
public override void ViewDidLoad()
|
public override void ViewDidLoad()
|
||||||
{
|
{
|
||||||
base.ViewDidLoad();
|
base.ViewDidLoad();
|
||||||
View.BackgroundColor = UIColor.FromPatternImage(new UIImage("boxed-bg.png"));
|
View.BackgroundColor = UIColor.FromPatternImage(new UIImage("bg.png"));
|
||||||
NavigationController.SetNavigationBarHidden(true, false);
|
|
||||||
_context.ExtContext = ExtensionContext;
|
_context.ExtContext = ExtensionContext;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,14 +17,48 @@
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
<color key="backgroundColor" colorSpace="calibratedWhite" white="1" alpha="1"/>
|
<color key="backgroundColor" colorSpace="calibratedWhite" white="1" alpha="1"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="1717" translatesAutoresizingMaskIntoConstraints="NO">
|
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="1823" translatesAutoresizingMaskIntoConstraints="NO">
|
||||||
<rect key="frame" x="0.0" y="64" width="600" height="536"/>
|
<rect key="frame" x="0.0" y="64" width="600" height="536"/>
|
||||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||||
<prototypes>
|
<prototypes>
|
||||||
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="1722" rowHeight="44">
|
<tableViewCell contentMode="scaleToFill" selectionStyle="gray" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="1824" rowHeight="44" style="IBUITableViewCellStyleSubtitle" textLabel="1834" detailTextLabel="1835">
|
||||||
<rect key="frame" x="0.0" y="22" width="600" height="44"/>
|
<rect key="frame" x="0.0" y="22" width="600" height="44"/>
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="1723" tableViewCell="1722">
|
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="1825" tableViewCell="1824">
|
||||||
|
<rect key="frame" x="0.0" y="0.0" width="600" height="43.5"/>
|
||||||
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
|
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||||
|
<subviews>
|
||||||
|
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Title" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="1834">
|
||||||
|
<rect key="frame" x="15" y="4" width="35.5" height="21.5"/>
|
||||||
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
|
<fontDescription key="fontDescription" type="system" pointSize="18"/>
|
||||||
|
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||||
|
<nil key="highlightedColor"/>
|
||||||
|
</label>
|
||||||
|
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Subtitle" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="1835">
|
||||||
|
<rect key="frame" x="15" y="25.5" width="44" height="14.5"/>
|
||||||
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
|
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||||
|
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||||
|
<nil key="highlightedColor"/>
|
||||||
|
</label>
|
||||||
|
</subviews>
|
||||||
|
</view>
|
||||||
|
</tableViewCell>
|
||||||
|
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="1826" rowHeight="44">
|
||||||
|
<rect key="frame" x="0.0" y="66" width="600" height="44"/>
|
||||||
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
|
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="1827" tableViewCell="1826">
|
||||||
|
<rect key="frame" x="0.0" y="0.0" width="600" height="43.5"/>
|
||||||
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
|
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||||
|
</view>
|
||||||
|
</tableViewCell>
|
||||||
|
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="1828" rowHeight="44">
|
||||||
|
<rect key="frame" x="0.0" y="110" width="600" height="44"/>
|
||||||
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
|
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="1829" tableViewCell="1828">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="600" height="43.5"/>
|
<rect key="frame" x="0.0" y="0.0" width="600" height="43.5"/>
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||||
|
@ -34,10 +68,10 @@
|
||||||
</tableView>
|
</tableView>
|
||||||
</subviews>
|
</subviews>
|
||||||
<constraints>
|
<constraints>
|
||||||
<constraint id="1753" firstItem="1717" firstAttribute="top" secondItem="qkL-Od-lgU" secondAttribute="bottom"/>
|
<constraint id="1830" firstItem="1823" firstAttribute="top" secondItem="qkL-Od-lgU" secondAttribute="bottom"/>
|
||||||
<constraint id="1754" firstItem="1717" firstAttribute="leading" secondItem="zMn-AG-sqS" secondAttribute="leading"/>
|
<constraint id="1831" firstItem="zMn-AG-sqS" firstAttribute="bottom" secondItem="1823" secondAttribute="bottom"/>
|
||||||
<constraint id="1755" firstItem="1717" firstAttribute="trailing" secondItem="zMn-AG-sqS" secondAttribute="trailing"/>
|
<constraint id="1832" firstItem="1823" firstAttribute="leading" secondItem="zMn-AG-sqS" secondAttribute="leading"/>
|
||||||
<constraint id="1756" firstItem="1717" firstAttribute="bottom" secondItem="n38-gi-rB5" secondAttribute="top"/>
|
<constraint id="1833" firstItem="zMn-AG-sqS" firstAttribute="trailing" secondItem="1823" secondAttribute="trailing"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
</view>
|
</view>
|
||||||
<navigationItem key="navigationItem" id="yHH-Ee-etX" title="Sites">
|
<navigationItem key="navigationItem" id="yHH-Ee-etX" title="Sites">
|
||||||
|
@ -45,10 +79,11 @@
|
||||||
<connections>
|
<connections>
|
||||||
<action selector="CancelClicked:" destination="ObA-dk-sSI" id="1729"/>
|
<action selector="CancelClicked:" destination="ObA-dk-sSI" id="1729"/>
|
||||||
</connections>
|
</connections>
|
||||||
|
<color key="tintColor" colorSpace="calibratedWhite" white="1" alpha="1"/>
|
||||||
</barButtonItem>
|
</barButtonItem>
|
||||||
</navigationItem>
|
</navigationItem>
|
||||||
<connections>
|
<connections>
|
||||||
<outlet property="tableView" destination="1717" id="name-outlet-1717"/>
|
<outlet property="tableView" destination="1823" id="name-outlet-1823"/>
|
||||||
</connections>
|
</connections>
|
||||||
</viewController>
|
</viewController>
|
||||||
<placeholder placeholderIdentifier="IBFirstResponder" id="X47-rx-isc" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
<placeholder placeholderIdentifier="IBFirstResponder" id="X47-rx-isc" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||||
|
@ -67,11 +102,15 @@
|
||||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" id="1713" translatesAutoresizingMaskIntoConstraints="NO" fixedFrame="YES" image="logo.png">
|
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" id="1713" translatesAutoresizingMaskIntoConstraints="NO" image="logo.png">
|
||||||
<rect key="frame" x="159" y="278" width="282" height="44"/>
|
<rect key="frame" x="159" y="278" width="282" height="44"/>
|
||||||
</imageView>
|
</imageView>
|
||||||
</subviews>
|
</subviews>
|
||||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||||
|
<constraints>
|
||||||
|
<constraint id="1763" firstItem="1713" firstAttribute="centerY" secondItem="44" secondAttribute="centerY"/>
|
||||||
|
<constraint id="1764" firstItem="1713" firstAttribute="centerX" secondItem="44" secondAttribute="centerX"/>
|
||||||
|
</constraints>
|
||||||
</view>
|
</view>
|
||||||
<connections>
|
<connections>
|
||||||
<segue destination="oCZ-GQ-aOK" kind="show" identifier="seque" id="1679"/>
|
<segue destination="oCZ-GQ-aOK" kind="show" identifier="seque" id="1679"/>
|
||||||
|
@ -85,7 +124,7 @@
|
||||||
<scene sceneID="63">
|
<scene sceneID="63">
|
||||||
<objects>
|
<objects>
|
||||||
<navigationController definesPresentationContext="YES" id="64" sceneMemberID="viewController">
|
<navigationController definesPresentationContext="YES" id="64" sceneMemberID="viewController">
|
||||||
<navigationBar key="navigationBar" contentMode="scaleToFill" id="67">
|
<navigationBar key="navigationBar" contentMode="scaleToFill" id="67" translucent="NO" hidden="YES">
|
||||||
<rect key="frame" x="0.0" y="20" width="880" height="44"/>
|
<rect key="frame" x="0.0" y="20" width="880" height="44"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
|
||||||
</navigationBar>
|
</navigationBar>
|
||||||
|
@ -102,9 +141,13 @@
|
||||||
<objects>
|
<objects>
|
||||||
<navigationController automaticallyAdjustsScrollViewInsets="NO" id="oCZ-GQ-aOK" sceneMemberID="viewController">
|
<navigationController automaticallyAdjustsScrollViewInsets="NO" id="oCZ-GQ-aOK" sceneMemberID="viewController">
|
||||||
<toolbarItems/>
|
<toolbarItems/>
|
||||||
<navigationBar key="navigationBar" contentMode="scaleToFill" id="8A5-AR-QHS">
|
<navigationBar key="navigationBar" contentMode="scaleToFill" id="8A5-AR-QHS" translucent="NO">
|
||||||
<rect key="frame" x="0.0" y="20" width="880" height="44"/>
|
<rect key="frame" x="0.0" y="20" width="880" height="44"/>
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
|
<textAttributes key="titleTextAttributes">
|
||||||
|
<color key="textColor" colorSpace="calibratedWhite" white="1" alpha="1"/>
|
||||||
|
</textAttributes>
|
||||||
|
<color key="barTintColor" colorSpace="calibratedRGB" red="0.23529411764705882" green="0.55294117647058827" blue="0.73725490196078436" alpha="1"/>
|
||||||
</navigationBar>
|
</navigationBar>
|
||||||
<nil name="viewControllers"/>
|
<nil name="viewControllers"/>
|
||||||
<connections>
|
<connections>
|
||||||
|
@ -120,5 +163,6 @@
|
||||||
<image name="logo.png" width="282" height="44"/>
|
<image name="logo.png" width="282" height="44"/>
|
||||||
<image name="Icon.png" width="57" height="57"/>
|
<image name="Icon.png" width="57" height="57"/>
|
||||||
<image name="boxed-bg.png" width="400" height="400"/>
|
<image name="boxed-bg.png" width="400" height="400"/>
|
||||||
|
<image name="bg.png" width="400" height="400"/>
|
||||||
</resources>
|
</resources>
|
||||||
</document>
|
</document>
|
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 62 KiB |
|
@ -148,7 +148,7 @@
|
||||||
<BundleResource Include="Resources\Icon.png" />
|
<BundleResource Include="Resources\Icon.png" />
|
||||||
<BundleResource Include="Resources\Icon%402x.png" />
|
<BundleResource Include="Resources\Icon%402x.png" />
|
||||||
<BundleResource Include="Resources\Icon%403x.png" />
|
<BundleResource Include="Resources\Icon%403x.png" />
|
||||||
<BundleResource Include="Resources\boxed-bg.png" />
|
<BundleResource Include="Resources\bg.png" />
|
||||||
<BundleResource Include="Resources\logo.png" />
|
<BundleResource Include="Resources\logo.png" />
|
||||||
<BundleResource Include="Resources\logo%402x.png" />
|
<BundleResource Include="Resources\logo%402x.png" />
|
||||||
<BundleResource Include="Resources\logo%403x.png" />
|
<BundleResource Include="Resources\logo%403x.png" />
|
||||||
|
|
Loading…
Reference in a new issue