Fix url colors

This commit is contained in:
PavelRatushny 2017-12-14 13:42:18 +02:00
parent bb20d1d0ab
commit c2521e6d60
2 changed files with 4 additions and 1 deletions

View file

@ -348,5 +348,7 @@
<color name="ctx_menu_amenity_closed_text_color">#c66545</color>
<color name="ctx_menu_bottom_view_divider_light">#f2f2f2</color>
<color name="ctx_menu_bottom_view_divider_dark">#536dfe</color>
<color name="ctx_menu_bottom_view_url_color_light">#536dfe</color>
<color name="ctx_menu_bottom_view_url_color_dark">#d28521</color>
</resources>

View file

@ -10,6 +10,7 @@ import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.AsyncTask;
import android.support.annotation.NonNull;
import android.support.v4.content.ContextCompat;
import android.support.v7.view.ContextThemeWrapper;
import android.text.ClipboardManager;
import android.text.TextUtils;
@ -480,7 +481,7 @@ public class MenuBuilder {
textView.setTextColor(app.getResources().getColor(light ? R.color.ctx_menu_bottom_view_text_color_light : R.color.ctx_menu_bottom_view_text_color_dark));
if (isUrl) {
textView.setTextColor(textView.getLinkTextColors());
textView.setTextColor(ContextCompat.getColor(view.getContext(), light ? R.color.ctx_menu_bottom_view_url_color_light : R.color.ctx_menu_bottom_view_url_color_dark));
} else if (needLinks) {
textView.setAutoLinkMask(Linkify.ALL);
textView.setLinksClickable(true);