Coder Social home page Coder Social logo

android-utils's Introduction

Android-utils

It's a utility library extensions for android developers.

You can reduce your code using this simple extensions for manage parts of UI, Data, and Context.

if you want to collaborate by adding more extensions you can do it.

Implementation:

Download de library and add to your project.


implementation project(path: ':androidutils')

Examples of use:

Open dial of phone.


private fun openDial() {
        this.launchDial(
            phone = "5531222343" 
        )
    }

open email app with data.


private fun openEmail() {
        this.launchEmail(
            subject = "Example subject",
            body = "This is an example",
            email = "[email protected]"
        )
    }

Shared preference delegation use:

Example using object:

class User {

    // For delegation preference
    var name: String by Delegate( SharedPreference of your project , /** default value**/ )
    var age: Int by Delegate( SharedPreference of your project , /** default value**/ )
    
}

Using object for modify data:


  val user = User()
  user.name = "Ivan" // modify de value in preferences 
  user.age = 25
  
  Log.d("TEST", user.name) // print "Ivan"

android-utils's People

Contributors

ivanespitiac avatar

Watchers

 avatar Francisco GSilva avatar

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.