Awesome Open Source
Awesome Open Source

android-widget-plus

Function

ProgressImageView - progress percentage display on imageView

ProgressImageView imageView = (ProgressImageView) findViewById(R.id.progressImageView);
imageView.setColor(Color.argb(128, 255, 255, 255));
imageView.setProgress(50);

ServerConfig - target server selection function

List<ServerConfig> serverConfigList = new ArrayList();
list.add(new ServerConfig("DEV", "http://dev-naver.com"));
list.add(new ServerConfig("STAGE", "http://stage-naver.com"));
list.add(new ServerConfig("REAL", "http://naver.com"));

ServerConfig defaultConfig = new ServerConfig("REAL", "http://naver.com");

ServerConfigManager manager = new ServerConfigManager(this, serverConfigList, defaultConfig);

ServerConfigSelectionView serverConfigSelectionView = new ServerConfigSelectionView(this, manager);
final AlertDialog dialog = new AlertDialog.Builder(this).setMessage(R.string.select_server).setView(serverConfigSelectionView).show();
serverConfigSelectionView.setOnServerSelectedListener(new ServerConfigSelectionView.OnServerSelectedListener() {
  @Override
  public void onServerSelected(String url) {
    Toast.makeText(ServerConfigActivity.this, url + " selected.", Toast.LENGTH_SHORT).show();
    dialog.dismiss();
  }
});

ClickableDrawableTextView - drawable of textView and editText clickable function

ClickableDrawableEditText editText = (ClickableDrawableEditText) findViewById(R.id.editText);
editText.setOnDrawableClickListener(new ClickableDrawableTextView.OnDrawableClickListener() {
  @Override
  public void onClick(View v, ClickableDrawableTextView.DrawablePosition drawablePosition) {
    Toast.makeText(ClickableDrawableTextViewActivity.this, drawablePosition + " drawable clicked.", Toast.LENGTH_SHORT).show();
  }
});

Gradle

compile 'com.purestation:android-widget-plus:0.0.5'
Related Awesome Lists
Top Programming Languages
Top Projects

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Java (392,336
Textview (1,200
Imageview (994
Edittext (730