theming: switched to material green. changed accent color
|
@ -140,7 +140,7 @@
|
||||||
transform="translate(0,-2)">
|
transform="translate(0,-2)">
|
||||||
<g
|
<g
|
||||||
id="g3759"
|
id="g3759"
|
||||||
style="fill:#4b9b4a;fill-opacity:1;stroke:none;fill-rule:nonzero;filter:url(#filter3811)">
|
style="fill:#4d8e50;fill-opacity:1;stroke:none;fill-rule:nonzero;filter:url(#filter3811)">
|
||||||
<path
|
<path
|
||||||
style="display:none"
|
style="display:none"
|
||||||
d="m 8,6 c 2,2 4,6 4,10 L 16,6 z"
|
d="m 8,6 c 2,2 4,6 4,10 L 16,6 z"
|
||||||
|
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
|
@ -140,7 +140,7 @@
|
||||||
transform="translate(0,-2)">
|
transform="translate(0,-2)">
|
||||||
<g
|
<g
|
||||||
id="g3759"
|
id="g3759"
|
||||||
style="fill:#326130;fill-opacity:1;stroke:none;fill-rule:nonzero;filter:url(#filter3811)">
|
style="fill:#295e2d;fill-opacity:1;stroke:none;fill-rule:nonzero;filter:url(#filter3811)">
|
||||||
<path
|
<path
|
||||||
style="display:none"
|
style="display:none"
|
||||||
d="m 8,6 c 2,2 4,6 4,10 L 16,6 z"
|
d="m 8,6 c 2,2 4,6 4,10 L 16,6 z"
|
||||||
|
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
|
@ -249,7 +249,7 @@ public class NotificationService {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setNotificationColor(final Builder mBuilder) {
|
private void setNotificationColor(final Builder mBuilder) {
|
||||||
mBuilder.setColor(ContextCompat.getColor(mXmppConnectionService, R.color.primary500));
|
mBuilder.setColor(ContextCompat.getColor(mXmppConnectionService, R.color.green600));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateNotification(final boolean notify) {
|
public void updateNotification(final boolean notify) {
|
||||||
|
|
|
@ -438,7 +438,7 @@ public class ContactDetailsActivity extends OmemoActivity implements OnAccountUp
|
||||||
TextView keyType = (TextView) view.findViewById(R.id.key_type);
|
TextView keyType = (TextView) view.findViewById(R.id.key_type);
|
||||||
keyType.setText(R.string.openpgp_key_id);
|
keyType.setText(R.string.openpgp_key_id);
|
||||||
if ("pgp".equals(messageFingerprint)) {
|
if ("pgp".equals(messageFingerprint)) {
|
||||||
keyType.setTextColor(ContextCompat.getColor(this, R.color.accent));
|
keyType.setTextAppearance(this, R.style.TextAppearance_Conversations_Caption_Highlight);
|
||||||
}
|
}
|
||||||
key.setText(OpenPgpUtils.convertKeyIdToHex(contact.getPgpKeyId()));
|
key.setText(OpenPgpUtils.convertKeyIdToHex(contact.getPgpKeyId()));
|
||||||
final OnClickListener openKey = v -> launchOpenKeyChain(contact.getPgpKeyId());
|
final OnClickListener openKey = v -> launchOpenKeyChain(contact.getPgpKeyId());
|
||||||
|
|
|
@ -405,7 +405,7 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie
|
||||||
body.setSpan(new DividerSpan(false), end, end + 2, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
body.setSpan(new DividerSpan(false), end, end + 2, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||||
}
|
}
|
||||||
int color = darkBackground ? this.getMessageTextColor(darkBackground, false)
|
int color = darkBackground ? this.getMessageTextColor(darkBackground, false)
|
||||||
: ContextCompat.getColor(activity, R.color.bubble);
|
: ContextCompat.getColor(activity, R.color.green700_desaturated);
|
||||||
DisplayMetrics metrics = getContext().getResources().getDisplayMetrics();
|
DisplayMetrics metrics = getContext().getResources().getDisplayMetrics();
|
||||||
body.setSpan(new QuoteSpan(color, metrics), start, end, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
body.setSpan(new QuoteSpan(color, metrics), start, end, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package eu.siacs.conversations.ui.forms;
|
package eu.siacs.conversations.ui.forms;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.support.v4.content.ContextCompat;
|
|
||||||
import android.text.SpannableString;
|
import android.text.SpannableString;
|
||||||
import android.text.style.ForegroundColorSpan;
|
import android.text.style.ForegroundColorSpan;
|
||||||
import android.text.style.StyleSpan;
|
import android.text.style.StyleSpan;
|
||||||
|
@ -11,6 +10,7 @@ import android.view.View;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import eu.siacs.conversations.R;
|
import eu.siacs.conversations.R;
|
||||||
|
import eu.siacs.conversations.ui.util.Color;
|
||||||
import eu.siacs.conversations.xmpp.forms.Field;
|
import eu.siacs.conversations.xmpp.forms.Field;
|
||||||
|
|
||||||
public abstract class FormFieldWrapper {
|
public abstract class FormFieldWrapper {
|
||||||
|
@ -58,7 +58,7 @@ public abstract class FormFieldWrapper {
|
||||||
int start = label.length();
|
int start = label.length();
|
||||||
int end = label.length() + 2;
|
int end = label.length() + 2;
|
||||||
spannableString.setSpan(new StyleSpan(android.graphics.Typeface.BOLD), start, end, 0);
|
spannableString.setSpan(new StyleSpan(android.graphics.Typeface.BOLD), start, end, 0);
|
||||||
spannableString.setSpan(new ForegroundColorSpan(ContextCompat.getColor(context, R.color.accent)), start, end, 0);
|
spannableString.setSpan(new ForegroundColorSpan(Color.get(context,R.attr.colorAccent)), start, end, 0);
|
||||||
}
|
}
|
||||||
return spannableString;
|
return spannableString;
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,7 +70,7 @@ public class AudioPlayer implements View.OnClickListener, MediaPlayer.OnCompleti
|
||||||
}
|
}
|
||||||
viewHolder.progress.setOnSeekBarChangeListener(this);
|
viewHolder.progress.setOnSeekBarChangeListener(this);
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||||
ColorStateList color = ContextCompat.getColorStateList(messageAdapter.getContext(), viewHolder.darkBackground ? R.color.white70 : R.color.bubble);
|
ColorStateList color = ContextCompat.getColorStateList(messageAdapter.getContext(), viewHolder.darkBackground ? R.color.white70 : R.color.green700_desaturated);
|
||||||
viewHolder.progress.setThumbTintList(color);
|
viewHolder.progress.setThumbTintList(color);
|
||||||
viewHolder.progress.setProgressTintList(color);
|
viewHolder.progress.setProgressTintList(color);
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,49 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2018, Daniel Gultsch All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without modification,
|
||||||
|
* are permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||||
|
* list of conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
* this list of conditions and the following disclaimer in the documentation and/or
|
||||||
|
* other materials provided with the distribution.
|
||||||
|
*
|
||||||
|
* 3. Neither the name of the copyright holder nor the names of its contributors
|
||||||
|
* may be used to endorse or promote products derived from this software without
|
||||||
|
* specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||||
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||||
|
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||||
|
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package eu.siacs.conversations.ui.util;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import eu.siacs.conversations.entities.IndividualMessage;
|
||||||
|
import eu.siacs.conversations.entities.Message;
|
||||||
|
import eu.siacs.conversations.utils.UIHelper;
|
||||||
|
|
||||||
|
public class DateSeparator {
|
||||||
|
|
||||||
|
public static void addAll(List<Message> messages) {
|
||||||
|
for (int i = 0; i < messages.size(); ++i) {
|
||||||
|
final Message current = messages.get(i);
|
||||||
|
if (i == 0 || !UIHelper.sameDay(messages.get(i - 1).getTimeSent(), current.getTimeSent())) {
|
||||||
|
messages.add(i, IndividualMessage.createDateSeparator(current));
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -8,6 +8,7 @@ import android.graphics.Paint;
|
||||||
import android.graphics.Point;
|
import android.graphics.Point;
|
||||||
import android.location.Location;
|
import android.location.Location;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
|
import android.support.v4.content.ContextCompat;
|
||||||
|
|
||||||
import org.osmdroid.util.GeoPoint;
|
import org.osmdroid.util.GeoPoint;
|
||||||
import org.osmdroid.views.MapView;
|
import org.osmdroid.views.MapView;
|
||||||
|
@ -24,23 +25,11 @@ public class MyLocation extends SimpleLocationOverlay {
|
||||||
private final Paint fill;
|
private final Paint fill;
|
||||||
private final Paint outline;
|
private final Paint outline;
|
||||||
|
|
||||||
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
|
|
||||||
private int getColor(final Context ctx) {
|
|
||||||
final int accent;
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
|
||||||
accent = ctx.getResources().getColor(R.color.accent, ctx.getTheme());
|
|
||||||
} else {
|
|
||||||
//noinspection deprecation
|
|
||||||
accent = ctx.getResources().getColor(R.color.accent);
|
|
||||||
}
|
|
||||||
return accent;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MyLocation(final Context ctx, final Bitmap icon, final Location position) {
|
public MyLocation(final Context ctx, final Bitmap icon, final Location position) {
|
||||||
super(icon);
|
super(icon);
|
||||||
this.mapCenterPoint = new Point();
|
this.mapCenterPoint = new Point();
|
||||||
this.fill = new Paint(Paint.ANTI_ALIAS_FLAG);
|
this.fill = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||||
final int accent = this.getColor(ctx);
|
final int accent = ContextCompat.getColor(ctx,R.color.blue500);
|
||||||
fill.setColor(accent);
|
fill.setColor(accent);
|
||||||
fill.setStyle(Paint.Style.FILL);
|
fill.setStyle(Paint.Style.FILL);
|
||||||
this.outline = new Paint(Paint.ANTI_ALIAS_FLAG);
|
this.outline = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||||
|
|
|
@ -37,7 +37,7 @@ public class UnreadCountCustomView extends View {
|
||||||
|
|
||||||
private void initXMLAttrs(Context context, AttributeSet attrs) {
|
private void initXMLAttrs(Context context, AttributeSet attrs) {
|
||||||
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.UnreadCountCustomView);
|
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.UnreadCountCustomView);
|
||||||
setBackgroundColor(a.getColor(a.getIndex(0), ContextCompat.getColor(context, R.color.unreadcountlight)));
|
setBackgroundColor(a.getColor(a.getIndex(0), ContextCompat.getColor(context, R.color.green700_desaturated)));
|
||||||
a.recycle();
|
a.recycle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Before Width: | Height: | Size: 657 B After Width: | Height: | Size: 657 B |
Before Width: | Height: | Size: 689 B After Width: | Height: | Size: 689 B |
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 798 B After Width: | Height: | Size: 798 B |
Before Width: | Height: | Size: 574 B After Width: | Height: | Size: 574 B |
Before Width: | Height: | Size: 762 B After Width: | Height: | Size: 762 B |
Before Width: | Height: | Size: 610 B After Width: | Height: | Size: 610 B |
Before Width: | Height: | Size: 471 B After Width: | Height: | Size: 471 B |
Before Width: | Height: | Size: 560 B After Width: | Height: | Size: 560 B |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 971 B After Width: | Height: | Size: 971 B |
Before Width: | Height: | Size: 1010 B After Width: | Height: | Size: 1010 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 987 B After Width: | Height: | Size: 987 B |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 790 B After Width: | Height: | Size: 790 B |
Before Width: | Height: | Size: 884 B After Width: | Height: | Size: 884 B |
Before Width: | Height: | Size: 657 B After Width: | Height: | Size: 657 B |
Before Width: | Height: | Size: 675 B After Width: | Height: | Size: 675 B |
Before Width: | Height: | Size: 867 B After Width: | Height: | Size: 867 B |
Before Width: | Height: | Size: 982 B After Width: | Height: | Size: 982 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 800 B After Width: | Height: | Size: 800 B |
Before Width: | Height: | Size: 844 B After Width: | Height: | Size: 844 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1017 B After Width: | Height: | Size: 1017 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 844 B After Width: | Height: | Size: 844 B |
Before Width: | Height: | Size: 878 B After Width: | Height: | Size: 878 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 765 B After Width: | Height: | Size: 772 B |
Before Width: | Height: | Size: 779 B After Width: | Height: | Size: 773 B |
Before Width: | Height: | Size: 750 B After Width: | Height: | Size: 750 B |
Before Width: | Height: | Size: 757 B After Width: | Height: | Size: 757 B |
Before Width: | Height: | Size: 779 B After Width: | Height: | Size: 779 B |
Before Width: | Height: | Size: 687 B After Width: | Height: | Size: 687 B |
Before Width: | Height: | Size: 707 B After Width: | Height: | Size: 707 B |
Before Width: | Height: | Size: 791 B After Width: | Height: | Size: 791 B |
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.0 KiB |
Before Width: | Height: | Size: 514 B After Width: | Height: | Size: 514 B |
Before Width: | Height: | Size: 525 B After Width: | Height: | Size: 525 B |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 554 B After Width: | Height: | Size: 554 B |
Before Width: | Height: | Size: 409 B After Width: | Height: | Size: 409 B |
Before Width: | Height: | Size: 505 B After Width: | Height: | Size: 505 B |
Before Width: | Height: | Size: 466 B After Width: | Height: | Size: 466 B |
Before Width: | Height: | Size: 369 B After Width: | Height: | Size: 369 B |
Before Width: | Height: | Size: 402 B After Width: | Height: | Size: 402 B |
Before Width: | Height: | Size: 901 B After Width: | Height: | Size: 901 B |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 837 B After Width: | Height: | Size: 837 B |
Before Width: | Height: | Size: 799 B After Width: | Height: | Size: 799 B |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 784 B After Width: | Height: | Size: 784 B |
Before Width: | Height: | Size: 917 B After Width: | Height: | Size: 917 B |
Before Width: | Height: | Size: 673 B After Width: | Height: | Size: 673 B |
Before Width: | Height: | Size: 699 B After Width: | Height: | Size: 699 B |
Before Width: | Height: | Size: 919 B After Width: | Height: | Size: 919 B |
Before Width: | Height: | Size: 776 B After Width: | Height: | Size: 776 B |
Before Width: | Height: | Size: 915 B After Width: | Height: | Size: 915 B |
Before Width: | Height: | Size: 666 B After Width: | Height: | Size: 666 B |
Before Width: | Height: | Size: 683 B After Width: | Height: | Size: 683 B |
Before Width: | Height: | Size: 938 B After Width: | Height: | Size: 938 B |
Before Width: | Height: | Size: 512 B After Width: | Height: | Size: 512 B |
Before Width: | Height: | Size: 585 B After Width: | Height: | Size: 585 B |
Before Width: | Height: | Size: 456 B After Width: | Height: | Size: 456 B |
Before Width: | Height: | Size: 475 B After Width: | Height: | Size: 475 B |
Before Width: | Height: | Size: 580 B After Width: | Height: | Size: 580 B |
Before Width: | Height: | Size: 677 B After Width: | Height: | Size: 677 B |
Before Width: | Height: | Size: 781 B After Width: | Height: | Size: 781 B |
Before Width: | Height: | Size: 542 B After Width: | Height: | Size: 542 B |
Before Width: | Height: | Size: 583 B After Width: | Height: | Size: 583 B |
Before Width: | Height: | Size: 793 B After Width: | Height: | Size: 793 B |
Before Width: | Height: | Size: 679 B After Width: | Height: | Size: 679 B |
Before Width: | Height: | Size: 795 B After Width: | Height: | Size: 795 B |
Before Width: | Height: | Size: 575 B After Width: | Height: | Size: 575 B |
Before Width: | Height: | Size: 606 B After Width: | Height: | Size: 606 B |
Before Width: | Height: | Size: 788 B After Width: | Height: | Size: 788 B |
Before Width: | Height: | Size: 1022 B After Width: | Height: | Size: 1022 B |