Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Relatively simple looking Android user controls: Angle Indicator, Round Gauge and LED Light bulb. Could be used as a part of HMI screen to communicate with programmable logic controller (PLC).

License

Notifications You must be signed in to change notification settings

GitHubDragonFly/Android_User_Controls

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Reality Check

Just for those of you who might be concerned about the Climate Change, here are couple of sobering insights:

  • Neil deGrasse Tyson's perspective on climate change: YouTube Video
  • My perspective, with statements from two AI entities: Climate Change

Android User Controls

A few relatively simple looking and somewhat customizable Android user controls.

Use them in your android mobile app creation.

Just to show off their functionality, all these controls have been included in the Gauge screen of the PhoneTest project which is set with minimum requirement of Android 4.1 (API level 16) while targeting Android 11 (API level 30) to cover lots of old and new android devices.

Functionality

  • AngleIndicator
    • a control to indicate rotational position/angle, measured counterclockwise from the zero/home position.
    • zero/home position could be selected as either of East (0), North (90), West (180) or South (270).
    • designed to show -360 to 360 values and will reduce all other values to this range (use the getCurrentValue() method to get the actual value).
    • could potentially be used as a weather vane since it can show the Direction suffix.
    • possibly use either Arc or Pie to sweep the angle for better visual appearance, see the screenshot.
    • it has publicly accessible methods: getCurrentValue() for reading and setCurrentValue(newFloatValue) for writing.
    • all custom properties start with "ai".

Angle Indicator

  • RoundGauge
    • a gauge control that could be used for miscelaneous measurements.
    • min/max values can be set individually.
    • it has publicly accessible methods: getGaugeCurrentValue() for reading and setGaugeCurrentValue(newFloatValue) for writing.
    • all custom properties start with "gauge".

Round Gauge

  • LEDLight
    • a control that can be turned ON/OFF and Blink (which is of a higher order but will restore the last ON/OFF state once the blinking stops).
    • it has publicly accessible methods: isLED_ON() and isLED_Blink() for reading and setLED_ON(newBooleanValue) and setLED_Blink(newBooleanValue) for writing.
    • all custom properties start with "led".

LED Light

Install

All it should take is to:

  • If necessary install Android Studio and create a new project.
  • Add the control's java file to your app's src/main/java/com.e.whatever folder (copy-paste).
  • Add the control's xml file to your app's src/main/res/values folder (copy-paste).
  • Save it all, Sync with Gradle, Build/Rebuild Project, open one of your activity layout files and look for the new control under "Project".

Licensing

These are all licensed under MIT License.

Trademarks

Any and all trademarks, either directly or indirectly mentioned in any control, belong to their respective owners.

About

Relatively simple looking Android user controls: Angle Indicator, Round Gauge and LED Light bulb. Could be used as a part of HMI screen to communicate with programmable logic controller (PLC).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages