Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

peterforme/StorageView

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

StorageView

android storageview

this is a view which shows the system storage situation(including the percentage) and represent with a rectangle

image

usage:

you need to declare the view on the xml, like this:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" app:layout_behavior="@string/appbar_scrolling_view_behavior"

tools:context="com.fkdd.storageapp.MainActivity"
tools:showIn="@layout/activity_main">

<TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Hello World!" />

<com.fkdd.storageapp.StorageView
    android:id="@+id/storageView"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    />

in the class , use it like this

storageView = (StorageView)findViewById(R.id.storageView); storageView.setUsedRate(percent); storageView.setLeftText(usedStr); storageView.setRightText(availableStr); storageView.setTotalText(totalStr); storageView.setRefresh();

About

android storageview

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.