diff options
author | iNPUTmice <daniel@gultsch.de> | 2014-09-12 17:53:42 +0200 |
---|---|---|
committer | iNPUTmice <daniel@gultsch.de> | 2014-09-12 17:53:42 +0200 |
commit | 83c3b33f18429dc8788c2b58a31d150bee553d10 (patch) | |
tree | f4451e53a65dd25fd434dcb08bdaad53137e987a | |
parent | cee898084ee27592d774c8f62f5be7fd1edf821b (diff) | |
parent | 73cba91c9b08ff512104897b32837f9824f1cd3e (diff) |
Merge branch 'development'
93 files changed, 948 insertions, 625 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 3999b487..7cec0264 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="eu.siacs.conversations" - android:versionCode="26" - android:versionName="0.7" > + android:versionCode="27" + android:versionName="0.7.1" > <uses-sdk android:minSdkVersion="14" @@ -15,7 +15,9 @@ Conversations - the very last word in instant messaging ##Features * End-to-end encryption with either OTR or openPGP * Sending and receiving images +* Indication when your contact has read your message * Intuitive UI that follows Android Design guidelines +* Pictures / Avatars for your Contacts * Syncs with desktop client * Conferences (with support for bookmarks) * Address book integration @@ -119,6 +121,29 @@ details within Conversations. This will start an add to address book intent with as payload. This doesn’t require Conversations to have write permissions on your address book but also doesn’t require you to copy past Jabber ID from one app to another. + +####I get 'delivery failed' on my messages +If you get delivery failed on images it’s probably because the recipient lost +network connectivity during recepiton. In that case you can try it again at a +later time. + +For text messages the answer to your question is a little bit more complex. +'delivery failed' on text messages is always something that is being reported by +the server. The most common reason for this is that the recipient failed to +resume a connection. When a client loses connectivity for a short time the client +usually has a five minute window to pick up that connection again. When the +client fails to do so because the network connectivity is out for longer than +that all messages sent to that client will be returned to the sender resulting +in a delivery failed. + +Other less common reasons are that the message you sent didn’t meet some +criterias enforced by the server. (Too large, too many) Another reason could be +that the recipient is offline and the server doesn’t provide offline storage. + +Usually you are able to distinguish between these two groups in the fact that +the first one happens always after some time and the second one happens almost +instantly. + ####Where can I see the status of my contacts? How can I set a status or priority Status are a horrible metric. Setting them manually to a proper value rarely works because users are either lazy or just forget about them. Setting them diff --git a/art/ic_action_send_now.svg b/art/ic_action_send_now.svg new file mode 100644 index 00000000..6bde9158 --- /dev/null +++ b/art/ic_action_send_now.svg @@ -0,0 +1,69 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + id="svg3621" + version="1.1" + inkscape:version="0.48.4 r9939" + width="96" + height="96" + sodipodi:docname="ic_action_send_now.svg" + inkscape:export-filename="/home/daniel/workspace/Conversations/res/drawable-xxhdpi/ic_action_send_now_online.png" + inkscape:export-xdpi="154.28572" + inkscape:export-ydpi="154.28572"> + <metadata + id="metadata3627"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <defs + id="defs3625" /> + <sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1916" + inkscape:window-height="1161" + id="namedview3623" + showgrid="true" + showguides="true" + inkscape:zoom="1" + inkscape:cx="47.28873" + inkscape:cy="43.262706" + inkscape:window-x="0" + inkscape:window-y="18" + inkscape:window-maximized="0" + inkscape:current-layer="svg3621"> + <inkscape:grid + type="xygrid" + id="grid3631" /> + </sodipodi:namedview> + <path + style="fill:#e51c28;fill-opacity:0.627451;stroke:none" + d="M 20.012575,21.028577 76,49 20.012575,77.028577 26,52 58.012575,49.028577 26,46 z" + id="path3633" + inkscape:connector-curvature="0" + sodipodi:nodetypes="ccccccc" + inkscape:export-filename="/home/daniel/workspace/Conversations/res/drawable-mdpi/ic_action_send_now_dnd.png" + inkscape:export-xdpi="51.42857" + inkscape:export-ydpi="51.42857" /> +</svg> diff --git a/docs/XEPs.md b/docs/XEPs.md new file mode 100644 index 00000000..8d1d0d5c --- /dev/null +++ b/docs/XEPs.md @@ -0,0 +1,17 @@ +* XEP-0030: Service Discovery +* XEP-0045: Multi-User Chat +* XEP-0048: Bookmarks +* XEP-0115: Entity Capabilities +* XEP-0138: Stream Compression +* XEP-0163: Personal Eventing Protocol (avatars and nicks) +* XEP-0166: Jingle (only used for file transfer) +* XEP-0184: Message Delivery Receipts (reply only) +* XEP-0198: Stream Management +* XEP-0234: Jingle File Transfer +* XEP-0237: Roster Versioning +* XEP-0249: Direct MUC Invitations (receiving only) +* XEP-0260: Jingle SOCKS5 Bytestreams Transport Method +* XEP-0261: Jingle In-Band Bytestreams Transport Method +* XEP-0280: Message Carbons +* XEP-0333: Chat Markers +* XEP-0352: Client State Indication diff --git a/res/drawable-hdpi/ic_action_send_now.png b/res/drawable-hdpi/ic_action_send_now.png Binary files differdeleted file mode 100644 index ff0e369e..00000000 --- a/res/drawable-hdpi/ic_action_send_now.png +++ /dev/null diff --git a/res/drawable-hdpi/ic_action_send_now_away.png b/res/drawable-hdpi/ic_action_send_now_away.png Binary files differnew file mode 100644 index 00000000..505cbe63 --- /dev/null +++ b/res/drawable-hdpi/ic_action_send_now_away.png diff --git a/res/drawable-hdpi/ic_action_send_now_dnd.png b/res/drawable-hdpi/ic_action_send_now_dnd.png Binary files differnew file mode 100644 index 00000000..a376524d --- /dev/null +++ b/res/drawable-hdpi/ic_action_send_now_dnd.png diff --git a/res/drawable-hdpi/ic_action_send_now_offline.png b/res/drawable-hdpi/ic_action_send_now_offline.png Binary files differnew file mode 100644 index 00000000..d4d2d510 --- /dev/null +++ b/res/drawable-hdpi/ic_action_send_now_offline.png diff --git a/res/drawable-hdpi/ic_action_send_now_online.png b/res/drawable-hdpi/ic_action_send_now_online.png Binary files differnew file mode 100644 index 00000000..48676f7b --- /dev/null +++ b/res/drawable-hdpi/ic_action_send_now_online.png diff --git a/res/drawable-mdpi/ic_action_send_now_away.png b/res/drawable-mdpi/ic_action_send_now_away.png Binary files differnew file mode 100644 index 00000000..0fdca901 --- /dev/null +++ b/res/drawable-mdpi/ic_action_send_now_away.png diff --git a/res/drawable-mdpi/ic_action_send_now_dnd.png b/res/drawable-mdpi/ic_action_send_now_dnd.png Binary files differnew file mode 100644 index 00000000..c0aef36c --- /dev/null +++ b/res/drawable-mdpi/ic_action_send_now_dnd.png diff --git a/res/drawable-mdpi/ic_action_send_now_offline.png b/res/drawable-mdpi/ic_action_send_now_offline.png Binary files differnew file mode 100644 index 00000000..7723f4aa --- /dev/null +++ b/res/drawable-mdpi/ic_action_send_now_offline.png diff --git a/res/drawable-mdpi/ic_action_send_now_online.png b/res/drawable-mdpi/ic_action_send_now_online.png Binary files differnew file mode 100644 index 00000000..39d00ee4 --- /dev/null +++ b/res/drawable-mdpi/ic_action_send_now_online.png diff --git a/res/drawable-xhdpi/ic_action_send_now.png b/res/drawable-xhdpi/ic_action_send_now.png Binary files differdeleted file mode 100644 index 373dde23..00000000 --- a/res/drawable-xhdpi/ic_action_send_now.png +++ /dev/null diff --git a/res/drawable-xhdpi/ic_action_send_now_away.png b/res/drawable-xhdpi/ic_action_send_now_away.png Binary files differnew file mode 100644 index 00000000..bb999d85 --- /dev/null +++ b/res/drawable-xhdpi/ic_action_send_now_away.png diff --git a/res/drawable-xhdpi/ic_action_send_now_dnd.png b/res/drawable-xhdpi/ic_action_send_now_dnd.png Binary files differnew file mode 100644 index 00000000..a0bf5561 --- /dev/null +++ b/res/drawable-xhdpi/ic_action_send_now_dnd.png diff --git a/res/drawable-xhdpi/ic_action_send_now_offline.png b/res/drawable-xhdpi/ic_action_send_now_offline.png Binary files differnew file mode 100644 index 00000000..6da9ff7b --- /dev/null +++ b/res/drawable-xhdpi/ic_action_send_now_offline.png diff --git a/res/drawable-xhdpi/ic_action_send_now_online.png b/res/drawable-xhdpi/ic_action_send_now_online.png Binary files differnew file mode 100644 index 00000000..348ba657 --- /dev/null +++ b/res/drawable-xhdpi/ic_action_send_now_online.png diff --git a/res/drawable-xxhdpi/ic_action_send_now_away.png b/res/drawable-xxhdpi/ic_action_send_now_away.png Binary files differnew file mode 100644 index 00000000..12ec4d33 --- /dev/null +++ b/res/drawable-xxhdpi/ic_action_send_now_away.png diff --git a/res/drawable-xxhdpi/ic_action_send_now_dnd.png b/res/drawable-xxhdpi/ic_action_send_now_dnd.png Binary files differnew file mode 100644 index 00000000..7719f81a --- /dev/null +++ b/res/drawable-xxhdpi/ic_action_send_now_dnd.png diff --git a/res/drawable-xxhdpi/ic_action_send_now_offline.png b/res/drawable-xxhdpi/ic_action_send_now_offline.png Binary files differnew file mode 100644 index 00000000..18895813 --- /dev/null +++ b/res/drawable-xxhdpi/ic_action_send_now_offline.png diff --git a/res/drawable-xxhdpi/ic_action_send_now_online.png b/res/drawable-xxhdpi/ic_action_send_now_online.png Binary files differnew file mode 100644 index 00000000..29bde36e --- /dev/null +++ b/res/drawable-xxhdpi/ic_action_send_now_online.png diff --git a/res/drawable/actionbar_tab_indicator.xml b/res/drawable/actionbar_tab_indicator.xml index 102b75d8..5598ee42 100644 --- a/res/drawable/actionbar_tab_indicator.xml +++ b/res/drawable/actionbar_tab_indicator.xml @@ -1,19 +1,21 @@ <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> + <!-- Non focused states --> - <item android:state_focused="false" android:state_selected="false" android:state_pressed="false" android:drawable="@android:color/transparent" /> - <item android:state_focused="false" android:state_selected="true" android:state_pressed="false" android:drawable="@drawable/tab_selected_conversations" /> + <item android:drawable="@android:color/transparent" android:state_focused="false" android:state_pressed="false" android:state_selected="false"/> + <item android:drawable="@drawable/tab_selected_conversations" android:state_focused="false" android:state_pressed="false" android:state_selected="true"/> <!-- Focused states --> - <item android:state_focused="true" android:state_selected="false" android:state_pressed="false" android:drawable="@drawable/tab_unselected_focused_conversations" /> - <item android:state_focused="true" android:state_selected="true" android:state_pressed="false" android:drawable="@drawable/tab_selected_focused_conversations" /> + <item android:drawable="@drawable/tab_unselected_focused_conversations" android:state_focused="true" android:state_pressed="false" android:state_selected="false"/> + <item android:drawable="@drawable/tab_selected_focused_conversations" android:state_focused="true" android:state_pressed="false" android:state_selected="true"/> <!-- Pressed --> - <!-- Non focused states --> - <item android:state_focused="false" android:state_selected="false" android:state_pressed="true" android:drawable="@drawable/tab_unselected_pressed_conversations" /> - <item android:state_focused="false" android:state_selected="true" android:state_pressed="true" android:drawable="@drawable/tab_selected_pressed_conversations" /> + <!-- Non focused states --> + <item android:drawable="@drawable/tab_unselected_pressed_conversations" android:state_focused="false" android:state_pressed="true" android:state_selected="false"/> + <item android:drawable="@drawable/tab_selected_pressed_conversations" android:state_focused="false" android:state_pressed="true" android:state_selected="true"/> + + <!-- Focused states --> + <item android:drawable="@drawable/tab_unselected_pressed_conversations" android:state_focused="true" android:state_pressed="true" android:state_selected="false"/> + <item android:drawable="@drawable/tab_selected_pressed_conversations" android:state_focused="true" android:state_pressed="true" android:state_selected="true"/> - <!-- Focused states --> - <item android:state_focused="true" android:state_selected="false" android:state_pressed="true" android:drawable="@drawable/tab_unselected_pressed_conversations" /> - <item android:state_focused="true" android:state_selected="true" android:state_pressed="true" android:drawable="@drawable/tab_selected_pressed_conversations" /> - </selector>
\ No newline at end of file +</selector>
\ No newline at end of file diff --git a/res/drawable/es_slidingpane_shadow.xml b/res/drawable/es_slidingpane_shadow.xml index 5b6037f7..44ffd4ea 100644 --- a/res/drawable/es_slidingpane_shadow.xml +++ b/res/drawable/es_slidingpane_shadow.xml @@ -1,7 +1,12 @@ <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" > -<gradient - android:endColor="@color/divider" - android:startColor="@android:color/transparent" /> -<size android:width="3.0dp" android:height="0.5dp" /> + + <gradient + android:endColor="@color/divider" + android:startColor="@android:color/transparent" /> + + <size + android:height="0.5dp" + android:width="3.0dp" /> + </shape>
\ No newline at end of file diff --git a/res/drawable/grey.xml b/res/drawable/grey.xml index bdb9383f..2e90d96d 100644 --- a/res/drawable/grey.xml +++ b/res/drawable/grey.xml @@ -1,5 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> -<shape xmlns:android="http://schemas.android.com/apk/res/android" - android:shape="rectangle"> +<shape xmlns:android="http://schemas.android.com/apk/res/android" + android:shape="rectangle" > + <solid android:color="#ffdddddd" /> + </shape>
\ No newline at end of file diff --git a/res/drawable/greybackground.xml b/res/drawable/greybackground.xml index 529af5e8..bedc4b17 100644 --- a/res/drawable/greybackground.xml +++ b/res/drawable/greybackground.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> -<selector xmlns:android="http://schemas.android.com/apk/res/android" > - <item - android:state_pressed="true" - android:drawable="@drawable/grey" /> -</selector> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + + <item android:drawable="@drawable/grey" android:state_pressed="true"/> + +</selector>
\ No newline at end of file diff --git a/res/drawable/message_border.xml b/res/drawable/message_border.xml index 4a581e7d..b463d788 100644 --- a/res/drawable/message_border.xml +++ b/res/drawable/message_border.xml @@ -1,6 +1,15 @@ <?xml version="1.0" encoding="UTF-8"?> - <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> - <corners android:radius="2dp"/> - <padding android:left="1.5dp" android:right="1.5dp" android:top="1.5dp" android:bottom="1.5dp"/> - <solid android:color="@color/divider"/> +<shape xmlns:android="http://schemas.android.com/apk/res/android" + android:shape="rectangle" > + + <corners android:radius="2dp" /> + + <padding + android:bottom="1.5dp" + android:left="1.5dp" + android:right="1.5dp" + android:top="1.5dp" /> + + <solid android:color="@color/divider" /> + </shape>
\ No newline at end of file diff --git a/res/drawable/section_header.xml b/res/drawable/section_header.xml index e4cb9742..9db04f90 100644 --- a/res/drawable/section_header.xml +++ b/res/drawable/section_header.xml @@ -7,4 +7,5 @@ android:width="2000dp" /> <solid android:color="@color/divider" /> + </shape>
\ No newline at end of file diff --git a/res/drawable/snackbar.xml b/res/drawable/snackbar.xml index 5f5dc430..951d7aee 100644 --- a/res/drawable/snackbar.xml +++ b/res/drawable/snackbar.xml @@ -1,6 +1,14 @@ <?xml version="1.0" encoding="UTF-8"?> -<shape xmlns:android="http://schemas.android.com/apk/res/android"> - <solid android:color="@color/darkbackground"/> - <corners android:radius="8dip"/> - <padding android:left="0dip" android:top="0dip" android:right="0dip" android:bottom="0dip" /> +<shape xmlns:android="http://schemas.android.com/apk/res/android" > + + <solid android:color="@color/darkbackground" /> + + <corners android:radius="8dip" /> + + <padding + android:bottom="0dip" + android:left="0dip" + android:right="0dip" + android:top="0dip" /> + </shape>
\ No newline at end of file diff --git a/res/layout-sw360dp/fragment_conversations_overview.xml b/res/layout-sw360dp/fragment_conversations_overview.xml index ceb3b5fa..ef8a1b6e 100644 --- a/res/layout-sw360dp/fragment_conversations_overview.xml +++ b/res/layout-sw360dp/fragment_conversations_overview.xml @@ -1,30 +1,30 @@ -<android.support.v4.widget.SlidingPaneLayout +<android.support.v4.widget.SlidingPaneLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/slidingpanelayout" + android:layout_width="match_parent" + android:layout_height="match_parent" > + + <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="match_parent" + android:layout_width="324dp" android:layout_height="match_parent" - android:id="@+id/slidingpanelayout"> -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="324dp" - android:layout_height="match_parent" - android:orientation="vertical" - android:background="@color/primarybackground" - > - - <ListView - android:id="@+id/list" - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:divider="@color/divider" - android:dividerHeight="1dp" android:background="@color/primarybackground" - /> - -</LinearLayout> -<LinearLayout - android:id="@+id/selected_conversation" - android:layout_width="fill_parent" - android:layout_height="match_parent" - android:layout_weight="1" - android:orientation="vertical"> -</LinearLayout> + android:orientation="vertical" > + + <ListView + android:id="@+id/list" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:background="@color/primarybackground" + android:divider="@color/divider" + android:dividerHeight="1dp" /> + </LinearLayout> + + <LinearLayout + android:id="@+id/selected_conversation" + android:layout_width="fill_parent" + android:layout_height="match_parent" + android:layout_weight="1" + android:orientation="vertical" > + </LinearLayout> + </android.support.v4.widget.SlidingPaneLayout>
\ No newline at end of file diff --git a/res/layout-sw384dp/fragment_conversations_overview.xml b/res/layout-sw384dp/fragment_conversations_overview.xml index 26d79d23..2a422052 100644 --- a/res/layout-sw384dp/fragment_conversations_overview.xml +++ b/res/layout-sw384dp/fragment_conversations_overview.xml @@ -1,30 +1,30 @@ -<android.support.v4.widget.SlidingPaneLayout +<android.support.v4.widget.SlidingPaneLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/slidingpanelayout" + android:layout_width="match_parent" + android:layout_height="match_parent" > + + <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="match_parent" + android:layout_width="345dp" android:layout_height="match_parent" - android:id="@+id/slidingpanelayout"> -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="345dp" - android:layout_height="match_parent" - android:orientation="vertical" - android:background="@color/primarybackground" - > - - <ListView - android:id="@+id/list" - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:divider="@color/divider" - android:dividerHeight="1dp" android:background="@color/primarybackground" - /> - -</LinearLayout> -<LinearLayout - android:id="@+id/selected_conversation" - android:layout_width="fill_parent" - android:layout_height="match_parent" - android:layout_weight="1" - android:orientation="vertical"> -</LinearLayout> + android:orientation="vertical" > + + <ListView + android:id="@+id/list" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:background="@color/primarybackground" + android:divider="@color/divider" + android:dividerHeight="1dp" /> + </LinearLayout> + + <LinearLayout + android:id="@+id/selected_conversation" + android:layout_width="fill_parent" + android:layout_height="match_parent" + android:layout_weight="1" + android:orientation="vertical" > + </LinearLayout> + </android.support.v4.widget.SlidingPaneLayout>
\ No newline at end of file diff --git a/res/layout-sw600dp/fragment_conversations_overview.xml b/res/layout-sw600dp/fragment_conversations_overview.xml index f26c840b..5dfdceff 100644 --- a/res/layout-sw600dp/fragment_conversations_overview.xml +++ b/res/layout-sw600dp/fragment_conversations_overview.xml @@ -1,30 +1,30 @@ -<android.support.v4.widget.SlidingPaneLayout +<android.support.v4.widget.SlidingPaneLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/slidingpanelayout" + android:layout_width="match_parent" + android:layout_height="match_parent" > + + <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="match_parent" + android:layout_width="240dp" android:layout_height="match_parent" - android:id="@+id/slidingpanelayout"> -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="240dp" - android:layout_height="match_parent" - android:orientation="vertical" - android:background="@color/primarybackground" - > - - <ListView - android:id="@+id/list" - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:divider="@color/divider" - android:dividerHeight="1dp" android:background="@color/primarybackground" - /> - -</LinearLayout> -<LinearLayout - android:id="@+id/selected_conversation" - android:layout_width="fill_parent" - android:layout_height="match_parent" - android:layout_weight="1" - android:orientation="vertical"> -</LinearLayout> + android:orientation="vertical" > + + <ListView + android:id="@+id/list" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:background="@color/primarybackground" + android:divider="@color/divider" + android:dividerHeight="1dp" /> + </LinearLayout> + + <LinearLayout + android:id="@+id/selected_conversation" + android:layout_width="fill_parent" + android:layout_height="match_parent" + android:layout_weight="1" + android:orientation="vertical" > + </LinearLayout> + </android.support.v4.widget.SlidingPaneLayout>
\ No newline at end of file diff --git a/res/layout-sw720dp/fragment_conversations_overview.xml b/res/layout-sw720dp/fragment_conversations_overview.xml index b85f1116..bc52ec46 100644 --- a/res/layout-sw720dp/fragment_conversations_overview.xml +++ b/res/layout-sw720dp/fragment_conversations_overview.xml @@ -1,30 +1,30 @@ -<android.support.v4.widget.SlidingPaneLayout +<android.support.v4.widget.SlidingPaneLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/slidingpanelayout" + android:layout_width="match_parent" + android:layout_height="match_parent" > + + <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="match_parent" + android:layout_width="288dp" android:layout_height="match_parent" - android:id="@+id/slidingpanelayout"> -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="288dp" - android:layout_height="match_parent" - android:orientation="vertical" - android:background="@color/primarybackground" - > - - <ListView - android:id="@+id/list" - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:divider="@color/divider" - android:dividerHeight="1dp" android:background="@color/primarybackground" - /> - -</LinearLayout> -<LinearLayout - android:id="@+id/selected_conversation" - android:layout_width="fill_parent" - android:layout_height="match_parent" - android:layout_weight="1" - android:orientation="vertical"> -</LinearLayout> + android:orientation="vertical" > + + <ListView + android:id="@+id/list" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:background="@color/primarybackground" + android:divider="@color/divider" + android:dividerHeight="1dp" /> + </LinearLayout> + + <LinearLayout + android:id="@+id/selected_conversation" + android:layout_width="fill_parent" + android:layout_height="match_parent" + android:layout_weight="1" + android:orientation="vertical" > + </LinearLayout> + </android.support.v4.widget.SlidingPaneLayout>
\ No newline at end of file diff --git a/res/layout/account_row.xml b/res/layout/account_row.xml index 230a5a98..2d1190a3 100644 --- a/res/layout/account_row.xml +++ b/res/layout/account_row.xml @@ -16,8 +16,8 @@ <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" - android:layout_toRightOf="@+id/account_image" android:layout_centerVertical="true" + android:layout_toRightOf="@+id/account_image" android:orientation="vertical" android:paddingLeft="8dp" > @@ -35,9 +35,9 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/account_status_unknown" - android:textSize="?attr/TextSizeBody" android:textColor="@color/secondarytext" - android:textStyle="bold"/> + android:textSize="?attr/TextSizeBody" + android:textStyle="bold" /> </LinearLayout> </RelativeLayout>
\ No newline at end of file diff --git a/res/layout/actionview_search.xml b/res/layout/actionview_search.xml index 70300913..64b75f0e 100644 --- a/res/layout/actionview_search.xml +++ b/res/layout/actionview_search.xml @@ -14,6 +14,6 @@ android:layout_height="wrap_content" android:focusable="true" android:inputType="textEmailAddress|textNoSuggestions" - android:textColor="@color/ondarktext"/> + android:textColor="@color/ondarktext" /> </LinearLayout>
\ No newline at end of file diff --git a/res/layout/activity_contact_details.xml b/res/layout/activity_contact_details.xml index b3672e59..f4fd9c1e 100644 --- a/res/layout/activity_contact_details.xml +++ b/res/layout/activity_contact_details.xml @@ -2,124 +2,127 @@ <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="@color/primarybackground"> + android:background="@color/primarybackground" > -<LinearLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="vertical"> - - <TextView - style="@style/sectionHeader" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:padding="8dp" - android:text="@string/action_contact_details" - android:textColor="@color/primarytext"/> - <RelativeLayout - android:layout_width="wrap_content" + <LinearLayout + android:layout_width="match_parent" android:layout_height="wrap_content" - android:minHeight="88dp" - android:padding="8dp"> + android:orientation="vertical" > - <QuickContactBadge - android:id="@+id/details_contact_badge" - android:layout_width="72dp" - android:layout_height="72dp" - android:layout_centerVertical="true" - android:scaleType="centerCrop"/> + <TextView + style="@style/sectionHeader" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:padding="8dp" + android:text="@string/action_contact_details" + android:textColor="@color/primarytext" /> - <LinearLayout - android:id="@+id/details_jidbox" + <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_centerVertical="true" - android:layout_toRightOf="@+id/details_contact_badge" - android:orientation="vertical" - android:paddingLeft="8dp" > + android:minHeight="88dp" + android:padding="8dp" > - <TextView - android:id="@+id/details_contactjid" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:paddingLeft="8dp" - android:singleLine="true" - android:textSize="?attr/TextSizeBody" - android:textColor="@color/primarytext"/> + <QuickContactBadge + android:id="@+id/details_contact_badge" + android:layout_width="72dp" + android:layout_height="72dp" + android:layout_centerVertical="true" + android:scaleType="centerCrop" /> - <TextView - android:id="@+id/details_contactstatus" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:paddingLeft="16dp" - android:textSize="?attr/TextSizeHeadline" - android:textColor="@color/primarytext" - android:textStyle="bold" /> - <TextView - android:id="@+id/details_lastseen" + <LinearLayout + android:id="@+id/details_jidbox" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:paddingLeft="8dp" - android:singleLine="true" - android:textSize="?attr/TextSizeBody" - android:textColor="@color/primarytext"/> - </LinearLayout> - - </RelativeLayout> + android:layout_centerVertical="true" + android:layout_toRightOf="@+id/details_contact_badge" + android:orientation="vertical" + android:paddingLeft="8dp" > - - <TextView - style="@style/sectionHeader" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:padding="8dp" - android:text="@string/your_account" - android:textColor="@color/primarytext"/> - <TextView - android:id="@+id/details_account" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:paddingLeft="8dp" - android:textSize="?attr/TextSizeBody" - android:textColor="@color/primarytext" /> - <TextView - style="@style/sectionHeader" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:padding="8dp" - android:text="@string/subscriptions" - android:textColor="@color/primarytext"/> + <TextView + android:id="@+id/details_contactjid" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:paddingLeft="8dp" + android:singleLine="true" + android:textColor="@color/primarytext" + android:textSize="?attr/TextSizeBody" /> - <CheckBox - android:id="@+id/details_send_presence" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="@string/send_presence_updates" - android:textSize="?attr/TextSizeBody" - android:textColor="@color/primarytext" /> + <TextView + android:id="@+id/details_contactstatus" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:paddingLeft="16dp" + android:textColor="@color/primarytext" + android:textSize="?attr/TextSizeHeadline" + android:textStyle="bold" /> + + <TextView + android:id="@+id/details_lastseen" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:paddingLeft="8dp" + android:singleLine="true" + android:textColor="@color/primarytext" + android:textSize="?attr/TextSizeBody" /> + </LinearLayout> + </RelativeLayout> + + <TextView + style="@style/sectionHeader" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:padding="8dp" + android:text="@string/your_account" + android:textColor="@color/primarytext" /> + + <TextView + android:id="@+id/details_account" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:paddingLeft="8dp" + android:textColor="@color/primarytext" + android:textSize="?attr/TextSizeBody" /> + + <TextView + style="@style/sectionHeader" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:padding="8dp" + android:text="@string/subscriptions" + android:textColor="@color/primarytext" /> <CheckBox - android:id="@+id/details_receive_presence" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="@string/receive_presence_updates" - android:textSize="?attr/TextSizeBody" - android:textColor="@color/primarytext" /> - <TextView - style="@style/sectionHeader" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:padding="8dp" - android:text="@string/keys" /> - - <LinearLayout - android:id="@+id/details_contact_keys" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="vertical" - android:divider="?android:dividerHorizontal" - android:showDividers="middle"> - </LinearLayout> - -</LinearLayout> + android:id="@+id/details_send_presence" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/send_presence_updates" + android:textColor="@color/primarytext" + android:textSize="?attr/TextSizeBody" /> + + <CheckBox + android:id="@+id/details_receive_presence" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/receive_presence_updates" + android:textColor="@color/primarytext" + android:textSize="?attr/TextSizeBody" /> + + <TextView + style="@style/sectionHeader" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:padding="8dp" + android:text="@string/keys" /> + + <LinearLayout + android:id="@+id/details_contact_keys" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:divider="?android:dividerHorizontal" + android:orientation="vertical" + android:showDividers="middle" > + </LinearLayout> + </LinearLayout> + </ScrollView>
\ No newline at end of file diff --git a/res/layout/activity_muc_details.xml b/res/layout/activity_muc_details.xml index c3eb263d..1a676548 100644 --- a/res/layout/activity_muc_details.xml +++ b/res/layout/activity_muc_details.xml @@ -24,7 +24,7 @@ android:singleLine="true" android:text="@string/account_settings_example_jabber_id" android:textColor="@color/primarytext" - android:textSize="?attr/TextSizeBody"/> + android:textSize="?attr/TextSizeBody" /> <TextView style="@style/sectionHeader" @@ -82,9 +82,8 @@ android:layout_alignParentRight="true" android:layout_centerVertical="true" android:background="?android:selectableItemBackground" - android:src="@drawable/ic_action_edit_dark" - android:padding="8dp"/> - + android:padding="8dp" + android:src="@drawable/ic_action_edit_dark" /> </RelativeLayout> <LinearLayout diff --git a/res/layout/activity_publish_profile_picture.xml b/res/layout/activity_publish_profile_picture.xml index f23ae6c4..fac499bc 100644 --- a/res/layout/activity_publish_profile_picture.xml +++ b/res/layout/activity_publish_profile_picture.xml @@ -28,7 +28,7 @@ android:layout_centerHorizontal="true" android:text="@string/touch_to_choose_picture" android:textColor="@color/secondarytext" /> - + <TextView android:id="@+id/secondary_hint" android:layout_width="wrap_content" @@ -77,30 +77,30 @@ android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_above="@+id/button_bar" - android:layout_below="@+id/secondary_hint" android:layout_alignParentLeft="true" android:layout_alignParentRight="true" + android:layout_below="@+id/secondary_hint" android:gravity="center_vertical" android:orientation="vertical" android:paddingLeft="8dp" android:paddingRight="8dp" > - <TextView + <TextView android:id="@+id/account" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="@color/primarytext" - android:textSize="?attr/TextSizeHeadline"/> - + android:textSize="?attr/TextSizeHeadline" /> + <TextView android:id="@+id/hint_or_warning" - android:layout_marginTop="8dp" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:layout_marginTop="8dp" + android:minLines="3" android:text="@string/publish_avatar_explanation" android:textColor="@color/primarytext" - android:textSize="?attr/TextSizeBody" - android:minLines="3" /> + android:textSize="?attr/TextSizeBody" /> </LinearLayout> </RelativeLayout>
\ No newline at end of file diff --git a/res/layout/activity_start_conversation.xml b/res/layout/activity_start_conversation.xml index 9c757540..f9c98529 100644 --- a/res/layout/activity_start_conversation.xml +++ b/res/layout/activity_start_conversation.xml @@ -3,6 +3,6 @@ android:id="@+id/start_conversation_view_pager" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="@color/primarybackground"> + android:background="@color/primarybackground" > </android.support.v4.view.ViewPager>
\ No newline at end of file diff --git a/res/layout/contact.xml b/res/layout/contact.xml index ff55ccac..12ab3da1 100644 --- a/res/layout/contact.xml +++ b/res/layout/contact.xml @@ -27,8 +27,8 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" - android:textSize="?attr/TextSizeHeadline" - android:textColor="@color/primarytext" /> + android:textColor="@color/primarytext" + android:textSize="?attr/TextSizeHeadline" /> <TextView android:id="@+id/contact_jid" diff --git a/res/layout/contact_key.xml b/res/layout/contact_key.xml index 904523a1..e10f8420 100644 --- a/res/layout/contact_key.xml +++ b/res/layout/contact_key.xml @@ -32,9 +32,9 @@ android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_centerVertical="true" - android:padding="8dp" android:background="?android:selectableItemBackground" + android:padding="8dp" android:src="@drawable/ic_action_remove" - android:visibility="invisible"/> + android:visibility="invisible" /> </RelativeLayout>
\ No newline at end of file diff --git a/res/layout/conversation_list_row.xml b/res/layout/conversation_list_row.xml index 8fdd64b7..21147b4a 100644 --- a/res/layout/conversation_list_row.xml +++ b/res/layout/conversation_list_row.xml @@ -2,71 +2,67 @@ android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal" - android:padding="8dp"> - + android:padding="8dp" > - <ImageView - android:id="@+id/conversation_image" - android:layout_width="56dp" - android:layout_height="56dp" - android:layout_alignParentLeft="true" - android:scaleType="centerCrop"/> + <ImageView + android:id="@+id/conversation_image" + android:layout_width="56dp" + android:layout_height="56dp" + android:layout_alignParentLeft="true" + android:scaleType="centerCrop" /> - <RelativeLayout - android:layout_toRightOf="@+id/conversation_image" - android:layout_centerVertical="true" - android:layout_height="wrap_content" - android:layout_width="fill_parent" - android:paddingLeft="8dp"> + <RelativeLayout + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_centerVertical="true" + android:layout_toRightOf="@+id/conversation_image" + android:paddingLeft="8dp" > - <TextView - android:id="@+id/conversation_name" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_alignLeft="@+id/conversation_lastwrapper" - android:layout_toLeftOf="@+id/conversation_lastupdate" - android:singleLine="true" - android:textSize="?attr/TextSizeHeadline" - android:textColor="@color/primarytext" - android:typeface="sans" /> - - <LinearLayout - android:orientation="vertical" - android:id="@+id/conversation_lastwrapper" - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:layout_below="@id/conversation_name" - android:paddingTop="3dp" - > - <TextView - android:id="@+id/conversation_lastmsg" - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:textSize="?attr/TextSizeBody" - android:textColor="@color/primarytext" - android:singleLine="true" - android:scrollHorizontally="false" - /> - - <ImageView - android:id="@+id/conversation_lastimage" - android:layout_width="fill_parent" - android:layout_height="36dp" - android:background="@color/primarytext" - android:scaleType="centerCrop" /> + <TextView + android:id="@+id/conversation_name" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignLeft="@+id/conversation_lastwrapper" + android:layout_toLeftOf="@+id/conversation_lastupdate" + android:singleLine="true" + android:textColor="@color/primarytext" + android:textSize="?attr/TextSizeHeadline" + android:typeface="sans" /> - </LinearLayout> - <TextView - android:id="@+id/conversation_lastupdate" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_alignBaseline="@+id/conversation_name" - android:layout_alignParentRight="true" - android:gravity="right" - android:textSize="?attr/TextSizeInfo" - android:textColor="@color/secondarytext"/> + <LinearLayout + android:id="@+id/conversation_lastwrapper" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_below="@id/conversation_name" + android:orientation="vertical" + android:paddingTop="3dp" > + + <TextView + android:id="@+id/conversation_lastmsg" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:scrollHorizontally="false" + android:singleLine="true" + android:textColor="@color/primarytext" + android:textSize="?attr/TextSizeBody" /> + + <ImageView + android:id="@+id/conversation_lastimage" + android:layout_width="fill_parent" + android:layout_height="36dp" + android:background="@color/primarytext" + android:scaleType="centerCrop" /> + </LinearLayout> + + <TextView + android:id="@+id/conversation_lastupdate" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignBaseline="@+id/conversation_name" + android:layout_alignParentRight="true" + android:gravity="right" + android:textColor="@color/secondarytext" + android:textSize="?attr/TextSizeInfo" /> + </RelativeLayout> - </RelativeLayout> - - </RelativeLayout>
\ No newline at end of file diff --git a/res/layout/create_contact_dialog.xml b/res/layout/create_contact_dialog.xml index a1e6f6ad..1ab4b686 100644 --- a/res/layout/create_contact_dialog.xml +++ b/res/layout/create_contact_dialog.xml @@ -3,36 +3,37 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" - android:padding="8dp"> + android:padding="8dp" > - <TextView + <TextView android:id="@+id/your_account" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:textSize="?attr/TextSizeBody" + android:text="@string/your_account" android:textColor="@color/primarytext" - android:text="@string/your_account" /> + android:textSize="?attr/TextSizeBody" /> + <Spinner android:id="@+id/account" android:layout_width="fill_parent" android:layout_height="wrap_content" /> - <TextView + <TextView android:id="@+id/jabber_id" - android:layout_marginTop="8dp" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:textSize="?attr/TextSizeBody" + android:layout_marginTop="8dp" + android:text="@string/account_settings_jabber_id" android:textColor="@color/primarytext" - android:text="@string/account_settings_jabber_id" /> - + android:textSize="?attr/TextSizeBody" /> + <AutoCompleteTextView android:id="@+id/jid" android:layout_width="fill_parent" android:layout_height="wrap_content" - android:inputType="textEmailAddress" android:hint="@string/account_settings_example_jabber_id" - android:textColorHint="@color/secondarytext" + android:inputType="textEmailAddress" android:textColor="@color/primarytext" - /> -</LinearLayout> + android:textColorHint="@color/secondarytext" /> + +</LinearLayout>
\ No newline at end of file diff --git a/res/layout/dialog_clear_history.xml b/res/layout/dialog_clear_history.xml index 7edb4b87..252808c8 100644 --- a/res/layout/dialog_clear_history.xml +++ b/res/layout/dialog_clear_history.xml @@ -3,16 +3,19 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" - android:padding="8dp"> + android:padding="8dp" > + <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" + android:paddingBottom="8dp" android:text="@string/clear_histor_msg" - android:textSize="?attr/TextSizeBody" - android:paddingBottom="8dp"/> + android:textSize="?attr/TextSizeBody" /> + <CheckBox android:id="@+id/end_conversation_checkbox" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="@string/also_end_conversation"/> -</LinearLayout> + android:text="@string/also_end_conversation" /> + +</LinearLayout>
\ No newline at end of file diff --git a/res/layout/dialog_verify_otr.xml b/res/layout/dialog_verify_otr.xml index 301f465a..831f06ed 100644 --- a/res/layout/dialog_verify_otr.xml +++ b/res/layout/dialog_verify_otr.xml @@ -3,55 +3,58 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" - android:paddingLeft="8dp" android:paddingBottom="16dp" - android:paddingRight="8dp"> - - <TextView + android:paddingLeft="8dp" + android:paddingRight="8dp" > + + <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingTop="8dp" android:text="Jabber ID" android:textColor="@color/primarytext" - android:textSize="?attr/TextSizeHeadline"/> + android:textSize="?attr/TextSizeHeadline" /> <TextView android:id="@+id/verify_otr_jid" android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingLeft="8dp" - android:textSize="?attr/TextSizeBody" - android:textColor="@color/secondarytext"/> - <TextView + android:textColor="@color/secondarytext" + android:textSize="?attr/TextSizeBody" /> + + <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingTop="8dp" android:text="@string/otr_fingerprint" android:textColor="@color/primarytext" - android:textSize="?attr/TextSizeHeadline"/> + android:textSize="?attr/TextSizeHeadline" /> <TextView android:id="@+id/verify_otr_fingerprint" android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingLeft="8dp" + android:textColor="@color/secondarytext" android:textSize="?attr/TextSizeBody" - android:typeface="monospace" - android:textColor="@color/secondarytext"/> - <TextView + android:typeface="monospace" /> + + <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingTop="8dp" android:text="@string/your_fingerprint" - android:textSize="?attr/TextSizeHeadline" - android:textColor="@color/primarytext"/> + android:textColor="@color/primarytext" + android:textSize="?attr/TextSizeHeadline" /> <TextView android:id="@+id/verify_otr_yourprint" android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingLeft="8dp" + android:textColor="@color/secondarytext" android:textSize="?attr/TextSizeBody" - android:typeface="monospace" - android:textColor="@color/secondarytext"/> -</LinearLayout> + android:typeface="monospace" /> + +</LinearLayout>
\ No newline at end of file diff --git a/res/layout/fragment_conversation.xml b/res/layout/fragment_conversation.xml index b16e4113..0f5f692e 100644 --- a/res/layout/fragment_conversation.xml +++ b/res/layout/fragment_conversation.xml @@ -5,8 +5,6 @@ android:layout_height="match_parent" android:background="@color/secondarybackground" > - - <ListView android:id="@+id/messages_view" android:layout_width="fill_parent" @@ -23,13 +21,13 @@ tools:listitem="@layout/message_sent" > </ListView> - <RelativeLayout - android:id="@+id/textsend" - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:layout_alignParentBottom="true" - android:layout_alignParentLeft="true" - android:background="@color/primarybackground" > + <RelativeLayout + android:id="@+id/textsend" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_alignParentBottom="true" + android:layout_alignParentLeft="true" + android:background="@color/primarybackground" > <eu.siacs.conversations.ui.EditMessage android:id="@+id/textinput" @@ -39,6 +37,7 @@ android:layout_toLeftOf="@+id/textSendButton" android:background="@color/primarybackground" android:ems="10" + android:imeOptions="flagNoExtractUi" android:inputType="textShortMessage|textMultiLine|textCapSentences" android:minHeight="48dp" android:minLines="1" @@ -46,8 +45,8 @@ android:paddingLeft="8dp" android:paddingRight="8dp" android:paddingTop="12dp" - android:textColor="@color/primarytext" - android:imeOptions="flagNoExtractUi"> + android:textColor="@color/primarytext" > + <requestFocus /> </eu.siacs.conversations.ui.EditMessage> @@ -58,46 +57,46 @@ android:layout_alignParentRight="true" android:layout_centerVertical="true" android:background="?android:selectableItemBackground" - android:src="@drawable/ic_action_send_now" /> + android:src="@drawable/ic_action_send_now_offline" /> </RelativeLayout> - <RelativeLayout - android:id="@+id/snackbar" - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:layout_above="@+id/textsend" - android:background="@drawable/snackbar" - android:minHeight="48dp" - android:layout_marginLeft="8dp" - android:layout_marginRight="8dp" - android:layout_marginBottom="4dp" - android:visibility="gone" > + <RelativeLayout + android:id="@+id/snackbar" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_above="@+id/textsend" + android:layout_marginBottom="4dp" + android:layout_marginLeft="8dp" + android:layout_marginRight="8dp" + android:background="@drawable/snackbar" + android:minHeight="48dp" + android:visibility="gone" > - <TextView - android:id="@+id/snackbar_message" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_alignParentLeft="true" - android:layout_centerVertical="true" - android:paddingLeft="24dp" - android:textColor="@color/ondarktext" - android:textSize="?attr/TextSizeBody" - android:layout_toLeftOf="@+id/snackbar_action"/> + <TextView + android:id="@+id/snackbar_message" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentLeft="true" + android:layout_centerVertical="true" + android:layout_toLeftOf="@+id/snackbar_action" + android:paddingLeft="24dp" + android:textColor="@color/ondarktext" + android:textSize="?attr/TextSizeBody" /> - <TextView - android:id="@+id/snackbar_action" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_alignParentRight="true" - android:layout_centerVertical="true" - android:paddingBottom="16dp" - android:paddingLeft="24dp" - android:paddingRight="24dp" - android:paddingTop="16dp" - android:textAllCaps="true" - android:textColor="@color/ondarktext" - android:textSize="?attr/TextSizeBody" - android:textStyle="bold" /> - </RelativeLayout> + <TextView + android:id="@+id/snackbar_action" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentRight="true" + android:layout_centerVertical="true" + android:paddingBottom="16dp" + android:paddingLeft="24dp" + android:paddingRight="24dp" + android:paddingTop="16dp" + android:textAllCaps="true" + android:textColor="@color/ondarktext" + android:textSize="?attr/TextSizeBody" + android:textStyle="bold" /> + </RelativeLayout> </RelativeLayout>
\ No newline at end of file diff --git a/res/layout/fragment_conversations_overview.xml b/res/layout/fragment_conversations_overview.xml index b85f1116..bc52ec46 100644 --- a/res/layout/fragment_conversations_overview.xml +++ b/res/layout/fragment_conversations_overview.xml @@ -1,30 +1,30 @@ -<android.support.v4.widget.SlidingPaneLayout +<android.support.v4.widget.SlidingPaneLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/slidingpanelayout" + android:layout_width="match_parent" + android:layout_height="match_parent" > + + <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="match_parent" + android:layout_width="288dp" android:layout_height="match_parent" - android:id="@+id/slidingpanelayout"> -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="288dp" - android:layout_height="match_parent" - android:orientation="vertical" - android:background="@color/primarybackground" - > - - <ListView - android:id="@+id/list" - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:divider="@color/divider" - android:dividerHeight="1dp" android:background="@color/primarybackground" - /> - -</LinearLayout> -<LinearLayout - android:id="@+id/selected_conversation" - android:layout_width="fill_parent" - android:layout_height="match_parent" - android:layout_weight="1" - android:orientation="vertical"> -</LinearLayout> + android:orientation="vertical" > + + <ListView + android:id="@+id/list" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:background="@color/primarybackground" + android:divider="@color/divider" + android:dividerHeight="1dp" /> + </LinearLayout> + + <LinearLayout + android:id="@+id/selected_conversation" + android:layout_width="fill_parent" + android:layout_height="match_parent" + android:layout_weight="1" + android:orientation="vertical" > + </LinearLayout> + </android.support.v4.widget.SlidingPaneLayout>
\ No newline at end of file diff --git a/res/layout/join_conference_dialog.xml b/res/layout/join_conference_dialog.xml index a36a5ef7..95c9d24c 100644 --- a/res/layout/join_conference_dialog.xml +++ b/res/layout/join_conference_dialog.xml @@ -3,45 +3,45 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" - android:padding="8dp"> + android:padding="8dp" > - <TextView + <TextView android:id="@+id/your_account" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:textSize="?attr/TextSizeBody" + android:text="@string/your_account" android:textColor="@color/primarytext" - android:text="@string/your_account" /> + android:textSize="?attr/TextSizeBody" /> + <Spinner android:id="@+id/account" android:layout_width="fill_parent" android:layout_height="wrap_content" /> - <TextView + <TextView android:id="@+id/jabber_id" - android:layout_marginTop="8dp" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:textSize="?attr/TextSizeBody" + android:layout_marginTop="8dp" + android:text="@string/conference_address" android:textColor="@color/primarytext" - android:text="@string/conference_address" /> - + android:textSize="?attr/TextSizeBody" /> + <AutoCompleteTextView android:id="@+id/jid" android:layout_width="fill_parent" android:layout_height="wrap_content" - android:inputType="textEmailAddress" android:hint="@string/conference_address_example" - android:textColorHint="@color/secondarytext" + android:inputType="textEmailAddress" android:textColor="@color/primarytext" - /> + android:textColorHint="@color/secondarytext" /> <CheckBox android:id="@+id/bookmark" - android:layout_marginTop="8dp" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="@string/save_as_bookmark" - android:checked="true" /> + android:layout_marginTop="8dp" + android:checked="true" + android:text="@string/save_as_bookmark" /> -</LinearLayout> +</LinearLayout>
\ No newline at end of file diff --git a/res/layout/manage_accounts.xml b/res/layout/manage_accounts.xml index 71eb7572..11ce35b2 100644 --- a/res/layout/manage_accounts.xml +++ b/res/layout/manage_accounts.xml @@ -3,14 +3,14 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="fill_parent" android:layout_height="fill_parent" - android:background="@color/primarybackground"> + android:background="@color/primarybackground" > <ListView android:id="@+id/account_list" android:layout_width="fill_parent" android:layout_height="wrap_content" android:divider="@color/divider" - android:dividerHeight="1dp"> + android:dividerHeight="1dp" > </ListView> </LinearLayout>
\ No newline at end of file diff --git a/res/layout/message_null.xml b/res/layout/message_null.xml index 4c7dd938..1e148585 100644 --- a/res/layout/message_null.xml +++ b/res/layout/message_null.xml @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" - android:layout_height="wrap_content"> + android:layout_height="wrap_content" > + </RelativeLayout>
\ No newline at end of file diff --git a/res/layout/message_status.xml b/res/layout/message_status.xml index 33487984..d5f8bb33 100644 --- a/res/layout/message_status.xml +++ b/res/layout/message_status.xml @@ -3,11 +3,11 @@ android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical" - android:paddingTop="6dp" android:paddingBottom="6dp" + android:paddingLeft="8dp" android:paddingRight="6dp" - android:paddingLeft="8dp"> - + android:paddingTop="6dp" > + <ImageView android:id="@+id/message_photo" android:layout_width="32dp" @@ -17,6 +17,6 @@ android:layout_marginRight="-1.5dp" android:padding="0dp" android:scaleType="fitXY" - android:src="@drawable/ic_profile"/> + android:src="@drawable/ic_profile" /> </RelativeLayout>
\ No newline at end of file diff --git a/res/layout/quickedit.xml b/res/layout/quickedit.xml index 07a7ac3b..20a2868a 100644 --- a/res/layout/quickedit.xml +++ b/res/layout/quickedit.xml @@ -3,16 +3,17 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" - android:padding="16dp"> + android:padding="16dp" > + <EditText android:id="@+id/editor" android:layout_width="match_parent" android:layout_height="wrap_content" android:ems="10" android:inputType="textPersonName" - android:textColor="@color/primarytext"> + android:textColor="@color/primarytext" > <requestFocus /> </EditText> - -</LinearLayout> + +</LinearLayout>
\ No newline at end of file diff --git a/res/menu/attachment_choices.xml b/res/menu/attachment_choices.xml index 6a4f295a..20932489 100644 --- a/res/menu/attachment_choices.xml +++ b/res/menu/attachment_choices.xml @@ -7,8 +7,9 @@ <item android:id="@+id/attach_take_picture" android:title="@string/attach_take_picture"/> - <item - android:id="@+id/attach_record_voice" - android:title="@string/attach_record_voice" - android:visible="false"/> + <item + android:id="@+id/attach_record_voice" + android:title="@string/attach_record_voice" + android:visible="false"/> + </menu>
\ No newline at end of file diff --git a/res/menu/choose_contact.xml b/res/menu/choose_contact.xml index 3f402664..e39091b3 100644 --- a/res/menu/choose_contact.xml +++ b/res/menu/choose_contact.xml @@ -7,4 +7,5 @@ android:icon="@drawable/ic_action_search" android:showAsAction="collapseActionView|always" android:title="@string/search"/> + </menu>
\ No newline at end of file diff --git a/res/menu/contact_details.xml b/res/menu/contact_details.xml index 43e8ea6a..02f2e813 100644 --- a/res/menu/contact_details.xml +++ b/res/menu/contact_details.xml @@ -1,27 +1,27 @@ <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android" > + <item android:id="@+id/action_edit_contact" + android:icon="@drawable/ic_action_edit" android:orderInCategory="10" android:showAsAction="always" - android:icon="@drawable/ic_action_edit" - android:title="@string/action_edit_contact" /> + android:title="@string/action_edit_contact"/> <item android:id="@+id/action_delete_contact" + android:icon="@drawable/ic_action_discard" android:orderInCategory="10" android:showAsAction="always" - android:icon="@drawable/ic_action_discard" - android:title="@string/action_delete_contact" /> + android:title="@string/action_delete_contact"/> <item android:id="@+id/action_accounts" android:orderInCategory="90" android:showAsAction="never" - android:title="@string/action_accounts" - /> - + android:title="@string/action_accounts"/> <item android:id="@+id/action_settings" android:orderInCategory="100" android:showAsAction="never" android:title="@string/action_settings"/> -</menu> + +</menu>
\ No newline at end of file diff --git a/res/menu/encryption_choices.xml b/res/menu/encryption_choices.xml index 0596bfbc..adf0ad8d 100644 --- a/res/menu/encryption_choices.xml +++ b/res/menu/encryption_choices.xml @@ -1,17 +1,16 @@ <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android" > - <group android:checkableBehavior="single"> - -<item - android:id="@+id/encryption_choice_none" - android:title="@string/encryption_choice_none" - /> -<item - android:id="@+id/encryption_choice_otr" - android:title="@string/encryption_choice_otr" - /> -<item - android:id="@+id/encryption_choice_pgp" - android:title="@string/encryption_choice_pgp"/> -</group> -</menu> + + <group android:checkableBehavior="single" > + <item + android:id="@+id/encryption_choice_none" + android:title="@string/encryption_choice_none"/> + <item + android:id="@+id/encryption_choice_otr" + android:title="@string/encryption_choice_otr"/> + <item + android:id="@+id/encryption_choice_pgp" + android:title="@string/encryption_choice_pgp"/> + </group> + +</menu>
\ No newline at end of file diff --git a/res/menu/manageaccounts.xml b/res/menu/manageaccounts.xml index 1d81ba3c..b5cd9b50 100644 --- a/res/menu/manageaccounts.xml +++ b/res/menu/manageaccounts.xml @@ -1,12 +1,15 @@ <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android" > - <item android:id="@+id/action_add_account" + + <item + android:id="@+id/action_add_account" + android:icon="@drawable/ic_action_add_person" android:showAsAction="always" - android:title="@string/action_add_account" - android:icon="@drawable/ic_action_add_person"/> - <item + android:title="@string/action_add_account"/> + <item android:id="@+id/action_settings" android:orderInCategory="100" android:showAsAction="never" android:title="@string/action_settings"/> -</menu> + +</menu>
\ No newline at end of file diff --git a/res/menu/muc_details.xml b/res/menu/muc_details.xml index 685109cd..97369098 100644 --- a/res/menu/muc_details.xml +++ b/res/menu/muc_details.xml @@ -1,21 +1,21 @@ <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android" > + <item android:id="@+id/action_edit_subject" + android:icon="@drawable/ic_action_edit" android:orderInCategory="10" android:showAsAction="always" - android:icon="@drawable/ic_action_edit" - android:title="@string/action_edit_subject" /> + android:title="@string/action_edit_subject"/> <item android:id="@+id/action_accounts" android:orderInCategory="90" android:showAsAction="never" - android:title="@string/action_accounts" - /> - + android:title="@string/action_accounts"/> <item android:id="@+id/action_settings" android:orderInCategory="100" android:showAsAction="never" android:title="@string/action_settings"/> -</menu> + +</menu>
\ No newline at end of file diff --git a/res/menu/start_conversation.xml b/res/menu/start_conversation.xml index 271bac18..f7230169 100644 --- a/res/menu/start_conversation.xml +++ b/res/menu/start_conversation.xml @@ -7,7 +7,6 @@ android:icon="@drawable/ic_action_search" android:showAsAction="collapseActionView|always" android:title="@string/search"/> - <item android:id="@+id/action_create_contact" android:icon="@drawable/ic_action_add_person" @@ -18,7 +17,6 @@ android:icon="@drawable/ic_action_add_group" android:showAsAction="always" android:title="@string/join_conference"/> - <item android:id="@+id/action_accounts" android:orderInCategory="90" diff --git a/res/values-ca/arrays.xml b/res/values-ca/arrays.xml index 47738ec3..ff1a0d4b 100644 --- a/res/values-ca/arrays.xml +++ b/res/values-ca/arrays.xml @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <resources> + <string-array name="resources"> <item>Mòbil</item> <item>Telèfon</item> @@ -19,4 +20,5 @@ <item>524288</item> <item>1048576</item> </string-array> -</resources> + +</resources>
\ No newline at end of file diff --git a/res/values-ca/strings.xml b/res/values-ca/strings.xml index b9b2c532..cfbe428b 100644 --- a/res/values-ca/strings.xml +++ b/res/values-ca/strings.xml @@ -60,11 +60,11 @@ <string name="encrypted_message_received"><i>Missatge xifrat rebut. Prem per desxifrar i veure-ho.</i></string> <string name="encrypted_image_received"><i>Imatge xifrada rebuda. Prem per desxifrar i veure-la.</i></string> <string name="image_file"><i>Imatge rebuda. Prem per veure</i></string> - <string name="pref_xmpp_resource">Recursos XMPP</string> + <string name="pref_xmpp_resource">Recursos XMPP</string> <string name="pref_xmpp_resource_summary">El nom que identifica aquest client amb</string> - <string name="pref_accept_files">Acceptar fitxers</string> - <string name="pref_accept_files_summary">Accepta fitxers automàticament amb una mida menor a…</string> - <string name="pref_notification_settings">Ajustos de notificacions</string> + <string name="pref_accept_files">Acceptar fitxers</string> + <string name="pref_accept_files_summary">Accepta fitxers automàticament amb una mida menor a…</string> + <string name="pref_notification_settings">Ajustos de notificacions</string> <string name="pref_notifications">Notificacions</string> <string name="pref_notifications_summary">Notifica quan arriba un nou missatge</string> <string name="pref_vibrate">Vibra</string> @@ -77,6 +77,7 @@ <string name="pref_notification_grace_period_summary">Desactiva les notificacions durant un breu termini després de rebre una còpia de missatges carbon</string> <string name="pref_advanced_options">Opcions avançades</string> <string name="pref_never_send_crash">Mai enviïs informes d\'errors</string> - <string name="pref_never_send_crash_summary">Enviant traces d\'execució ajudes al futur desenvolupament del Conversations.</string> - -</resources> + <string name="pref_never_send_crash_summary">Enviant traces d\'execució ajudes al futur desenvolupament del Conversations.</string> + <string name="pref_ui_options">Opcions de UI</string> + +</resources>
\ No newline at end of file diff --git a/res/values-de/arrays.xml b/res/values-de/arrays.xml index e095ed14..e468f478 100644 --- a/res/values-de/arrays.xml +++ b/res/values-de/arrays.xml @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <resources> + <string-array name="resources"> <item>Mobile</item> <item>Phone</item> @@ -19,4 +20,5 @@ <item>524288</item> <item>1048576</item> </string-array> -</resources> + +</resources>
\ No newline at end of file diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml index 4267f483..e653147d 100644 --- a/res/values-de/strings.xml +++ b/res/values-de/strings.xml @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <resources> + <string name="app_name">Conversations</string> <string name="action_settings">Einstellungen</string> <string name="action_add">Neue Unterhaltung</string> @@ -230,4 +231,6 @@ <string name="server_info_session_established">Aktuelle Sitzung wiederhergestellt</string> <string name="additional_information">Zusätzliche Informationen</string> <string name="skip">Überspringen</string> -</resources> + <string name="pref_ui_options">Benutzeroberfläche</string> + +</resources>
\ No newline at end of file diff --git a/res/values-es/arrays.xml b/res/values-es/arrays.xml index 48996a69..15231955 100644 --- a/res/values-es/arrays.xml +++ b/res/values-es/arrays.xml @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <resources> + <string-array name="resources"> <item>Móvil</item> <item>Teléfono</item> @@ -26,6 +27,7 @@ <item>8 horas</item> <item>Hasta nuevo aviso</item> </string-array> + <integer-array name="mute_options_durations"> <item>1800</item> <item>3600</item> @@ -33,4 +35,5 @@ <item>28800</item> <item>-1</item> </integer-array> -</resources> + +</resources>
\ No newline at end of file diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml index 53e45ed1..d6fbc7cb 100644 --- a/res/values-es/strings.xml +++ b/res/values-es/strings.xml @@ -254,4 +254,5 @@ <string name="pref_expert_options_summary">Por favor, cuidado con estas opciones</string> <string name="pref_use_larger_font">Incrementar tamaño de fuente</string> <string name="pref_use_larger_font_summary">Usar fuentes grandes en toda la aplicación</string> -</resources> + +</resources>
\ No newline at end of file diff --git a/res/values-eu/arrays.xml b/res/values-eu/arrays.xml index 21b20afb..eed87d35 100644 --- a/res/values-eu/arrays.xml +++ b/res/values-eu/arrays.xml @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <resources> + <string-array name="resources"> <item>Mugikorra</item> <item>Telefonoa</item> @@ -19,4 +20,5 @@ <item>524288</item> <item>1048576</item> </string-array> -</resources> + +</resources>
\ No newline at end of file diff --git a/res/values-eu/strings.xml b/res/values-eu/strings.xml index 8b5d9254..2ca26c3d 100644 --- a/res/values-eu/strings.xml +++ b/res/values-eu/strings.xml @@ -230,5 +230,6 @@ <string name="server_info_session_established">Uneko saioa ezarri da</string> <string name="additional_information">Informazio gehiago</string> <string name="skip">Orain ez</string> + <string name="pref_ui_options">Erabiltzaile-interfazearen aukerak</string> -</resources> +</resources>
\ No newline at end of file diff --git a/res/values-fr/arrays.xml b/res/values-fr/arrays.xml index 97842906..ae140796 100644 --- a/res/values-fr/arrays.xml +++ b/res/values-fr/arrays.xml @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <resources> + <string-array name="resources"> <item>Mobile</item> <item>Téléphone</item> @@ -19,4 +20,5 @@ <item>524288</item> <item>1048576</item> </string-array> -</resources> + +</resources>
\ No newline at end of file diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml index df9ab3f5..e15ef416 100644 --- a/res/values-fr/strings.xml +++ b/res/values-fr/strings.xml @@ -207,5 +207,6 @@ <string name="contact_added_you">Votre correspondant vous a ajouté dans sa liste de contacts</string> <string name="add_back">Ajouter également</string> <string name="contact_has_read_up_to_this_point">%s a lu les messages précédents.</string> + <string name="pref_ui_options">Options d\'affichage</string> -</resources> +</resources>
\ No newline at end of file diff --git a/res/values-gl/arrays.xml b/res/values-gl/arrays.xml index 95c99077..19424a78 100644 --- a/res/values-gl/arrays.xml +++ b/res/values-gl/arrays.xml @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <resources> + <string-array name="resources"> <item>Móvil</item> <item>Teléfono</item> @@ -19,4 +20,5 @@ <item>524288</item> <item>1048576</item> </string-array> -</resources> + +</resources>
\ No newline at end of file diff --git a/res/values-gl/strings.xml b/res/values-gl/strings.xml index ae488614..58116463 100644 --- a/res/values-gl/strings.xml +++ b/res/values-gl/strings.xml @@ -66,9 +66,9 @@ <string name="image_file"><i>Imaxe recibida. Pulsa para ver</i></string> <string name="pref_xmpp_resource">Recurso</string> <string name="pref_xmpp_resource_summary">O nome que identifica o cliente que estás a empregar</string> - <string name="pref_accept_files">Aceptar arquivos</string> + <string name="pref_accept_files">Aceptar arquivos</string> <string name="pref_accept_files_summary">De forma automática aceptar arquivos menores de…</string> - <string name="pref_notification_settings">Axustes de notificación</string> + <string name="pref_notification_settings">Axustes de notificación</string> <string name="pref_notifications">Notificacións</string> <string name="pref_notifications_summary">Notifica cuando chega unha nova mensaxe</string> <string name="pref_vibrate">Tremer</string> @@ -125,4 +125,6 @@ <string name="save">Gardar</string> <string name="passwords_do_not_match">As contrasinais non coinciden</string> <string name="invalid_jid">O identificador non é un identificador de Jabber válido</string> -</resources> + <string name="pref_ui_options">Opcións de interfaz</string> + +</resources>
\ No newline at end of file diff --git a/res/values-he/arrays.xml b/res/values-he/arrays.xml index 1895dee5..28768d6c 100644 --- a/res/values-he/arrays.xml +++ b/res/values-he/arrays.xml @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <resources> + <string-array name="resources"> <item>נייד</item> <item>טלפון</item> @@ -19,4 +20,5 @@ <item>524288</item> <item>1048576</item> </string-array> -</resources> + +</resources>
\ No newline at end of file diff --git a/res/values-he/strings.xml b/res/values-he/strings.xml index 65684cd7..fd8eaa0b 100644 --- a/res/values-he/strings.xml +++ b/res/values-he/strings.xml @@ -219,4 +219,6 @@ <string name="private_message">בפרטי</string> <string name="private_message_to">בפרטי אל %s</string> <string name="send_private_message_to">שלח הודעה פרטית אל %s</string> -</resources> + <string name="pref_ui_options">אפשרויות ממשק משתמש</string> + +</resources>
\ No newline at end of file diff --git a/res/values-nl/arrays.xml b/res/values-nl/arrays.xml index 1a464a5a..9ced79f4 100644 --- a/res/values-nl/arrays.xml +++ b/res/values-nl/arrays.xml @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <resources> + <string-array name="resources"> <item>Mobiel</item> <item>Telefoon</item> @@ -19,4 +20,5 @@ <item>524288</item> <item>1048576</item> </string-array> -</resources> + +</resources>
\ No newline at end of file diff --git a/res/values-nl/strings.xml b/res/values-nl/strings.xml index 97b67224..7b3faca9 100644 --- a/res/values-nl/strings.xml +++ b/res/values-nl/strings.xml @@ -153,7 +153,7 @@ <string name="confirm_password">Bevestig wachtwoord</string> <string name="passwords_do_not_match">Wachtwoorden komen niet overeen</string> <string name="invalid_jid">Dit is geen geldig Jabber ID</string> - <string name="error_out_of_memory">Geen geheugen beschikbaar. Afbeelding is te groot</string> + <string name="error_out_of_memory">Geen geheugen beschikbaar. Afbeelding is te groot</string> <string name="add_phone_book_text">Wilt U %s toevoegen aan de contactenlijst op uw telefoon?</string> <string name="contact_status_online">online</string> <string name="contact_status_free_to_chat">beschikbaar</string> @@ -178,7 +178,6 @@ <string name="unknown_otr_fingerprint">Onbekende OTR vingerafdruk</string> <string name="openpgp_messages_found">OpenPGP encrypted messages found</string> <string name="reception_failed">Ontvangen mislukt</string> - <string name="join_conference">Aan groepsconversatie deelnemen</string> <string name="invite_contact">Contact uitnodigen</string> <string name="your_fingerprint">Uw vingerafdruk</string> @@ -229,4 +228,6 @@ <string name="server_info_session_established">Huidige sessie opgezet</string> <string name="or_long_press_for_default">(Of houdt lang ingedrukt om de oorspronkelijke terug te zetten)</string> <string name="server_info_available">beschikbaar</string> -</resources> + <string name="pref_ui_options">UI Opties</string> + +</resources>
\ No newline at end of file diff --git a/res/values-ru/arrays.xml b/res/values-ru/arrays.xml index d73bdef5..d01d4eb9 100644 --- a/res/values-ru/arrays.xml +++ b/res/values-ru/arrays.xml @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <resources> + <string-array name="resources"> <item>Мобильный</item> <item>Телефон</item> @@ -19,4 +20,5 @@ <item>524288</item> <item>1048576</item> </string-array> -</resources> + +</resources>
\ No newline at end of file diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml index 5009097a..9f3992f2 100644 --- a/res/values-ru/strings.xml +++ b/res/values-ru/strings.xml @@ -229,5 +229,6 @@ <string name="save_as_bookmark">Сохранить закладку</string> <string name="delete_bookmark">Удалить закладку</string> <string name="bookmark_already_exists">Такая закладка уже существует</string> + <string name="pref_ui_options">Параметры интерфейса</string> -</resources> +</resources>
\ No newline at end of file diff --git a/res/values-sv/arrays.xml b/res/values-sv/arrays.xml index c7cc9f2d..890e2915 100644 --- a/res/values-sv/arrays.xml +++ b/res/values-sv/arrays.xml @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <resources> + <string-array name="resources"> <item>Mobile</item> <item>Phone</item> @@ -19,4 +20,5 @@ <item>524288</item> <item>1048576</item> </string-array> -</resources> + +</resources>
\ No newline at end of file diff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml index abd99dbc..a3ed9112 100644 --- a/res/values-sv/strings.xml +++ b/res/values-sv/strings.xml @@ -17,7 +17,6 @@ <string name="title_activity_settings">Inställningar</string> <string name="title_activity_conference_details">Konferensdetaljer</string> <string name="title_activity_contact_details">Kontaktdetaljer</string> - <string name="title_activity_conversations">Konversationer</string> <string name="title_activity_sharewith">Dela med konversation</string> <string name="title_activity_start_conversation">Starta konversation</string> <string name="title_activity_choose_contact">Välj kontakt</string> @@ -65,7 +64,6 @@ <string name="clear_histor_msg">Vill du ta bort alla meddelanden i denna konversation?\n\n<b>Varning:</b> Detta kommer inte påverka meddelanden lagrade på andra enheter eller servrar.</string> <string name="delete_messages">Ta bort meddelanden</string> <string name="also_end_conversation">Avsluta denna konversation efter</string> - <string name="choose_presence">Välj närvaro till kontakt</string> <string name="send_plain_text_message">Skicka meddelande i klartext</string> <string name="send_otr_message">Skicka OTR-krypterat meddelande</string> <string name="send_pgp_message">Skicka OpenPGP-krypterat meddelande</string> @@ -101,7 +99,6 @@ <string name="pref_conference_notifications">Konferensnotifieringar</string> <string name="pref_conference_notifications_summary">Notifiera alltid när nytt konferensmeddelande tagits emot istället för endast vid highlight</string> <string name="pref_notification_grace_period">Notifieringsfrist</string> - <string name="pref_notification_grace_period_summary">Deaktivera notifieringar en kort stund efter att en carbon copy tagits emot</string> <string name="pref_advanced_options">Avancerade inställningar</string> <string name="pref_never_send_crash">Skicka aldrig krasch-rapporter</string> <string name="pref_never_send_crash_summary">Genom att skicka in stack traces hjälper du utvecklarna av Conversations</string> @@ -128,7 +125,6 @@ <string name="error_io_exception">Generellt I/O-fel. Du kanske fick slut på plats?</string> <string name="error_security_exception_during_image_copy">Applikationen du använde för att välja bilden gav inte tillräckliga rättigheter för att läsa filen.\n\n<small>Använd en annan filhanterare för att välja bild</small></string> <string name="account_status_unknown">Okänd</string> - <string name="account_status_disabled">Tillfälligt deaktiverad</string> <string name="account_status_online">Online</string> <string name="account_status_connecting">Ansluter\u2026</string> <string name="account_status_offline">Offline</string> @@ -144,7 +140,6 @@ <string name="encryption_choice_pgp">OpenPGP</string> <string name="mgmt_account_edit">Ändra konto</string> <string name="mgmt_account_delete">Ta bort</string> - <string name="mgmt_account_disable">Deaktivera tillfälligt</string> <string name="mgmt_account_enable">Aktivera</string> <string name="mgmt_account_are_you_sure">Är du säker?</string> <string name="mgmt_account_delete_confirm_text">Om du tar bort kontot kommer all konversationshistorik att försvinna</string> @@ -208,7 +203,6 @@ <string name="add_back">Addera tillbaks</string> <string name="contact_has_read_up_to_this_point">%s har läst fram hit</string> <string name="next">Nästa</string> - <string name="publish_avatar_explanation">Notera: Alla som kan se dina närvarouppdateringar kommer se denna bild.</string> <string name="server_info_unavailable">otillgänglig</string> <string name="mgmt_account_publish_pgp">Publisera OpenPGP publik nyckel</string> <string name="additional_information">Ytterligare information</string> @@ -231,5 +225,36 @@ <string name="pref_general">Generellt</string> <string name="publish">Publicera</string> <string name="private_message">privat meddelande</string> + <string name="pref_ui_options">UI inställningar</string> + <string name="enable">Aktivera</string> + <string name="without_mutual_presence_updates"><b>Varning:</b> Skicka detta utan gemensamma tillgänglighetsuppdateringar kan ge oväntade problem.\n\n<small>Gå till kontaktdetaljer för att verifiera dina tillgänglighetsuppdateringar.</small></string> + <string name="disable_notifications">Inaktivera notifieringar</string> + <string name="request_presence_updates">Begär tillgänglighetsuppdateringar från din kontakt först.\n\n<small>Detta används för att se vilken klient/klienter din kontakt använder.</small></string> + <string name="conference_requires_password">Konferensen kräver lösenord</string> + <string name="pref_dont_save_encrypted">Spara in krypterade meddelanden</string> + <string name="pref_encryption_settings">Krypteringsinställningar</string> + <string name="pref_use_send_button_to_indicate_status_summary">Färglägg skickaknappen för att indikera kontaktens status</string> + <string name="missing_presence_updates">Saknar tillgänglighetsuppdateringar från kontakt</string> + <string name="pref_expert_options">Expertinställningar</string> + <string name="pref_force_encryption_summary">Sänd alltid krypterade meddelanden (utom för konferenser)</string> + <string name="pref_expert_options_summary">Var försiktig med dem</string> + <string name="disable_notifications_for_this_conversation">Inaktivera notifieringar för denna konversation</string> + <string name="pref_use_send_button_to_indicate_status">Skickaknappen indikerar status</string> + <string name="enter_password">Fyll i lösenord</string> + <string name="notifications_disabled">Notifieringar är inaktiverade</string> + <string name="pref_force_encryption">Tvinga kryptering</string> + <string name="sure_delete_fingerprint">Är du säker på att du vill ta bort detta fingeravtryck?</string> + <string name="ignore">Ignorera</string> + <string name="pref_use_larger_font_summary">Använd större teckenstorlek för hela applikationen</string> + <string name="pref_use_larger_font">Öka teckenstorlek</string> + <string name="pref_dont_save_encrypted_summary">Varning: Detta kan leda till att meddelanden förloras</string> + <string name="delete_fingerprint">Ta bort fingeravtryck</string> + <string name="request_now">Begär nu</string> + <string name="title_activity_conversations">Conversations</string> + <string name="publish_avatar_explanation">Notera: Alla som kan se dina tillgänglighetsuppdateringar kommer se denna bild.</string> + <string name="choose_presence">Välj tillgänglighet till kontakt</string> + <string name="pref_notification_grace_period_summary">Inaktivera notifieringar en kort stund efter att en carbon copy tagits emot</string> + <string name="account_status_disabled">Tillfälligt inaktiverad</string> + <string name="mgmt_account_disable">Inaktivera tillfälligt</string> -</resources> +</resources>
\ No newline at end of file diff --git a/res/values/arrays.xml b/res/values/arrays.xml index 1d2a5ac9..1a4fd25d 100644 --- a/res/values/arrays.xml +++ b/res/values/arrays.xml @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <resources> + <string-array name="resources"> <item>Mobile</item> <item>Phone</item> @@ -26,6 +27,7 @@ <item>8 hours</item> <item>until further notice</item> </string-array> + <integer-array name="mute_options_durations"> <item>1800</item> <item>3600</item> @@ -33,4 +35,5 @@ <item>28800</item> <item>-1</item> </integer-array> -</resources> + +</resources>
\ No newline at end of file diff --git a/res/values/attrs.xml b/res/values/attrs.xml index 793b5604..2354a5e8 100644 --- a/res/values/attrs.xml +++ b/res/values/attrs.xml @@ -1,6 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <resources> - <attr name="TextSizeInfo" format="dimension"/> - <attr name="TextSizeBody" format="dimension"/> - <attr name="TextSizeHeadline" format="dimension"/> -</resources> + + <attr name="TextSizeInfo" format="dimension" /> + <attr name="TextSizeBody" format="dimension" /> + <attr name="TextSizeHeadline" format="dimension" /> + +</resources>
\ No newline at end of file diff --git a/res/values/colors.xml b/res/values/colors.xml index ed0a0ffb..908b8b89 100644 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <resources> + <color name="primary" type="color">#ff259b24</color> <color name="primarydark" type="color">#ff0a7e07</color> <color name="primarytext" type="color">#de000000</color> @@ -9,5 +10,8 @@ <color name="secondarybackground" type="color">#ffeeeeee</color> <color name="darkbackground" type="color">#ff323232</color> <color name="divider">#1f000000</color> - <color name="warningtext">#ffe51c23</color> + <color name="red">#ffe51c23</color> + <color name="orange">#ffff9800</color> + <color name="green">#ff259b24</color> + </resources>
\ No newline at end of file diff --git a/res/values/strings.xml b/res/values/strings.xml index 75ddbbc4..75eb3b4d 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -250,8 +250,11 @@ <string name="pref_force_encryption_summary">Always send messages encrypted (execpt for conferences)</string> <string name="pref_dont_save_encrypted">Don’t save encrypted messages</string> <string name="pref_dont_save_encrypted_summary">Warning: This could lead to message loss</string> - <string name="pref_expert_options">Expert options</string> - <string name="pref_expert_options_summary">Please be very careful with those</string> - <string name="pref_use_larger_font">Increase font size</string> - <string name="pref_use_larger_font_summary">Use larger font sizes across the entire app</string> + <string name="pref_expert_options">Expert options</string> + <string name="pref_expert_options_summary">Please be very careful with those</string> + <string name="pref_use_larger_font">Increase font size</string> + <string name="pref_use_larger_font_summary">Use larger font sizes across the entire app</string> + <string name="pref_use_send_button_to_indicate_status">Send button indicates status</string> + <string name="pref_use_send_button_to_indicate_status_summary">Colorize send button to indicate a contacs status</string> + </resources>
\ No newline at end of file diff --git a/res/values/themes.xml b/res/values/themes.xml index e2d4dcbe..fa7973d2 100644 --- a/res/values/themes.xml +++ b/res/values/themes.xml @@ -9,7 +9,7 @@ <item name="TextSizeBody">14sp</item> <item name="TextSizeHeadline">20sp</item> </style> - + <style name="ConversationsTheme.LargerText" parent="ConversationsTheme"> <item name="TextSizeInfo">14sp</item> <item name="TextSizeBody">16sp</item> @@ -27,9 +27,9 @@ <item name="android:popupMenuStyle">@android:style/Widget.Holo.Light.PopupMenu</item> <item name="android:dropDownListViewStyle">@android:style/Widget.Holo.Light.ListView.DropDown</item> </style> - + <style name="ConversationsActionBarTabs" parent="@android:style/Widget.Holo.ActionBar.TabView"> - <item name="android:background">@drawable/actionbar_tab_indicator</item> + <item name="android:background">@drawable/actionbar_tab_indicator</item> </style> </resources>
\ No newline at end of file diff --git a/res/xml/preferences.xml b/res/xml/preferences.xml index f0d64e39..7d0886bc 100644 --- a/res/xml/preferences.xml +++ b/res/xml/preferences.xml @@ -62,13 +62,17 @@ android:summary="@string/pref_notification_grace_period_summary" android:title="@string/pref_notification_grace_period" /> </PreferenceCategory> - <PreferenceCategory - android:title="@string/pref_ui_options"> - <CheckBoxPreference + <PreferenceCategory android:title="@string/pref_ui_options" > + <CheckBoxPreference android:defaultValue="false" android:key="use_larger_font" - android:title="@string/pref_use_larger_font" - android:summary="@string/pref_use_larger_font_summary"/> + android:summary="@string/pref_use_larger_font_summary" + android:title="@string/pref_use_larger_font" /> + <CheckBoxPreference + android:defaultValue="false" + android:key="send_button_status" + android:summary="@string/pref_use_send_button_to_indicate_status_summary" + android:title="@string/pref_use_send_button_to_indicate_status" /> </PreferenceCategory> <PreferenceCategory android:title="@string/pref_advanced_options" > <PreferenceScreen diff --git a/src/eu/siacs/conversations/parser/MessageParser.java b/src/eu/siacs/conversations/parser/MessageParser.java index bd136a33..534c9dea 100644 --- a/src/eu/siacs/conversations/parser/MessageParser.java +++ b/src/eu/siacs/conversations/parser/MessageParser.java @@ -202,7 +202,7 @@ public class MessageParser extends AbstractParser implements if ((message == null) || (!message.hasChild("body"))) { if (status == Message.STATUS_RECEIVED && message.getAttribute("from") != null) { - parseNormal(message, account); + parseNonMessage(message, account); } return null; } @@ -256,13 +256,12 @@ public class MessageParser extends AbstractParser implements packet.getId(), Message.STATUS_SEND_FAILED); } - private void parseNormal(Element packet, Account account) { + private void parseNonMessage(Element packet, Account account) { if (packet.hasChild("event", "http://jabber.org/protocol/pubsub#event")) { Element event = packet.findChild("event", "http://jabber.org/protocol/pubsub#event"); parseEvent(event, packet.getAttribute("from"), account); - } - if (packet.hasChild("displayed", "urn:xmpp:chat-markers:0")) { + } else if (packet.hasChild("displayed", "urn:xmpp:chat-markers:0")) { String id = packet .findChild("displayed", "urn:xmpp:chat-markers:0") .getAttribute("id"); @@ -294,7 +293,6 @@ public class MessageParser extends AbstractParser implements mXmppConnectionService.updateConversationUi(); } } - } else if (packet.hasChild("x", "jabber:x:conference")) { Element x = packet.findChild("x", "jabber:x:conference"); String jid = x.getAttribute("jid"); @@ -382,7 +380,7 @@ public class MessageParser extends AbstractParser implements this.parseNick(packet, account); - if ((packet.getType() == MessagePacket.TYPE_CHAT)) { + if ((packet.getType() == MessagePacket.TYPE_CHAT || packet.getType() == MessagePacket.TYPE_NORMAL)) { if ((packet.getBody() != null) && (packet.getBody().startsWith("?OTR"))) { message = this.parseOtrChat(packet, account); @@ -407,9 +405,8 @@ public class MessageParser extends AbstractParser implements } } } else { - parseNormal(packet, account); + parseNonMessage(packet, account); } - } else if (packet.getType() == MessagePacket.TYPE_GROUPCHAT) { message = this.parseGroupchat(packet, account); if (message != null) { @@ -424,9 +421,6 @@ public class MessageParser extends AbstractParser implements } else if (packet.getType() == MessagePacket.TYPE_ERROR) { this.parseError(packet, account); return; - } else if (packet.getType() == MessagePacket.TYPE_NORMAL) { - this.parseNormal(packet, account); - return; } else if (packet.getType() == MessagePacket.TYPE_HEADLINE) { this.parseHeadline(packet, account); return; diff --git a/src/eu/siacs/conversations/services/XmppConnectionService.java b/src/eu/siacs/conversations/services/XmppConnectionService.java index f272486c..c019682e 100644 --- a/src/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/eu/siacs/conversations/services/XmppConnectionService.java @@ -109,6 +109,7 @@ public class XmppConnectionService extends Service { private OnAccountUpdate mOnAccountUpdate = null; private int accountChangedListenerCount = 0; private OnRosterUpdate mOnRosterUpdate = null; + private int rosterChangedListenerCount = 0; public OnContactStatusChanged onContactStatusChanged = new OnContactStatusChanged() { @Override @@ -997,12 +998,16 @@ public class XmppConnectionService extends Service { switchToForeground(); } this.mOnRosterUpdate = listener; + this.rosterChangedListenerCount++; } public void removeOnRosterUpdateListener() { - this.mOnRosterUpdate = null; - if (checkListeners()) { - switchToBackground(); + this.rosterChangedListenerCount--; + if (this.rosterChangedListenerCount == 0) { + this.mOnRosterUpdate = null; + if (checkListeners()) { + switchToBackground(); + } } } diff --git a/src/eu/siacs/conversations/ui/ContactDetailsActivity.java b/src/eu/siacs/conversations/ui/ContactDetailsActivity.java index 8de2ce80..9d384c60 100644 --- a/src/eu/siacs/conversations/ui/ContactDetailsActivity.java +++ b/src/eu/siacs/conversations/ui/ContactDetailsActivity.java @@ -278,31 +278,31 @@ public class ContactDetailsActivity extends XmppActivity { switch (contact.getMostAvailableStatus()) { case Presences.CHAT: status.setText(R.string.contact_status_free_to_chat); - status.setTextColor(0xFF83b600); + status.setTextColor(mColorGreen); break; case Presences.ONLINE: status.setText(R.string.contact_status_online); - status.setTextColor(0xFF83b600); + status.setTextColor(mColorGreen); break; case Presences.AWAY: status.setText(R.string.contact_status_away); - status.setTextColor(0xFFffa713); + status.setTextColor(mColorOrange); break; case Presences.XA: status.setText(R.string.contact_status_extended_away); - status.setTextColor(0xFFffa713); + status.setTextColor(mColorOrange); break; case Presences.DND: status.setText(R.string.contact_status_do_not_disturb); - status.setTextColor(0xFFe92727); + status.setTextColor(mColorRed); break; case Presences.OFFLINE: status.setText(R.string.contact_status_offline); - status.setTextColor(0xFFe92727); + status.setTextColor(mSecondaryTextColor); break; default: status.setText(R.string.contact_status_offline); - status.setTextColor(0xFFe92727); + status.setTextColor(mSecondaryTextColor); break; } if (contact.getPresences().size() > 1) { diff --git a/src/eu/siacs/conversations/ui/ConversationActivity.java b/src/eu/siacs/conversations/ui/ConversationActivity.java index 5eedda1c..40ad0f33 100644 --- a/src/eu/siacs/conversations/ui/ConversationActivity.java +++ b/src/eu/siacs/conversations/ui/ConversationActivity.java @@ -7,7 +7,9 @@ import eu.siacs.conversations.R; import eu.siacs.conversations.entities.Contact; import eu.siacs.conversations.entities.Conversation; import eu.siacs.conversations.entities.Message; +import eu.siacs.conversations.services.XmppConnectionService.OnAccountUpdate; import eu.siacs.conversations.services.XmppConnectionService.OnConversationUpdate; +import eu.siacs.conversations.services.XmppConnectionService.OnRosterUpdate; import eu.siacs.conversations.ui.adapter.ConversationAdapter; import eu.siacs.conversations.utils.ExceptionHelper; import eu.siacs.conversations.utils.UIHelper; @@ -39,7 +41,8 @@ import android.widget.PopupMenu; import android.widget.PopupMenu.OnMenuItemClickListener; import android.widget.Toast; -public class ConversationActivity extends XmppActivity { +public class ConversationActivity extends XmppActivity implements + OnAccountUpdate, OnConversationUpdate, OnRosterUpdate { public static final String VIEW_CONVERSATION = "viewConversation"; public static final String CONVERSATION = "conversationUuid"; @@ -67,34 +70,6 @@ public class ConversationActivity extends XmppActivity { private boolean paneShouldBeOpen = true; private ArrayAdapter<Conversation> listAdapter; - private OnConversationUpdate onConvChanged = new OnConversationUpdate() { - - @Override - public void onConversationUpdate() { - runOnUiThread(new Runnable() { - - @Override - public void run() { - updateConversationList(); - if (paneShouldBeOpen) { - if (conversationList.size() >= 1) { - swapConversationFragment(); - } else { - startActivity(new Intent(getApplicationContext(), - StartConversationActivity.class)); - finish(); - } - } - ConversationFragment selectedFragment = (ConversationFragment) getFragmentManager() - .findFragmentByTag("conversation"); - if (selectedFragment != null) { - selectedFragment.updateMessages(); - } - } - }); - } - }; - protected ConversationActivity activity = this; private Toast prepareImageToast; @@ -602,7 +577,7 @@ public class ConversationActivity extends XmppActivity { this.onBackendConnected(); } if (conversationList.size() >= 1) { - onConvChanged.onConversationUpdate(); + this.onConversationUpdate(); } } @@ -610,6 +585,8 @@ public class ConversationActivity extends XmppActivity { protected void onStop() { if (xmppConnectionServiceBound) { xmppConnectionService.removeOnConversationListChangedListener(); + xmppConnectionService.removeOnAccountListChangedListener(); + xmppConnectionService.removeOnRosterUpdateListener(); } super.onStop(); } @@ -672,8 +649,9 @@ public class ConversationActivity extends XmppActivity { public void registerListener() { if (xmppConnectionServiceBound) { - xmppConnectionService - .setOnConversationListChangedListener(this.onConvChanged); + xmppConnectionService.setOnConversationListChangedListener(this); + xmppConnectionService.setOnAccountListChangedListener(this); + xmppConnectionService.setOnRosterUpdateListener(this); } } @@ -806,7 +784,65 @@ public class ConversationActivity extends XmppActivity { } public boolean forceEncryption() { - return PreferenceManager.getDefaultSharedPreferences( - getApplicationContext()).getBoolean("force_encryption", false); + return getPreferences().getBoolean("force_encryption", false); + } + + public boolean useSendButtonToIndicateStatus() { + return getPreferences().getBoolean("send_button_status", false); + } + + @Override + public void onAccountUpdate() { + final ConversationFragment fragment = (ConversationFragment) getFragmentManager() + .findFragmentByTag("conversation"); + if (fragment != null) { + runOnUiThread(new Runnable() { + + @Override + public void run() { + fragment.updateMessages(); + } + }); + } + } + + @Override + public void onConversationUpdate() { + runOnUiThread(new Runnable() { + + @Override + public void run() { + updateConversationList(); + if (paneShouldBeOpen) { + if (conversationList.size() >= 1) { + swapConversationFragment(); + } else { + startActivity(new Intent(getApplicationContext(), + StartConversationActivity.class)); + finish(); + } + } + ConversationFragment selectedFragment = (ConversationFragment) getFragmentManager() + .findFragmentByTag("conversation"); + if (selectedFragment != null) { + selectedFragment.updateMessages(); + } + } + }); + } + + @Override + public void onRosterUpdate() { + final ConversationFragment fragment = (ConversationFragment) getFragmentManager() + .findFragmentByTag("conversation"); + if (fragment != null) { + runOnUiThread(new Runnable() { + + @Override + public void run() { + fragment.updateMessages(); + } + }); + } } } diff --git a/src/eu/siacs/conversations/ui/ConversationFragment.java b/src/eu/siacs/conversations/ui/ConversationFragment.java index b73bcadb..e09958cb 100644 --- a/src/eu/siacs/conversations/ui/ConversationFragment.java +++ b/src/eu/siacs/conversations/ui/ConversationFragment.java @@ -12,6 +12,7 @@ import eu.siacs.conversations.entities.Contact; import eu.siacs.conversations.entities.Conversation; import eu.siacs.conversations.entities.Message; import eu.siacs.conversations.entities.MucOptions; +import eu.siacs.conversations.entities.Presences; import eu.siacs.conversations.services.XmppConnectionService; import eu.siacs.conversations.ui.EditMessage.OnEnterPressed; import eu.siacs.conversations.ui.XmppActivity.OnPresenceSelected; @@ -61,6 +62,7 @@ public class ConversationFragment extends Fragment { protected String queuedPqpMessage = null; private EditMessage mEditMessage; + private ImageButton mSendButton; private String pastedText = null; private RelativeLayout snackbar; private TextView snackbarMessage; @@ -255,9 +257,8 @@ public class ConversationFragment extends Fragment { } }); - ImageButton sendButton = (ImageButton) view - .findViewById(R.id.textSendButton); - sendButton.setOnClickListener(this.mSendButtonListener); + mSendButton = (ImageButton) view.findViewById(R.id.textSendButton); + mSendButton.setOnClickListener(this.mSendButtonListener); snackbar = (RelativeLayout) view.findViewById(R.id.snackbar); snackbarMessage = (TextView) view.findViewById(R.id.snackbar_message); @@ -485,6 +486,7 @@ public class ConversationFragment extends Fragment { activity.getConversationList(), null, false); activity.updateConversationList(); } + this.updateSendButton(); } } @@ -497,6 +499,55 @@ public class ConversationFragment extends Fragment { updateChatMsgHint(); } + public void updateSendButton() { + Conversation c = this.conversation; + if (activity.useSendButtonToIndicateStatus() && c != null + && c.getAccount().getStatus() == Account.STATUS_ONLINE) { + if (c.getMode() == Conversation.MODE_SINGLE) { + switch (c.getContact().getMostAvailableStatus()) { + case Presences.CHAT: + this.mSendButton + .setImageResource(R.drawable.ic_action_send_now_online); + break; + case Presences.ONLINE: + this.mSendButton + .setImageResource(R.drawable.ic_action_send_now_online); + break; + case Presences.AWAY: + this.mSendButton + .setImageResource(R.drawable.ic_action_send_now_away); + break; + case Presences.XA: + this.mSendButton + .setImageResource(R.drawable.ic_action_send_now_away); + break; + case Presences.DND: + this.mSendButton + .setImageResource(R.drawable.ic_action_send_now_dnd); + break; + default: + this.mSendButton + .setImageResource(R.drawable.ic_action_send_now_offline); + break; + } + } else if (c.getMode() == Conversation.MODE_MULTI) { + if (c.getMucOptions().online()) { + this.mSendButton + .setImageResource(R.drawable.ic_action_send_now_online); + } else { + this.mSendButton + .setImageResource(R.drawable.ic_action_send_now_offline); + } + } else { + this.mSendButton + .setImageResource(R.drawable.ic_action_send_now_offline); + } + } else { + this.mSendButton + .setImageResource(R.drawable.ic_action_send_now_offline); + } + } + protected void updateStatusMessages() { if (conversation.getMode() == Conversation.MODE_SINGLE) { for (int i = this.messageList.size() - 1; i >= 0; --i) { diff --git a/src/eu/siacs/conversations/ui/XmppActivity.java b/src/eu/siacs/conversations/ui/XmppActivity.java index f13c112a..4ee51580 100644 --- a/src/eu/siacs/conversations/ui/XmppActivity.java +++ b/src/eu/siacs/conversations/ui/XmppActivity.java @@ -2,6 +2,7 @@ package eu.siacs.conversations.ui; import java.io.FileNotFoundException; import java.lang.ref.WeakReference; +import java.util.List; import java.util.concurrent.RejectedExecutionException; import eu.siacs.conversations.Config; @@ -24,6 +25,8 @@ import android.content.DialogInterface; import android.content.SharedPreferences; import android.content.DialogInterface.OnClickListener; import android.content.IntentSender.SendIntentException; +import android.content.pm.PackageManager; +import android.content.pm.ResolveInfo; import android.content.res.Resources; import android.content.Intent; import android.content.ServiceConnection; @@ -55,7 +58,9 @@ public abstract class XmppActivity extends Activity { protected int mPrimaryTextColor; protected int mSecondaryTextColor; - protected int mWarningTextColor; + protected int mColorRed; + protected int mColorOrange; + protected int mColorGreen; protected int mPrimaryColor; private DisplayMetrics metrics; @@ -151,8 +156,20 @@ public abstract class XmppActivity extends Activity { public void onClick(DialogInterface dialog, int which) { Uri uri = Uri .parse("market://details?id=org.sufficientlysecure.keychain"); - Intent intent = new Intent(Intent.ACTION_VIEW, uri); - startActivity(intent); + Intent marketIntent = new Intent(Intent.ACTION_VIEW, + uri); + PackageManager manager = getApplicationContext() + .getPackageManager(); + List<ResolveInfo> infos = manager + .queryIntentActivities(marketIntent, 0); + if (infos.size() > 0) { + startActivity(marketIntent); + } else { + uri = Uri.parse("http://www.openkeychain.org/"); + Intent browserIntent = new Intent( + Intent.ACTION_VIEW, uri); + startActivity(browserIntent); + } finish(); } }); @@ -183,7 +200,9 @@ public abstract class XmppActivity extends Activity { ExceptionHelper.init(getApplicationContext()); mPrimaryTextColor = getResources().getColor(R.color.primarytext); mSecondaryTextColor = getResources().getColor(R.color.secondarytext); - mWarningTextColor = getResources().getColor(R.color.warningtext); + mColorRed = getResources().getColor(R.color.red); + mColorOrange = getResources().getColor(R.color.orange); + mColorGreen = getResources().getColor(R.color.green); mPrimaryColor = getResources().getColor(R.color.primary); if (getPreferences().getBoolean("use_larger_font", false)) { setTheme(R.style.ConversationsTheme_LargerText); @@ -475,7 +494,7 @@ public abstract class XmppActivity extends Activity { } public int getWarningTextColor() { - return this.mWarningTextColor; + return this.mColorRed; } public int getPrimaryColor() { diff --git a/src/eu/siacs/conversations/ui/adapter/MessageAdapter.java b/src/eu/siacs/conversations/ui/adapter/MessageAdapter.java index 967042d8..db01eabe 100644 --- a/src/eu/siacs/conversations/ui/adapter/MessageAdapter.java +++ b/src/eu/siacs/conversations/ui/adapter/MessageAdapter.java @@ -145,7 +145,7 @@ public class MessageAdapter extends ArrayAdapter<Message> { break; } if (error) { - viewHolder.time.setTextColor(0xFFe92727); + viewHolder.time.setTextColor(activity.getWarningTextColor()); } else { viewHolder.time.setTextColor(activity.getSecondaryTextColor()); } @@ -191,7 +191,7 @@ public class MessageAdapter extends ArrayAdapter<Message> { viewHolder.image.setVisibility(View.GONE); viewHolder.messageBody.setVisibility(View.VISIBLE); viewHolder.messageBody.setText(getContext().getString(r)); - viewHolder.messageBody.setTextColor(0xff33B5E5); + viewHolder.messageBody.setTextColor(activity.getSecondaryTextColor()); viewHolder.messageBody.setTypeface(null, Typeface.ITALIC); viewHolder.messageBody.setTextIsSelectable(false); } @@ -204,7 +204,7 @@ public class MessageAdapter extends ArrayAdapter<Message> { viewHolder.messageBody.setVisibility(View.VISIBLE); viewHolder.messageBody.setText(getContext().getString( R.string.decryption_failed)); - viewHolder.messageBody.setTextColor(0xFFe92727); + viewHolder.messageBody.setTextColor(activity.getWarningTextColor()); viewHolder.messageBody.setTypeface(null, Typeface.NORMAL); viewHolder.messageBody.setTextIsSelectable(false); } diff --git a/src/eu/siacs/conversations/xmpp/stanzas/MessagePacket.java b/src/eu/siacs/conversations/xmpp/stanzas/MessagePacket.java index 386d9dc8..4e7b532b 100644 --- a/src/eu/siacs/conversations/xmpp/stanzas/MessagePacket.java +++ b/src/eu/siacs/conversations/xmpp/stanzas/MessagePacket.java @@ -4,7 +4,6 @@ import eu.siacs.conversations.xml.Element; public class MessagePacket extends AbstractStanza { public static final int TYPE_CHAT = 0; - public static final int TYPE_UNKNOWN = 1; public static final int TYPE_NORMAL = 2; public static final int TYPE_GROUPCHAT = 3; public static final int TYPE_ERROR = 4; @@ -38,8 +37,6 @@ public class MessagePacket extends AbstractStanza { case TYPE_GROUPCHAT: this.setAttribute("type", "groupchat"); break; - case TYPE_UNKNOWN: - break; case TYPE_NORMAL: break; default: @@ -63,7 +60,7 @@ public class MessagePacket extends AbstractStanza { } else if (type.equals("headline")) { return TYPE_HEADLINE; } else { - return TYPE_UNKNOWN; + return TYPE_NORMAL; } } } |