Fix url colors
This commit is contained in:
parent
bb20d1d0ab
commit
c2521e6d60
2 changed files with 4 additions and 1 deletions
|
@ -348,5 +348,7 @@
|
||||||
<color name="ctx_menu_amenity_closed_text_color">#c66545</color>
|
<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_light">#f2f2f2</color>
|
||||||
<color name="ctx_menu_bottom_view_divider_dark">#536dfe</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>
|
</resources>
|
|
@ -10,6 +10,7 @@ import android.graphics.drawable.Drawable;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
|
import android.support.v4.content.ContextCompat;
|
||||||
import android.support.v7.view.ContextThemeWrapper;
|
import android.support.v7.view.ContextThemeWrapper;
|
||||||
import android.text.ClipboardManager;
|
import android.text.ClipboardManager;
|
||||||
import android.text.TextUtils;
|
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));
|
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) {
|
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) {
|
} else if (needLinks) {
|
||||||
textView.setAutoLinkMask(Linkify.ALL);
|
textView.setAutoLinkMask(Linkify.ALL);
|
||||||
textView.setLinksClickable(true);
|
textView.setLinksClickable(true);
|
||||||
|
|
Loading…
Reference in a new issue