Giter Club home page Giter Club logo

android-widgets's Introduction

Oursky Widgets Library Release

Commonly used widgets for Android

android Build Status

This repository contain some useful and generic widgets. The widgets is implemented in kotlin but is also usable for Java.

Usage

Edit top level build.gradle and add maven { url 'https://jitpack.io' }, for example:

allprojects {
  repositories {
    google()
    jcenter()
    maven { url 'https://jitpack.io' }
  }
}

Next, edit {app}/build.gradle, add dependencies:

dependencies {
  ...
  implementation 'com.github.oursky:android-widgets:0.0.1'
}

Replace 0.0.1 with the latest version. For a list of version, check the releases page.

NOTE for using snapshot

You may also use the special version tag master-SNAPSHOT to access latest features. Note that gradle will cache the dependency so you may want to add this to app/build.gradle

configurations.all {
    // do not cache changing modules, ie. 'com.github.oursky:android-widgets:master-SNAPSHOT'
    resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}

See this for detail.

Now you should be able to use the widgets directly. See here for a list of widgets.

android-widgets's People

Contributors

hidden-dimensions avatar jasonho215 avatar rickmak avatar roxk avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

android-widgets's Issues

SearchField

iOS style search field

  • border, corner radius (or auto-circle)
  • Font, textsize, textcolor
  • Hint / placeholder
  • Optional left Icon
  • Clear button
  • delegate
    • on change
    • on action

search

[Demo] Dismiss picker on pressing back button

Bug Description

When the date picker is shown, clicking back button will pop current page.

Expected Behaviour

The picker will be dismissed. No page navigation is included.

Step to reproduce

  1. Open demo app
  2. Click Form UI Button
  3. Click date field
  4. Click back button

digits input

The multiple digit input we seen in SMS validation.

  • configurable length (default 4)
  • focusable
  • style
    • numpad input
    • number pickers (rolling)
  • delegate
    • onChange

Implementation suggestion
Create a hidden EditText as input and check with TextWatcher, and update the digits accordingly. Each digit should have an empty state (ie. _) and filled state (ie. x)

[Form] Add FormLabel

Description

This widget should be a component with title view and value view. It acts like a Form Field in a form but it is not editable.

Feature Break-down

  • Title
    • customising font, color, font size
  • Value
    • customising color, font size
    • customising left and right icons
  • Layout
    • spacing between title view and value view
    • spacing between icons and value view
  • Border
    • customising color

[Label] Support Label with icons

Description

This widget should support to set icons on top, bottom, left or right of text. The icon size is independent from the text height.

As the layout of this widget and SButton is similar. The SButton will be refactored to be a subclass of this widget with click and touch effect supported.

Feature breakdown

  • set icon
    • left, right, up and bottom
  • text
    • value
    • font, size and colour

button

  • Font, textsize, textcolor, text alignment
  • optional icons on left/top/right/bottom
    • FIT_CENTER scaling
    • icon size
    • padding
  • touch effect

Update README

  • How to run demo
  • How to contribute
  • screenshot of widgets

FormEdit

An edit field with optional title and error message intended to use in a form (e.g. edit profile).

  • Properties
    • Input text
    • Hint / placeholder
  • Customization
    • Title Icon
    • Font face, Textsize, TextColor (title, input & hint)
    • Keyboard Type, Action Type (GO, SEARCH, etc)
  • Extra Features
    • Password input with "eye icon"
  • delegate
    • TextWatcher
    • Enter action

FormCombo

An combo box with optional title and error message intended to use in a form (e.g. edit profile).

  • Properties
    • selection values
    • selected value
  • Customization
    • Title Icon
    • Font face, Textsize, TextColor (title, input)
    • Display selected value in different way than raw value
  • Extra Features
    • date picker
    • time picker
  • delegate
    • selection changed

theme support

widgets should acknowledge attrset and adjust font and textsize and color accordingly, also support xml attributes.

  • ctor loop thru obtainStyledAttributes and apply them
  • res/values/attrs.xml declare-styleable entries

New logo/icon proposal

Good day sir. I am a graphic designer and i am interested in designing a logo for your good project. I will be doing it as a gift for free. I just need your permission first before I begin my design. Hoping for your positive feedback. Thanks

xml styled attributes

  • ctor loop thru obtainStyledAttributes and apply them
  • res/values/attrs.xml declare-styleable entries

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.