fix 120 character line margin

This commit is contained in:
AndyScherzinger 2017-03-26 15:17:39 +02:00
parent fae9d48784
commit 0a83e7d3ee
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B

View file

@ -56,7 +56,8 @@ public class CustomEditText extends android.support.v7.widget.AppCompatEditText
}
public String getFullServerUrl() {
if (TextUtils.isEmpty(fixedText) || getText().toString().startsWith(AuthenticatorActivity.HTTP_PROTOCOL)
if (TextUtils.isEmpty(fixedText)
|| getText().toString().startsWith(AuthenticatorActivity.HTTP_PROTOCOL)
|| getText().toString().startsWith(AuthenticatorActivity.HTTPS_PROTOCOL)) {
return getText().toString();
} else if (isPrefixFixed) {
@ -81,7 +82,10 @@ public class CustomEditText extends android.support.v7.widget.AppCompatEditText
&& !getText().toString().startsWith(AuthenticatorActivity.HTTPS_PROTOCOL)
&& !TextUtils.isEmpty(fixedText)) {
if (isPrefixFixed) {
canvas.drawText(fixedText, super.getCompoundPaddingLeft(), getBaseline(), getPaint());
canvas.drawText(fixedText,
super.getCompoundPaddingLeft(),
getBaseline(),
getPaint());
} else {
canvas.drawText(fixedText, super.getCompoundPaddingLeft()
+ getPaint().measureText(getText().toString()), getBaseline(), getPaint());