add simple StatusIndicator widget

This commit is contained in:
Vincent Breitmoser 2015-09-01 06:40:28 +02:00
parent 261c83043b
commit 9668abfe9e
2 changed files with 55 additions and 0 deletions

View file

@ -0,0 +1,25 @@
package org.sufficientlysecure.keychain.ui.widget;
import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import org.sufficientlysecure.keychain.R;
public class StatusIndicator extends ToolableViewAnimator {
public StatusIndicator(Context context) {
super(context);
LayoutInflater.from(context).inflate(R.layout.status_indicator, this, true);
}
public StatusIndicator(Context context, AttributeSet attrs) {
super(context, attrs);
LayoutInflater.from(context).inflate(R.layout.status_indicator, this, true);
}
}

View file

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/ic_chevron_right_grey_24dp"
/>
<ProgressBar
android:layout_width="match_parent"
android:layout_height="match_parent"
android:indeterminate="true"
/>
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/ic_check_white_24dp"
android:tint="@color/android_green_light"
/>
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/ic_close_white_24dp"
android:tint="@color/android_red_light"
/>
</merge>