add simple StatusIndicator widget
This commit is contained in:
parent
261c83043b
commit
9668abfe9e
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
30
OpenKeychain/src/main/res/layout/status_indicator.xml
Normal file
30
OpenKeychain/src/main/res/layout/status_indicator.xml
Normal 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>
|
Loading…
Reference in a new issue