GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - AndroidDevFr/AndroidForm: Generates a form for Android

BranchesTags
Open more actions menu

Latest commit

 

History

33 Commits
33 Commits

Folders and files

NameName
Last commit message
Last commit date
.circleci
.circleci
 
 
.idea
.idea
 
 
androidform
androidform
 
 
gradle/wrapper
gradle/wrapper
 
 
sample-java
sample-java
 
 
sample-kt
sample-kt
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
build.gradle
build.gradle
 
 
gradle.properties
gradle.properties
 
 
gradlew
gradlew
 
 
gradlew.bat
gradlew.bat
 
 
settings.gradle
settings.gradle
 
 

Repository files navigation

AndroidForm

Generates a form for Android

WORK IN PROGRESS

Create a form

form.create {

    section("Section1") {
        id = 0
        textRow {
            id = 2
            title = "Text Row"
            placeholder = "Enter text here"
            validator = { s ->
                s != null && s.length > 3
            }

            //listeners
            onValueChanged<TextRow> { textRow, value ->
                //change background following value, for example
                //textRow.view?.background = ...
            }
        }
        phoneRow {
            id = 3
            title = "Phone Row"
            placeholder = "020202020202"
        }

    }
    section("Section2") {
        id = 1
        dateRow {
            id = 5
            title = "Text Row"
            value = Date()
        }

        singleChoice {
             id = 6
             title = "Single Choice"
             items = listOf("Item 0", "Item 1", "Item 2")
        }
    }

}

Fetch values

Map<Int, Any?>

val values = form.values()

Fetch single value

val row = form.rowById(5) as DateRow?
val value = row?.value

Want to contribute

Check the Github project : https://github.com/AndroidDevFr/AndroidForm/projects/1

Follow the guidelines :

  1. Everything has to be overridable directly using lambdas, eg: onViewCreated, avoid if possible abstract methods

  2. The code has to be written in English (of course)

  3. Please make a Pull Request for each feature, including a sample code

  4. Have Fun doing some Kotlin :)

Credits

This project is an open source initiative of the Slack French Community AndroidDevFr

To join this slack (french speakers only) : http://bit.ly/AndroidDevFr

Inspiration

This project is inspired from a swift open source library Eureka, by xmartlabs https://github.com/xmartlabs/Eureka

License

Copyright 2018 AndroidDevFr, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

About

Generates a form for Android

Resources

Readme
Apache-2.0 license
Activity
Custom properties

Stars

63 stars

Watchers

5 watching

Forks

6 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.