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