Skip to content

Commit

Permalink
Merge pull request #21 from muak/dev0.2.0
Browse files Browse the repository at this point in the history
ver.0.2.1

## New features

* Add properties of ScrollToTop And ScrollToBottom.
* [PickerCell] Add SubDisplayMember property. (issue #3)
* [Section] Add UseDragSort property.
* [Section] Add HeaderHeight property.
* [Section] Corresponded to DataTemplate and DataTemplateSelector.
* [PickerCell] Add UsePickToClose property. (issue #10)
* [PickerCell] Add UseAutoValueText property.

## Changing

* [CellBase] Support IsEnabled property on all Cells. (issue #11)
* [PickerCell] Become not to throw an exception when ItemsSource count is 0.
* [Android] Replace ListView with RecyclerView.
  • Loading branch information
muak authored Feb 21, 2018
2 parents 1712ad7 + 47b826a commit ec3f796
Show file tree
Hide file tree
Showing 69 changed files with 1,890 additions and 253 deletions.
26 changes: 26 additions & 0 deletions README-ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,15 @@ AndroidとiOSに対応しています。

* Separatorの色の設定
* 選択された時の色の指定
* リストの先頭・最後へのスクロール

### セクション

* セクションごとの表示・非表示の設定
* セクションのフッターの設定
* ヘッダーとフッターの様々な設定
* セクション内にDataTemplateおよびDataTemplateSelectorを適用
* セクション内でドラッグドラッグによる並べ替え

### Cells

Expand Down Expand Up @@ -195,6 +198,10 @@ SettingsViewのプロパティ設定はApp.xamlに記述した方が良いかも
* 行の境界線をセクションの上と下にも表示するかどうか
* (一般的なAndroidアプリでありがちな上と下は表示しないようにしないかどうか)
* デフォルトはtrue(表示する)
* ScrollToTop
* ScrollToBottom
* このプロパティにtrueをセットすると先頭または末尾までスクロールします。
* スクロール完了後は自動でfalseがセットされます。

## SettingsViewのメソッド

Expand All @@ -209,6 +216,17 @@ SettingsViewのプロパティ設定はApp.xamlに記述した方が良いかも
* セクションのフッター文字列。
* IsVisible
* セクションを表示するかどうか。
* HeaderHeight
* セクションのヘッダーの個別の高さを指定します。
* SettingsViewのHeaderHeightよりも優先されます。
* ItemsSource
* DataTemplateのソースを指定します。
* ItemTemplate
* DataTemplateを指定します。
* UseDragSort
* セクション内のセルをDragDropで並べ替え可能にします。
* iOS11以降とそれ以外で外観が異なります。
* iOS10以下は三本線のアイコンを掴むと移動でき、iOS11はセル全体を長押しすると移動できるようになります。

## Cells

Expand Down Expand Up @@ -266,6 +284,8 @@ SettingsViewのプロパティ設定はApp.xamlに記述した方が良いかも
* アイコンサイズ(幅,高さ指定)
* IconRadius
* アイコンの角丸半径。
* IsEnabled
* セルを有効にするかどうか。無効にした場合はセル全体の色が薄くなり操作を受け付けなくなります。

### SVGイメージを使用するには

Expand Down Expand Up @@ -414,6 +434,8 @@ Androidではタップ時にダイアログでピッカーが表示されます
* nullを指定することはできません。
* DisplayMember
* Pickerに選択肢として表示させるメンバー名(プロパティ名)。省略時はToStringの値が使用されます。
* SubDisplayMember
* Pickerに表示させる二番目のメンバー名(プロパティ名)。指定するとセルは2行表示となり、1行目にDisplayMemberが、2行目にSubDisplayMemberが表示されるようになります。
* SelectedItems
* 選択したItemを保存するためのIList。ItemsSourceと同じ型のものを指定。
* 選択済み要素をあらかじめ設定する場合は、ItemsSourceの要素と同一インスタンスの要素にする必要があります。
Expand All @@ -435,6 +457,10 @@ Androidではタップ時にダイアログでピッカーが表示されます
* 並べ替え方法にNaturalSortを使うかどうか。デフォルト false。
* trueの場合、例えば通常 1,10,2,3,4 と並ぶところが 1,2,3,4,10 という並びになります。
* 日本語以外の言語で使用する場合、誤動作する可能性があります。
* UsePickToClose
* 選択がMaxSelectedNumberに達したら自動的にPickerを閉じるかどうかを指定します。
* UseAutoValueText
* 通常は選択アイテムが自動でValueTextに表示されますが、このプロパティにfalseを指定すると自動表示が解除され、ValueTextを普通に使うことができるようになります。


## EntryCell
Expand Down
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,15 @@ This is a flexible TableView specialized in settings for Android / iOS.

* To set separator color.
* To set selected cell color.
* To scroll to screen top and bottom.

### Sections

* To set IsVisible each section.
* To set section a footer.
* To set various options of a header and a footer.
* To use DataTemplate and DataTemplateSelector in a section.
* To reorder items by drag and drop in a section.

### Cells

Expand Down Expand Up @@ -194,6 +197,10 @@ Whereby any SettingsView in App will become the same property setttings.
* ShowSectionTopBottomBorder (for Android)
* Whether a separator is shown at section top and bottom. (like general android app)
* Default true
* ScrollToTop
* ScrollToBottom
* When this property is set to true, the screen will be scrolled to first item position or last item position.
* If scrolling has complete, it will be set to false automatically.

## SettingsView Methods

Expand All @@ -208,6 +215,13 @@ Whereby any SettingsView in App will become the same property setttings.
* Section footer text.
* IsVisible
* Whether the section is visibled.
* ItemsSource
* Specify the source of a DataTemplate.
* ItemTemplate
* Specify a DataTemplate.
* UseDragSort
* Enable you to reorder cells in a section with drag and drop.
* If iOS version is less than or equal to iOS10, the cells can be moved when grabbing the icon drawn three lines; Otherwise can be moved when doing long tap.

## Cells

Expand Down Expand Up @@ -265,6 +279,8 @@ Whereby any SettingsView in App will become the same property setttings.
* Icon size. (width,height)
* IconRadius
* Icon corners radius.
* IsEnabled
* Whether a cell is enabled. If set to false, the entire cell color will turn translucent and the cell won't accept any operations.

### To use SVG image

Expand Down Expand Up @@ -409,6 +425,8 @@ When tapped on Android, show the picker on a dialog.
* This have to assing a instance and must not null.
* DisplayMember
* Class member(property) name Displayed on the picker.
* SubDisplayMember
* Class member(property) name secondary displayed on the Picker. If this property is set, the cell will be two line and the first line will display DisplayMember and the second line will display SubDisplayMember.
* SelectedItems
* IList where selected items is stored.
* This have to assing a instance and must not null.
Expand All @@ -427,6 +445,10 @@ When tapped on Android, show the picker on a dialog.
* Whether use NaturalSort as sort method. default false.
* If true, for example, if the order is normally "1,10,2,3,4", is "1,2,3,4,10".
* This option may not correctly work if not used Japanese language.
* UsePickToClose
* Whether closing the Picker automatically if the number of selected items come to MaxSelectedNumber.
* UseAutoValueText
* Normally, selected items string is automatically displayed in the ValueText. If the value of this property is specified false, the auto display will be cleared and ValueText will be available as usual.

## EntryCell

Expand Down
3 changes: 3 additions & 0 deletions Sample/Sample.Droid/MainActivity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using Android.OS;
using Microsoft.Practices.Unity;
using Prism.Unity;
using AiForms.Renderers;

namespace Sample.Droid
{
Expand All @@ -20,6 +21,8 @@ protected override void OnCreate(Bundle bundle)
global::Xamarin.Forms.Forms.Init(this, bundle);
Xamarin.Forms.Svg.Droid.SvgImage.Init();

var a = new AiForms.Renderers.Droid.PickerCellRenderer();

LoadApplication(new App(new AndroidInitializer()));
}
}
Expand Down
2 changes: 1 addition & 1 deletion Sample/Sample.Droid/Properties/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="kamusoft.sample">
<uses-sdk android:minSdkVersion="21" />
<uses-sdk android:minSdkVersion="22" />
<application android:label="Sample"></application>
</manifest>
18 changes: 10 additions & 8 deletions Sample/Sample.Droid/Sample.Droid.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
<WarningLevel>4</WarningLevel>
<AndroidManagedSymbols>true</AndroidManagedSymbols>
<AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>
<AndroidSupportedAbis>armeabi-v7a;arm64-v8a;x86_64;x86;armeabi</AndroidSupportedAbis>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
Expand Down Expand Up @@ -160,20 +161,21 @@
<Reference Include="Xamarin.Forms.Xaml">
<HintPath>..\packages\Xamarin.Forms.2.5.0.121934\lib\MonoAndroid10\Xamarin.Forms.Xaml.dll</HintPath>
</Reference>
<Reference Include="SettingsView">
<HintPath>..\packages\AiForms.SettingsView.0.2.0-pre3\lib\MonoAndroid\SettingsView.dll</HintPath>
</Reference>
<Reference Include="SettingsView.Droid">
<HintPath>..\packages\AiForms.SettingsView.0.2.0-pre3\lib\MonoAndroid\SettingsView.Droid.dll</HintPath>
</Reference>
<Reference Include="AiForms.Layouts">
<HintPath>..\packages\AiForms.Layouts.1.0.3\lib\netstandard1.1\AiForms.Layouts.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Sample\Sample.csproj">
<Project>{2DB58246-77D5-4190-B0A0-F125B538309B}</Project>
<Name>Sample</Name>
</ProjectReference>
<ProjectReference Include="..\..\SettingsView\SettingsView.csproj">
<Project>{8FFB1EF3-FAF3-478C-B9F1-4D02E599C3C6}</Project>
<Name>SettingsView</Name>
</ProjectReference>
<ProjectReference Include="..\..\SettingsView.Droid\SettingsView.Droid.csproj">
<Project>{2CC418E1-CE33-48E2-8E89-A87669BD9E28}</Project>
<Name>SettingsView.Droid</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Compile Include="MainActivity.cs" />
Expand Down
2 changes: 2 additions & 0 deletions Sample/Sample.Droid/packages.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="AiForms.Effects" version="1.1.0-pre1" targetFramework="monoandroid80" />
<package id="AiForms.Layouts" version="1.0.3" targetFramework="monoandroid80" />
<package id="AiForms.SettingsView" version="0.2.0-pre3" targetFramework="monoandroid80" />
<package id="CommonServiceLocator" version="1.3" targetFramework="monoandroid71" />
<package id="NGraphics" version="0.4.0" targetFramework="monoandroid71" />
<package id="Prism.Core" version="6.3.0" targetFramework="monoandroid71" />
Expand Down
17 changes: 9 additions & 8 deletions Sample/Sample.iOS/Sample.iOS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -146,20 +146,21 @@
<Reference Include="Xamarin.Forms.Xaml">
<HintPath>..\packages\Xamarin.Forms.2.5.0.121934\lib\Xamarin.iOS10\Xamarin.Forms.Xaml.dll</HintPath>
</Reference>
<Reference Include="SettingsView">
<HintPath>..\packages\AiForms.SettingsView.0.2.0-pre3\lib\Xamarin.iOS10\SettingsView.dll</HintPath>
</Reference>
<Reference Include="SettingsView.iOS">
<HintPath>..\packages\AiForms.SettingsView.0.2.0-pre3\lib\Xamarin.iOS10\SettingsView.iOS.dll</HintPath>
</Reference>
<Reference Include="AiForms.Layouts">
<HintPath>..\packages\AiForms.Layouts.1.0.3\lib\netstandard1.1\AiForms.Layouts.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Sample\Sample.csproj">
<Project>{2DB58246-77D5-4190-B0A0-F125B538309B}</Project>
<Name>Sample</Name>
</ProjectReference>
<ProjectReference Include="..\..\SettingsView\SettingsView.csproj">
<Project>{8FFB1EF3-FAF3-478C-B9F1-4D02E599C3C6}</Project>
<Name>SettingsView</Name>
</ProjectReference>
<ProjectReference Include="..\..\SettingsView.iOS\SettingsView.iOS.csproj">
<Project>{4601EE49-52E1-448E-98A1-EFDCBA7A64AC}</Project>
<Name>SettingsView.iOS</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<ImageAsset Include="Resources\Images.xcassets\AppIcons.appiconset\Contents.json" />
Expand Down
2 changes: 2 additions & 0 deletions Sample/Sample.iOS/packages.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="AiForms.Effects" version="1.1.0-pre1" targetFramework="xamarinios10" />
<package id="AiForms.Layouts" version="1.0.3" targetFramework="xamarinios10" />
<package id="AiForms.SettingsView" version="0.2.0-pre3" targetFramework="xamarinios10" />
<package id="CommonServiceLocator" version="1.3" targetFramework="xamarinios10" />
<package id="NGraphics" version="0.4.0" targetFramework="xamarinios10" />
<package id="Prism.Core" version="6.3.0" targetFramework="xamarinios10" />
Expand Down
7 changes: 7 additions & 0 deletions Sample/Sample.sln
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,13 @@ Global
$1.TabsToSpaces = True
$0.CSharpFormattingPolicy = $2
$2.scope = text/x-csharp
$2.NewLinesForBracesInProperties = False
$2.NewLinesForBracesInAccessors = False
$2.NewLinesForBracesInAnonymousMethods = False
$2.NewLinesForBracesInControlBlocks = False
$2.NewLinesForBracesInAnonymousTypes = False
$2.NewLinesForBracesInObjectCollectionArrayInitializers = False
$2.NewLinesForBracesInLambdaExpressionBody = False
$0.DotNetNamingPolicy = $3
$3.DirectoryNamespaceAssociation = PrefixedHierarchical
EndGlobalSection
Expand Down
66 changes: 3 additions & 63 deletions Sample/Sample/Sample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
<OutputType>Library</OutputType>
<RootNamespace>Sample</RootNamespace>
<AssemblyName>Sample</AssemblyName>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<TargetFrameworkProfile>Profile44</TargetFrameworkProfile>
<TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand Down Expand Up @@ -256,70 +255,11 @@
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<Reference Include="Microsoft.Practices.ServiceLocation">
<HintPath>..\packages\CommonServiceLocator.1.3\lib\portable-net4+sl5+netcore45+wpa81+wp8\Microsoft.Practices.ServiceLocation.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Practices.Unity">
<HintPath>..\packages\Unity.4.0.1\lib\portable-net45+wp80+win8+wpa81+MonoAndroid10+MonoTouch10\Microsoft.Practices.Unity.dll</HintPath>
</Reference>
<Reference Include="Prism">
<HintPath>..\packages\Prism.Core.6.3.0\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Prism.dll</HintPath>
</Reference>
<Reference Include="Prism.Forms">
<HintPath>..\packages\Prism.Forms.6.3.0\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Prism.Forms.dll</HintPath>
</Reference>
<Reference Include="Prism.Unity.Forms">
<HintPath>..\packages\Prism.Unity.Forms.6.3.0\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Prism.Unity.Forms.dll</HintPath>
</Reference>
<Reference Include="System.Reactive.Interfaces">
<HintPath>..\packages\System.Reactive.Interfaces.3.0.0\lib\netstandard1.0\System.Reactive.Interfaces.dll</HintPath>
</Reference>
<Reference Include="System.Reactive.Core">
<HintPath>..\packages\System.Reactive.Core.3.0.0\lib\netstandard1.1\System.Reactive.Core.dll</HintPath>
</Reference>
<Reference Include="System.Reactive.Linq">
<HintPath>..\packages\System.Reactive.Linq.3.0.0\lib\netstandard1.1\System.Reactive.Linq.dll</HintPath>
</Reference>
<Reference Include="System.Reactive.PlatformServices">
<HintPath>..\packages\System.Reactive.PlatformServices.3.0.0\lib\netstandard1.0\System.Reactive.PlatformServices.dll</HintPath>
</Reference>
<Reference Include="ReactiveProperty">
<HintPath>..\packages\ReactiveProperty.3.2.0\lib\portable-net45+win81+MonoTouch+MonoAndroid\ReactiveProperty.dll</HintPath>
</Reference>
<Reference Include="NGraphics">
<HintPath>..\packages\NGraphics.0.4.0\lib\portable-net45+wp8+wpa81+win8+MonoAndroid10+MonoTouch10+Xamarin.iOS10\NGraphics.dll</HintPath>
</Reference>
<Reference Include="SvgImageSource">
<HintPath>..\packages\Xamarin.Forms.Svg.0.0.1-pre\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\SvgImageSource.dll</HintPath>
</Reference>
<Reference Include="AiForms.Effects">
<HintPath>..\packages\AiForms.Effects.1.1.0-pre1\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\AiForms.Effects.dll</HintPath>
</Reference>
<Reference Include="AiForms.Layouts">
<HintPath>..\packages\AiForms.Layouts.1.0.0\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\AiForms.Layouts.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Forms.Core">
<HintPath>..\packages\Xamarin.Forms.2.5.0.121934\lib\portable-win+net45+wp80+win81+wpa81\Xamarin.Forms.Core.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Forms.Platform">
<HintPath>..\packages\Xamarin.Forms.2.5.0.121934\lib\portable-win+net45+wp80+win81+wpa81\Xamarin.Forms.Platform.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Forms.Xaml">
<HintPath>..\packages\Xamarin.Forms.2.5.0.121934\lib\portable-win+net45+wp80+win81+wpa81\Xamarin.Forms.Xaml.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<None Include="project.json" />
</ItemGroup>
<ItemGroup>
<Folder Include="Resources\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\SettingsView\SettingsView.csproj">
<Project>{8FFB1EF3-FAF3-478C-B9F1-4D02E599C3C6}</Project>
<Name>SettingsView</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
<Import Project="..\packages\Xamarin.Forms.2.5.0.121934\build\portable-win+net45+wp80+win81+wpa81\Xamarin.Forms.targets" Condition="Exists('..\packages\Xamarin.Forms.2.5.0.121934\build\portable-win+net45+wp80+win81+wpa81\Xamarin.Forms.targets')" />
<!-- <Import Project="..\packages\Xamarin.Forms.2.5.0.121934\build\portable-win+net45+wp80+win81+wpa81\Xamarin.Forms.targets" Condition="Exists('..\packages\Xamarin.Forms.2.5.0.121934\build\portable-win+net45+wp80+win81+wpa81\Xamarin.Forms.targets')" /> -->
</Project>
18 changes: 18 additions & 0 deletions Sample/Sample/Sample.nuget.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">/Users/kamu/Projects/AiForms.Renderers/Sample/Sample/project.lock.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">/Users/kamu/.nuget/packages/</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">/Users/kamu/.nuget/packages/</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">ProjectJson</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">4.3.1</NuGetToolVersion>
</PropertyGroup>
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
</PropertyGroup>
<ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<Import Project="$(NuGetPackageRoot)xamarin.forms/2.5.0.121934/build/netstandard1.0/Xamarin.Forms.props" Condition="Exists('$(NuGetPackageRoot)xamarin.forms/2.5.0.121934/build/netstandard1.0/Xamarin.Forms.props')" />
</ImportGroup>
</Project>
9 changes: 9 additions & 0 deletions Sample/Sample/Sample.nuget.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
</PropertyGroup>
<ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<Import Project="$(NuGetPackageRoot)xamarin.forms/2.5.0.121934/build/netstandard1.0/Xamarin.Forms.targets" Condition="Exists('$(NuGetPackageRoot)xamarin.forms/2.5.0.121934/build/netstandard1.0/Xamarin.Forms.targets')" />
</ImportGroup>
</Project>
Loading

0 comments on commit ec3f796

Please sign in to comment.