Updated background
This commit is contained in:
parent
3ab62768fe
commit
9945fe2b76
@ -193,14 +193,14 @@ public class RulesFragment extends Fragment {
|
||||
if (rule != null) {
|
||||
rule.setUsing(!v.isSelected());
|
||||
v.setSelected(!v.isSelected());
|
||||
adapter.checkType(rule);
|
||||
//adapter.checkType(rule);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onLongClick(View v) {
|
||||
Rule rule = Rule.getRuleById(id);
|
||||
if (rule != null && rule.isServiceAndUsing()) {
|
||||
if (rule != null && !rule.isServiceAndUsing()) {
|
||||
Daedalus.getInstance().startActivity(new Intent(Daedalus.getInstance(), ConfigActivity.class)
|
||||
.putExtra(ConfigActivity.LAUNCH_ACTION_ID, Integer.parseInt(id))
|
||||
.putExtra(ConfigActivity.LAUNCH_ACTION_FRAGMENT, ConfigActivity.LAUNCH_FRAGMENT_RULE)
|
||||
|
@ -1,11 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:enterFadeDuration="@android:integer/config_mediumAnimTime"
|
||||
android:exitFadeDuration="@android:integer/config_mediumAnimTime">
|
||||
<item android:state_selected="true">
|
||||
<color android:color="#ddff00"/>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#90A4AE"/>
|
||||
<corners android:radius="4dp"/>
|
||||
</shape>
|
||||
</item>
|
||||
<item android:state_selected="false">
|
||||
<color android:color="@android:color/white"/>
|
||||
<item>
|
||||
<selector android:enterFadeDuration="@android:integer/config_mediumAnimTime"
|
||||
android:exitFadeDuration="@android:integer/config_mediumAnimTime">
|
||||
<item android:state_selected="true">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#388E3C"/>
|
||||
<corners android:radius="4dp"/>
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
</item>
|
||||
</selector>
|
||||
<item android:left="8dp">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@android:color/white"/>
|
||||
<corners android:bottomRightRadius="4dp" android:topRightRadius="4dp"/>
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
@ -19,18 +19,17 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:focusable="true"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/margin_small"
|
||||
android:background="?android:attr/selectableItemBackground">
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/margin_small">
|
||||
android:layout_marginStart="@dimen/margin_small"
|
||||
android:layout_marginLeft="@dimen/margin_small">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="@dimen/margin_small"
|
||||
android:paddingBottom="@dimen/margin_small"
|
||||
android:padding="@dimen/margin_small"
|
||||
android:id="@+id/textView_rule_name"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
android:layout_alignParentTop="true"
|
||||
@ -40,8 +39,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/textView_rule_name"
|
||||
android:paddingTop="@dimen/margin_small"
|
||||
android:paddingBottom="@dimen/margin_small"
|
||||
android:padding="@dimen/margin_small"
|
||||
android:id="@+id/textView_rule_detail"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:layout_alignParentBottom="true"
|
||||
@ -51,9 +49,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
android:paddingBottom="@dimen/margin_small"
|
||||
android:paddingRight="@dimen/margin_small"
|
||||
android:paddingEnd="@dimen/margin_small"
|
||||
android:padding="@dimen/margin_small"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:ellipsize="end"
|
||||
|
Loading…
Reference in New Issue
Block a user