diff options
author | Christian S <christian@pix-art.de> | 2015-09-26 21:47:55 +0200 |
---|---|---|
committer | Christian S <christian@pix-art.de> | 2015-09-26 21:47:55 +0200 |
commit | a2f93d019aa50725a8fdb4a6186b8f5cdd4f20ba (patch) | |
tree | 1984b082e25669dc2e4a74d544cff90167aa8c8d | |
parent | cbb5db25234b83337544063adb4e76b3ba3f9674 (diff) |
added blue tick as read indicator
-rw-r--r-- | art/ic_read_indicator.svg | 61 | ||||
-rw-r--r-- | art/ic_received_indicator.svg | 80 | ||||
-rwxr-xr-x | art/render.rb | 1 | ||||
-rw-r--r-- | src/main/java/eu/siacs/conversations/ui/ConversationFragment.java | 6 | ||||
-rw-r--r-- | src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java | 5 | ||||
-rw-r--r-- | src/main/res/drawable-hdpi/ic_read_indicator.png | bin | 0 -> 490 bytes | |||
-rw-r--r-- | src/main/res/drawable-mdpi/ic_read_indicator.png | bin | 0 -> 373 bytes | |||
-rw-r--r-- | src/main/res/drawable-xhdpi/ic_read_indicator.png | bin | 0 -> 598 bytes | |||
-rw-r--r-- | src/main/res/drawable-xxhdpi/ic_read_indicator.png | bin | 0 -> 826 bytes | |||
-rw-r--r-- | src/main/res/drawable-xxxhdpi/ic_read_indicator.png | bin | 0 -> 1029 bytes | |||
-rw-r--r-- | src/main/res/layout/message_sent.xml | 9 |
11 files changed, 83 insertions, 79 deletions
diff --git a/art/ic_read_indicator.svg b/art/ic_read_indicator.svg new file mode 100644 index 000000000..702e97d25 --- /dev/null +++ b/art/ic_read_indicator.svg @@ -0,0 +1,61 @@ +<?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" + version="1.1" + width="586.62292" + height="576.55585" + id="svg2" + inkscape:version="0.48.1 r9760" + sodipodi:docname="Check-71-128-204-brightblue.svg"> + <sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="640" + inkscape:window-height="480" + id="namedview6" + showgrid="false" + fit-margin-top="0" + fit-margin-left="0" + fit-margin-right="0" + fit-margin-bottom="0" + inkscape:zoom="0.26226712" + inkscape:cx="365.3587" + inkscape:cy="62.096819" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="svg2" /> + <metadata + id="metadata10"> + <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 /> + </cc:Work> + </rdf:RDF> + </metadata> + <defs + id="defs8" /> + <path + d="m 1,392.89211 c 0,0 115.16535,129.68765 138.19842,182.66371 l 99.0422,0 C 279.70015,448.87393 440.93164,146.43825 579.13006,40.486115 607.76328,3.6719748 535.83226,-11.524105 477.78456,12.846425 390.29814,49.576415 225.29631,330.01448 194.47779,397.49872 150.71496,409.01526 104.64881,323.7929 104.64881,323.7929 L 1,392.89211 z" + id="path4" + style="fill:#4780cc;fill-opacity:1;stroke:#000000;stroke-width:2" + inkscape:connector-curvature="0" /> +</svg> diff --git a/art/ic_received_indicator.svg b/art/ic_received_indicator.svg index 43689c267..a12292f51 100644 --- a/art/ic_received_indicator.svg +++ b/art/ic_received_indicator.svg @@ -1,76 +1,4 @@ -<?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" - version="1.0" - width="95" - height="95" - id="Yes_check" - inkscape:version="0.91 r13725" - sodipodi:docname="ic_received_indicator.svg"> - <metadata - id="metadata10"> - <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 /> - </cc:Work> - </rdf:RDF> - </metadata> - <sodipodi:namedview - pagecolor="#ffffff" - bordercolor="#666666" - borderopacity="1" - objecttolerance="10" - gridtolerance="10" - guidetolerance="10" - inkscape:pageopacity="0" - inkscape:pageshadow="2" - inkscape:window-width="956" - inkscape:window-height="1156" - id="namedview8" - showgrid="false" - showguides="true" - inkscape:guide-bbox="true" - inkscape:zoom="5.04" - inkscape:cx="-4.3215257" - inkscape:cy="37.489149" - inkscape:window-x="2880" - inkscape:window-y="20" - inkscape:window-maximized="0" - inkscape:current-layer="Yes_check" - fit-margin-top="0" - fit-margin-left="0" - fit-margin-right="0" - fit-margin-bottom="0" /> - <defs - id="defs1373"> - <linearGradient - id="linearGradient2250"> - <stop - style="stop-color:#008700;stop-opacity:1" - offset="0" - id="stop2252" /> - <stop - style="stop-color:#006f00;stop-opacity:1" - offset="1" - id="stop2254" /> - </linearGradient> - </defs> - <path - d="m 2.3894499,61.412131 c 0,0 16.7473651,20.271938 22.3528491,26.154483 3.648598,3.026816 12.878061,3.83429 14.880462,0 1.64903,-2.636163 2.380404,-5.8348 2.991819,-7.931771 C 49.920898,54.575958 72.297563,22.337321 92.321082,10.50894 96.814837,5.2377522 86.327596,3.5063483 77.217442,6.9958109 63.487006,12.254946 34.107717,59.529917 29.270873,69.192545 22.40265,70.841418 12.518762,52.447046 12.518762,52.447046 7.3805037,52.552428 1.8841059,52.071763 2.3894499,61.412131 z" - style="fill:#259b24;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.29981154;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" - id="check" - inkscape:connector-curvature="0" - sodipodi:nodetypes="cccscsccc" /> -</svg> +<?xml version="1.0" encoding="UTF-8"?> +<svg xmlns="http://www.w3.org/2000/svg" width="600" height="600"> +<path d="m7.7,404.6c0,0 115.2,129.7 138.2,182.68l99,0c41.5-126.7 202.7-429.1 340.92-535.1c28.6-36.8-43.3-52-101.35-27.62-87.5,36.7-252.5,317.2-283.3,384.64-43.7,11.5-89.8-73.7-89.84-73.7z" fill="#181"/> +</svg>
\ No newline at end of file diff --git a/art/render.rb b/art/render.rb index b4f84769c..c1e57e0f6 100755 --- a/art/render.rb +++ b/art/render.rb @@ -14,6 +14,7 @@ images = { 'conversations_baloon.svg' => ['ic_launcher', 48], 'conversations_mono.svg' => ['ic_notification', 24], 'ic_received_indicator.svg' => ['ic_received_indicator', 12], + 'ic_read_indicator.svg' => ['ic_read_indicator', 12], 'ic_send_text_offline.svg' => ['ic_send_text_offline', 36], 'ic_send_text_online.svg' => ['ic_send_text_online', 36], 'ic_send_text_away.svg' => ['ic_send_text_away', 36], diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java index 8f12b14ce..a98ccd430 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java @@ -1025,9 +1025,9 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa return; } else { if (this.messageList.get(i).getStatus() == Message.STATUS_SEND_DISPLAYED) { - this.messageList.add(i + 1, - Message.createStatusMessage(conversation, getString(R.string.contact_has_read_up_to_this_point, conversation.getName()))); - return; +// this.messageList.add(i + 1, +// Message.createStatusMessage(conversation, getString(R.string.contact_has_read_up_to_this_point, conversation.getName()))); +// return; } } } diff --git a/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java b/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java index 461127506..a15079512 100644 --- a/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java +++ b/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java @@ -112,6 +112,7 @@ public class MessageAdapter extends ArrayAdapter<Message> { boolean error = false; if (viewHolder.indicatorReceived != null) { viewHolder.indicatorReceived.setVisibility(View.GONE); + viewHolder.indicatorRead.setVisibility(View.GONE); } boolean multiReceived = message.getConversation().getMode() == Conversation.MODE_MULTI && message.getMergedStatus() <= Message.STATUS_RECEIVED; @@ -149,6 +150,7 @@ public class MessageAdapter extends ArrayAdapter<Message> { case Message.STATUS_SEND_DISPLAYED: if (mIndicateReceived) { viewHolder.indicatorReceived.setVisibility(View.VISIBLE); + viewHolder.indicatorRead.setVisibility(View.VISIBLE); } break; case Message.STATUS_SEND_FAILED: @@ -436,6 +438,8 @@ public class MessageAdapter extends ArrayAdapter<Message> { .findViewById(R.id.message_time); viewHolder.indicatorReceived = (ImageView) view .findViewById(R.id.indicator_received); + viewHolder.indicatorRead = (ImageView) view + .findViewById(R.id.indicator_read); break; case RECEIVED: view = activity.getLayoutInflater().inflate( @@ -648,6 +652,7 @@ public class MessageAdapter extends ArrayAdapter<Message> { protected ImageView image; protected ImageView indicator; protected ImageView indicatorReceived; + protected ImageView indicatorRead; protected TextView time; protected TextView messageBody; protected ImageView contact_picture; diff --git a/src/main/res/drawable-hdpi/ic_read_indicator.png b/src/main/res/drawable-hdpi/ic_read_indicator.png Binary files differnew file mode 100644 index 000000000..b2a502fb1 --- /dev/null +++ b/src/main/res/drawable-hdpi/ic_read_indicator.png diff --git a/src/main/res/drawable-mdpi/ic_read_indicator.png b/src/main/res/drawable-mdpi/ic_read_indicator.png Binary files differnew file mode 100644 index 000000000..5b5c63f5e --- /dev/null +++ b/src/main/res/drawable-mdpi/ic_read_indicator.png diff --git a/src/main/res/drawable-xhdpi/ic_read_indicator.png b/src/main/res/drawable-xhdpi/ic_read_indicator.png Binary files differnew file mode 100644 index 000000000..6adb409e1 --- /dev/null +++ b/src/main/res/drawable-xhdpi/ic_read_indicator.png diff --git a/src/main/res/drawable-xxhdpi/ic_read_indicator.png b/src/main/res/drawable-xxhdpi/ic_read_indicator.png Binary files differnew file mode 100644 index 000000000..8573818e6 --- /dev/null +++ b/src/main/res/drawable-xxhdpi/ic_read_indicator.png diff --git a/src/main/res/drawable-xxxhdpi/ic_read_indicator.png b/src/main/res/drawable-xxxhdpi/ic_read_indicator.png Binary files differnew file mode 100644 index 000000000..8ae6cfb03 --- /dev/null +++ b/src/main/res/drawable-xxxhdpi/ic_read_indicator.png diff --git a/src/main/res/layout/message_sent.xml b/src/main/res/layout/message_sent.xml index d76117d89..1d5cfb062 100644 --- a/src/main/res/layout/message_sent.xml +++ b/src/main/res/layout/message_sent.xml @@ -103,6 +103,15 @@ android:alpha="0.54" android:gravity="center_vertical" android:src="@drawable/ic_received_indicator" /> + <ImageView + android:id="@+id/indicator_read" + android:layout_width="?attr/TextSizeInfo" + android:layout_height="?attr/TextSizeInfo" + android:layout_gravity="center_vertical" + android:alpha="0.54" + android:gravity="center_vertical" + android:src="@drawable/ic_read_indicator" + android:layout_marginLeft="-6sp" /> </LinearLayout> </LinearLayout> </LinearLayout> |