2015-05-21 23:27:27 +02:00
|
|
|
/*
|
2019-01-23 18:03:33 +01:00
|
|
|
* This is the source code of Telegram for Android v. 5.x.x.
|
2015-05-21 23:27:27 +02:00
|
|
|
* It is licensed under GNU GPL v. 2 or later.
|
|
|
|
* You should have received a copy of the license in this archive (see LICENSE).
|
|
|
|
*
|
2019-01-23 18:03:33 +01:00
|
|
|
* Copyright Nikolai Kudashov, 2013-2018.
|
2015-05-21 23:27:27 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
package org.telegram.ui.Components;
|
|
|
|
|
|
|
|
import android.text.TextPaint;
|
|
|
|
|
2015-09-24 22:52:02 +02:00
|
|
|
import org.telegram.messenger.AndroidUtilities;
|
2015-05-21 23:27:27 +02:00
|
|
|
|
|
|
|
public class URLSpanNoUnderlineBold extends URLSpanNoUnderline {
|
2019-08-22 01:53:26 +02:00
|
|
|
|
2015-05-21 23:27:27 +02:00
|
|
|
public URLSpanNoUnderlineBold(String url) {
|
2019-08-22 01:53:26 +02:00
|
|
|
super(url != null ? url.replace('\u202E', ' ') : url);
|
2015-05-21 23:27:27 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void updateDrawState(TextPaint ds) {
|
|
|
|
super.updateDrawState(ds);
|
|
|
|
ds.setTypeface(AndroidUtilities.getTypeface("fonts/rmedium.ttf"));
|
|
|
|
ds.setUnderlineText(false);
|
|
|
|
}
|
|
|
|
}
|