Delete CheckableRelativeLayout

pull/848/head
Alex Baker 7 years ago
parent c3fbef94d6
commit 24b2a70126

@ -1,44 +0,0 @@
package com.todoroo.astrid.adapter;
import android.content.Context;
import android.util.AttributeSet;
import android.widget.Checkable;
import android.widget.RelativeLayout;
public class CheckableRelativeLayout extends RelativeLayout implements Checkable {
private static final int[] CHECKED_STATE_SET = {android.R.attr.state_checked};
private boolean checked = false;
public CheckableRelativeLayout(Context context, AttributeSet attrs) {
super(context, attrs);
}
@Override
public boolean isChecked() {
return checked;
}
@Override
public void setChecked(boolean b) {
if (b != checked) {
checked = b;
refreshDrawableState();
}
}
@Override
public void toggle() {
setChecked(!checked);
}
@Override
public int[] onCreateDrawableState(int extraSpace) {
final int[] drawableState = super.onCreateDrawableState(extraSpace + 1);
if (isChecked()) {
mergeDrawableStates(drawableState, CHECKED_STATE_SET);
}
return drawableState;
}
}

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<com.todoroo.astrid.adapter.CheckableRelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/row"
android:background="@drawable/drawer_background_selector"
@ -67,4 +67,4 @@
android:textSize="14sp"
tools:ignore="UnusedAttribute"/>
</com.todoroo.astrid.adapter.CheckableRelativeLayout>
</RelativeLayout>

Loading…
Cancel
Save