GithubHelp home page GithubHelp logo

lordsaac / fasteasyform Goto Github PK

View Code? Open in Web Editor NEW
11.0 1.0 2.0 66.17 MB

Fast & Easy Form is an Android form builder library that simplifies creating and managing forms with features like validations, data retrieval, updates, and event listeners.

Kotlin 37.70% Java 62.25% Assembly 0.05%
android-kotlin-developer android form-builder forms easy easy-form jitpack-android kotlin compose form

fasteasyform's Introduction

Fast & Easy Form: is a builder forms for your Android project, with this library you will can build forms more fast and easy, using a clear structure for implement in your project. This solution offer a different tools like: validations, get data, update data and events listeners.

Build status codecov codecov codebeat badge API Maven Central

Examples

DARK MODE ON Menu Screen Input
Example Example Example

Features

  • Reduce development time for forms
  • Create simple and user-friendly forms
  • Implement row-level validation for the form fields
  • Ability to update rows/data within the form
  • Retrieve data based on a unique identifier
  • Implement interactive listeners for form elements
  • Scroll view form
  • Customize text colors
  • Customize icons
  • Change size text
  • Support for Jetpack Compose
  • Support Dark Mode
  • Use Java 11

Requirements

Fast & Easy Form is written in Kotlin & Java and compatible with min Sdk version 26 and min version Java 11. This library is only compatible with phones.

Installation

Settings Gradle

Fast & Easy Form is available through Github. To install it, simply add the following line to your settings gradle:

allprojects {
    repositories {

       maven { url 'https://jitpack.io' }

    }
}

Dependencie

For dependencie version, add the following to your gradle:

 compileOptions {
        sourceCompatibility JavaVersion.VERSION_11
        targetCompatibility JavaVersion.VERSION_11
 }

kotlinOptions {
        jvmTarget = '11'
 }

dependencies {

     implementation 'com.github.LordSaac:FastEasyForm:v2.0.1'

}

Getting Started

Example MainActivity

For classic class activity follow the next code example.

class MainActivity : AppCompatActivity(), FormsListenerIGB {

    private lateinit var rv_main: RecyclerView // Add RecyclerView into xml

    private lateinit var easyForm: EasyForm

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)

        this.rv_main = findViewById(R.id.rv_main)

        this.init()

    }

    private fun init(){

 this.easyForm = BuildForm(mContext = this) {

    mode = ThemeMode.DARK 

    container = this.rv_main  

    body { 

        section { 

            title = "My Section Number 1"
            description = "Here I put my first section."

            content { 

                Row(RType.TITLE) { 
                    setText.title = "Getting started"
                    setColor.title = R.color.colorPrimary_aar 
                }

                Row(RType.INFO) { 
                    setText.title = "Hello world!"
                    setColor.title = R.color.colorGray 
                }

            }

        }

    }

}


    }



    override fun actionFormResponse(result: ResponseFormsIGB) {



    }

}

Example ComposeActivity

For projects JetPack Compose follow the next code example.

class ComposeActivity : ComponentActivity() {

    private val context = this

    private lateinit var easyForm: EasyForm

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)

        this.easyForm = EasyForm(this)

        setContent {
            FormSimpleIGBTheme {
                // A surface container using the 'background' color from the theme

                Surface(
                    modifier = Modifier.fillMaxSize(),
                    color = MaterialTheme.colorScheme.background
                ) {

                    ComposeScreen(context,easyForm)

                }
            }
        }
    }

}

Composable

Config the composable code into activity or preview screen.

@Composable
fun ComposeScreen(context:Context,customForm: EasyForm) {

    EasyFormCompose(
        customForm = customForm,
        modifier = Modifier.fillMaxWidth(),
        mode = uiMode.dark,
        body = {

         
               Section {

                title = "Configuration Settings"

                description = "Config your configuration setting"

                Content {

                    Row(RType.ACTION) {
                        tag = "FRECUENCIA_VISITA"
                        setText.title = "Sounds & Others"
                        setText.descriptionBottom = "Configuration your sounds & rintongs settings"
                        setText.bubble = "1"
                        setImage.iconLeft = R.drawable.sound_color
                        setText.titleToolbar = "Atras"
                        setSize.title = 14f

                        onClick {




                        }


                    }

                    Row(RType.ACTION) {

                        tag = "GAME_SETTING"
                        setText.title = "Game Setting"
                        setText.descriptionBottom = "Configuration your games settings"
                        setImage.iconLeft = R.drawable.controler_color
                        setSize.title = 14f

                        onClick {




                        }

                    }

                    Row(RType.ACTION) {
                        tag = "FRECUENCIA_VISITA"
                        setText.title = "Notifications"
                        setText.descriptionBottom = "Configuration your favorite ringtone settings"
                        setImage.iconLeft = R.drawable.bell_color
                        setSize.title = 14f

                        onClick {

                        }
                    }

                }

            }
   
         
        }

    )

}

Full Example project

If you want check the the code project, you can check click HERE or check FULL DOCUMENTATION.

Contribution

Thank you for use this library on your project, with you collaboration this project could grow more with improvements and new idea. This project don't have support but you are most welcome to contribute.

Licence

Copyright 2024 José I. Gutiérrez B.

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.

fasteasyform's People

Contributors

lordsaac avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

fasteasyform's Issues

Export Data

Hi

is there any way to do export preferably stop json from all fields with the answers

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.