diff --git a/README.md b/README.md index a7fce39..7abda42 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # Stfalcon Fixturer -Utility for developers and QAs what helps minimize time wasting on writing the same data for testing over and over again. +A Utility for developers and QAs which helps minimize time wasting on writing the same data for testing over and over again. You can write fixture in XML one time and use it for build testing. The library can autofill EditText with your fixture data. ### Who we are -Need iOS and Android apps, MVP development or prototyping? Contact us via info@stfalcon.com. We develop software since 2009, and we're known experts in this field. Check out our [portfolio](https://stfalcon.com/en/portfolio) and see more libraries from [stfalcon-studio](https://stfalcon-studio.github.io/). +Need iOS and Android apps, MVP development or prototyping? Contact us via info@stfalcon.com. We develop software since 2009, and we're known experts in this field. Check out our [portfolio](https://stfalcon.com/en/portfolio) and see more libraries from [stfalcon-studio](https://stfalcon.com/en/opensource). ### Download @@ -15,8 +15,8 @@ compile 'com.github.stfalcon:stfalcon-fixturer:0.1.0' ### Usage -Create xml file in raw directory of app resources. -Example: +Create xml file in raw directory of app resources. +Example: ```xml @@ -42,7 +42,7 @@ Example: ``` -All `fixture` require `tag` attribute. This tag will be used for binding input fields to fixture. +All `fixture` require `tag` attribute. This tag will be used for binding input fields to fixture. Also you can put some fixtures in groups. For example `email` and `password` can be marked as group `account`. This two fixtures must have the same item count. And in this case where we will select one fixture from group, it will automatically put data to all bound EditTexts to the same grouped fixtures. To initialize library you have to add this line to your Application `onCreate` method: @@ -55,12 +55,13 @@ class SampleApplication : Application() { } } ``` -First parameter it's your Application context. +First parameter it's your Application context. Second - resource ID of you fixtures XML file. -The default behaviour is Fixturer works only for debug builds. But if you want to change this behaviour you can pass Boolean flag as third parameter. +The default behavior is Fixturer works only for debug builds. But if you want to change this behavior you can pass Boolean flag as third parameter. After that you can bind your EditTexts to the fixtures in your activity(fragment) classes. -Kotlin: + +Kotlin: ```kotlin loginEmailEt.setFixtureTag("email") ``` @@ -72,11 +73,13 @@ Where `loginEmailEt` is EditText and "email" is tag of the fixture. Run your application and look on magic :) You can call fixtures dialog by triple tap on bound to fixture EditText. -![alt tag](https://i.imgur.com/KoeGW7E.gif) +![](https://i.imgur.com/zrdQYM2.gif) + +![](https://i.imgur.com/cl6FDA6.gif) Take a look at the [sample project](sample) for more information -### License +### License ``` Copyright 2018 stfalcon.com @@ -94,4 +97,4 @@ See the License for the specific language governing permissions and limitations under the License. ``` -[sample]: \ No newline at end of file +[sample]: diff --git a/sample/src/main/AndroidManifest.xml b/sample/src/main/AndroidManifest.xml index 296f4de..5482bfe 100644 --- a/sample/src/main/AndroidManifest.xml +++ b/sample/src/main/AndroidManifest.xml @@ -1,24 +1,26 @@ + package="com.stfalcon.stfalconfixturer.sample"> - + android:name="com.stfalcon.stfalconfixturer.sample.SampleApplication" + android:allowBackup="true" + android:icon="@mipmap/ic_launcher" + android:label="@string/app_name" + android:roundIcon="@mipmap/ic_launcher_round" + android:supportsRtl="true" + android:theme="@style/AppTheme"> + - - - + + - - + \ No newline at end of file diff --git a/sample/src/main/res/drawable/btn_rounded.xml b/sample/src/main/res/drawable/btn_rounded.xml new file mode 100644 index 0000000..c483712 --- /dev/null +++ b/sample/src/main/res/drawable/btn_rounded.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/sample/src/main/res/drawable/circle.xml b/sample/src/main/res/drawable/circle.xml new file mode 100644 index 0000000..a8c36c0 --- /dev/null +++ b/sample/src/main/res/drawable/circle.xml @@ -0,0 +1,27 @@ + + + + + \ No newline at end of file diff --git a/sample/src/main/res/drawable/circles.xml b/sample/src/main/res/drawable/circles.xml new file mode 100644 index 0000000..2d02954 --- /dev/null +++ b/sample/src/main/res/drawable/circles.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sample/src/main/res/layout/activity_info.xml b/sample/src/main/res/layout/activity_info.xml index 4da6d0d..f385b37 100644 --- a/sample/src/main/res/layout/activity_info.xml +++ b/sample/src/main/res/layout/activity_info.xml @@ -1,38 +1,79 @@ - + + + android:layout_height="wrap_content" + android:orientation="vertical"> - + android:layout_height="200dp" + android:layout_margin="16dp"> - + android:layout_height="match_parent" + android:layout_margin="16dp" + android:gravity="center" + android:orientation="vertical"> + + + + + + + + + + - + - + + + + + + + android:layout_height="200dp" + android:layout_marginLeft="16dp" + android:layout_marginRight="16dp" + android:layout_marginBottom="16dp" /> - + - + + - \ No newline at end of file + \ No newline at end of file diff --git a/sample/src/main/res/layout/activity_login.xml b/sample/src/main/res/layout/activity_login.xml index 0050270..14cbb70 100644 --- a/sample/src/main/res/layout/activity_login.xml +++ b/sample/src/main/res/layout/activity_login.xml @@ -1,30 +1,142 @@ - + + + android:layout_height="280dp" + android:layout_margin="36dp" + android:elevation="4dp" + app:cardCornerRadius="12dp" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintTop_toTopOf="parent"> - + android:layout_height="match_parent" + android:padding="16dp"> - + + + + + + + + + + + + + + +