Giter Site home page Giter Site logo

androidcustomlib's Introduction

Android Custom Lib

This is a simple standalone lib, that can be integrated easily on your android application, simple to integrate and easy to use. The lib is with purpose to add a floating action button on your activity main layout, and when click it shows another dialog screen with installation date and current time live.

Screenshots



Setup

Clone this repository and import into Android Studio

git clone https://github.com/islem19/AndroidCustomLib.git

How to Integrate Lib in your Android App:

  • First, clone the repository on your local machine
  • on your android studio app project, go to File -> New -> Import Module
  • select the folder previously cloned of the library and click finish
  • in your app/build.gradle file, add the implementation of your lib in dependencies :
dependencies {
    // add the implementation of the project library, use the same name 
    // as the one defined when imported
    implementation project(':library')

}

Usage :

  • first, check the how to integrate lib on the section above.
  • on your main activity class :
class MainActivity : AppCompatActivity() {
    // get the class instance 
    private val customPointzi by lazy { CustomPointzi(this) }

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

        // call the customPointzi class with the Build() fun to build and show the Fab
        customPointzi.build()
    }
}

or you can do it in one line :

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

        // call the customPointzi class with the Build() fun to build and show the Fab
        CustomPointzi(this).build()
    }
}
  • you can customize the icon of the model show by the dialog of the lib :
class MainActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)

        // customize the icon showen by the model by calling the fun setIcon(url) before you build
        CustomPointzi(this)
                .setIcon("YOUR_IMAGE_URL_HERE")
                .build()
    }
}

Permissions

The Library requires the following permissions:

  • Internet access : to be able to communicate through internet

Libraries and Dependencies

androidcustomlib's People

Contributors

islem19 avatar

Watchers

 avatar  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.