diff options
-rw-r--r-- | gen/eu/siacs/conversations/R.java | 40 | ||||
-rw-r--r-- | gen/org/sufficientlysecure/keychain/api/R.java | 2 | ||||
-rw-r--r-- | res/drawable/blue.xml | 5 | ||||
-rw-r--r-- | res/drawable/bluebackground.xml | 9 | ||||
-rw-r--r-- | res/drawable/darkblue.xml | 5 | ||||
-rw-r--r-- | res/drawable/darkred.xml | 5 | ||||
-rw-r--r-- | res/drawable/red.xml | 5 | ||||
-rw-r--r-- | res/drawable/redbackground.xml | 9 | ||||
-rw-r--r-- | res/layout/fragment_conversation.xml | 8 | ||||
-rw-r--r-- | src/eu/siacs/conversations/entities/MucOptions.java | 39 |
10 files changed, 104 insertions, 23 deletions
diff --git a/gen/eu/siacs/conversations/R.java b/gen/eu/siacs/conversations/R.java index b189b887b..afe690627 100644 --- a/gen/eu/siacs/conversations/R.java +++ b/gen/eu/siacs/conversations/R.java @@ -26,23 +26,29 @@ public final class R { public static final int activity_vertical_margin=0x7f070001; } public static final class drawable { - public static final int es_slidingpane_shadow=0x7f020000; - public static final int ic_action_add=0x7f020001; - public static final int ic_action_add_person=0x7f020002; - public static final int ic_action_cancel_launchersize=0x7f020003; - public static final int ic_action_delete=0x7f020004; - public static final int ic_action_group=0x7f020005; - public static final int ic_action_person=0x7f020006; - public static final int ic_action_refresh=0x7f020007; - public static final int ic_action_secure=0x7f020008; - public static final int ic_action_send=0x7f020009; - public static final int ic_action_send_now=0x7f02000a; - public static final int ic_action_unsecure=0x7f02000b; - public static final int ic_launcher=0x7f02000c; - public static final int ic_profile=0x7f02000d; - public static final int message_border=0x7f02000e; - public static final int notification=0x7f02000f; - public static final int section_header=0x7f020010; + public static final int blue=0x7f020000; + public static final int bluebackground=0x7f020001; + public static final int darkblue=0x7f020002; + public static final int darkred=0x7f020003; + public static final int es_slidingpane_shadow=0x7f020004; + public static final int ic_action_add=0x7f020005; + public static final int ic_action_add_person=0x7f020006; + public static final int ic_action_cancel_launchersize=0x7f020007; + public static final int ic_action_delete=0x7f020008; + public static final int ic_action_group=0x7f020009; + public static final int ic_action_person=0x7f02000a; + public static final int ic_action_refresh=0x7f02000b; + public static final int ic_action_secure=0x7f02000c; + public static final int ic_action_send=0x7f02000d; + public static final int ic_action_send_now=0x7f02000e; + public static final int ic_action_unsecure=0x7f02000f; + public static final int ic_launcher=0x7f020010; + public static final int ic_profile=0x7f020011; + public static final int message_border=0x7f020012; + public static final int notification=0x7f020013; + public static final int red=0x7f020014; + public static final int redbackground=0x7f020015; + public static final int section_header=0x7f020016; } public static final class id { public static final int account_confirm_password_desc=0x7f0a001c; diff --git a/gen/org/sufficientlysecure/keychain/api/R.java b/gen/org/sufficientlysecure/keychain/api/R.java index bc32bf116..a49700a61 100644 --- a/gen/org/sufficientlysecure/keychain/api/R.java +++ b/gen/org/sufficientlysecure/keychain/api/R.java @@ -8,7 +8,7 @@ package org.sufficientlysecure.keychain.api; public final class R { public static final class drawable { - public static final int ic_action_cancel_launchersize = 0x7f020003; + public static final int ic_action_cancel_launchersize = 0x7f020007; } public static final class string { public static final int openpgp_install_openkeychain_via = 0x7f050001; diff --git a/res/drawable/blue.xml b/res/drawable/blue.xml new file mode 100644 index 000000000..5692154ad --- /dev/null +++ b/res/drawable/blue.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<shape xmlns:android="http://schemas.android.com/apk/res/android" + android:shape="rectangle"> + <solid android:color="#FF1da9da" /> +</shape>
\ No newline at end of file diff --git a/res/drawable/bluebackground.xml b/res/drawable/bluebackground.xml new file mode 100644 index 000000000..fbf6d3170 --- /dev/null +++ b/res/drawable/bluebackground.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8"?> +<selector xmlns:android="http://schemas.android.com/apk/res/android" > + <item + android:state_pressed="false" + android:drawable="@drawable/blue" /> + <item + android:state_pressed="true" + android:drawable="@drawable/darkblue" /> +</selector> diff --git a/res/drawable/darkblue.xml b/res/drawable/darkblue.xml new file mode 100644 index 000000000..b33c38ceb --- /dev/null +++ b/res/drawable/darkblue.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<shape xmlns:android="http://schemas.android.com/apk/res/android" + android:shape="rectangle"> + <solid android:color="#FF0099cc" /> +</shape>
\ No newline at end of file diff --git a/res/drawable/darkred.xml b/res/drawable/darkred.xml new file mode 100644 index 000000000..1313cc2f6 --- /dev/null +++ b/res/drawable/darkred.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<shape xmlns:android="http://schemas.android.com/apk/res/android" + android:shape="rectangle"> + <solid android:color="#ffcc0000" /> +</shape>
\ No newline at end of file diff --git a/res/drawable/red.xml b/res/drawable/red.xml new file mode 100644 index 000000000..abdc07d6f --- /dev/null +++ b/res/drawable/red.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<shape xmlns:android="http://schemas.android.com/apk/res/android" + android:shape="rectangle"> + <solid android:color="#FFe92727" /> +</shape>
\ No newline at end of file diff --git a/res/drawable/redbackground.xml b/res/drawable/redbackground.xml new file mode 100644 index 000000000..ddca66f44 --- /dev/null +++ b/res/drawable/redbackground.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8"?> +<selector xmlns:android="http://schemas.android.com/apk/res/android" > + <item + android:state_pressed="false" + android:drawable="@drawable/red" /> + <item + android:state_pressed="true" + android:drawable="@drawable/darkred" /> +</selector> diff --git a/res/layout/fragment_conversation.xml b/res/layout/fragment_conversation.xml index 4e0d2030c..cea2be1f6 100644 --- a/res/layout/fragment_conversation.xml +++ b/res/layout/fragment_conversation.xml @@ -66,7 +66,7 @@ android:id="@+id/new_fingerprint" android:layout_width="fill_parent" android:layout_height="wrap_content" - android:background="#e92727" + android:background="@drawable/redbackground" android:orientation="vertical" android:visibility="gone" > @@ -94,7 +94,7 @@ android:id="@+id/pgp_keyentry" android:layout_width="fill_parent" android:layout_height="wrap_content" - android:background="#ffa713" + android:background="@drawable/bluebackground" android:orientation="vertical" android:visibility="gone" > @@ -103,14 +103,14 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="OpenPGP encrypted messages found" - android:textColor="#000" + android:textColor="#eee" android:textStyle="bold" android:padding="8dp" android:textSize="20sp"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" - android:textColor="#000" + android:textColor="#eee" android:text="Click here to enter passphrase and decrypt messages" android:paddingLeft="8dp" android:paddingBottom="8dp" diff --git a/src/eu/siacs/conversations/entities/MucOptions.java b/src/eu/siacs/conversations/entities/MucOptions.java index 4a738e65c..d5340ea83 100644 --- a/src/eu/siacs/conversations/entities/MucOptions.java +++ b/src/eu/siacs/conversations/entities/MucOptions.java @@ -1,5 +1,42 @@ package eu.siacs.conversations.entities; -public class MucOptions { +import android.annotation.SuppressLint; +@SuppressLint("DefaultLocale") +public class MucOptions { + public class User { + public static final int ROLE_MODERATOR = 3; + public static final int ROLE_NONE = 0; + public static final int ROLE_PARTICIPANT = 2; + public static final int ROLE_VISITOR = 1; + public static final int AFFILIATION_ADMIN = 4; + public static final int AFFILIATION_OWNER = 3; + public static final int AFFILIATION_MEMBER = 2; + public static final int AFFILIATION_OUTCAST = 1; + public static final int AFFILIATION_NONE = 0; + + private int role; + private int affiliation; + public int getRole() { + return this.role; + } + public void setRole(String role) { + role = role.toLowerCase(); + if (role.equals("moderator")) { + this.role = ROLE_MODERATOR; + } else if (role.equals("participant")) { + this.role = ROLE_PARTICIPANT; + } else if (role.equals("visitor")) { + this.role = ROLE_VISITOR; + } else { + this.role = ROLE_NONE; + } + } + public int getAffiliation() { + return this.affiliation; + } + public void setAffiliation() { + + } + } } |