Adds Thanks to contributor ;)
This commit is contained in:
parent
7d5f43ede8
commit
ecfe1c2969
|
@ -22,6 +22,13 @@ import android.net.Uri;
|
|||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.text.Html;
|
||||
import android.text.SpannableString;
|
||||
import android.text.Spanned;
|
||||
import android.text.TextPaint;
|
||||
import android.text.method.LinkMovementMethod;
|
||||
import android.text.style.ClickableSpan;
|
||||
import android.util.Log;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
|
@ -113,6 +120,25 @@ public class AboutActivity extends AppCompatActivity implements OnRetrieveSearcA
|
|||
startActivity(browserIntent);
|
||||
}
|
||||
});
|
||||
|
||||
TextView about_thanks = (TextView) findViewById(R.id.about_thanks_dev);
|
||||
String currentText = about_thanks.getText().toString();
|
||||
SpannableString spanned_thanks = new SpannableString(currentText);
|
||||
int startPosition = spanned_thanks.toString().indexOf("@PhotonQyv");
|
||||
int endPosition = startPosition + "@PhotonQyv".length();
|
||||
spanned_thanks.setSpan(new ClickableSpan() {
|
||||
@Override
|
||||
public void onClick(View textView) {
|
||||
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://mastodon.xyz/@PhotonQyv"));
|
||||
startActivity(browserIntent);
|
||||
}
|
||||
@Override
|
||||
public void updateDrawState(TextPaint ds) {
|
||||
super.updateDrawState(ds);
|
||||
}
|
||||
}, startPosition, endPosition, Spanned.SPAN_INCLUSIVE_EXCLUSIVE);
|
||||
about_thanks.setText(spanned_thanks, TextView.BufferType.SPANNABLE);
|
||||
about_thanks.setMovementMethod(LinkMovementMethod.getInstance());
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -61,6 +61,19 @@
|
|||
style="@style/Base.Widget.AppCompat.Button.Colored"
|
||||
android:layout_height="wrap_content" />
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<TextView
|
||||
android:id="@+id/about_thanks_dev"
|
||||
android:text="@string/thanks_text_dev"
|
||||
android:layout_marginTop="20dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- About license -->
|
||||
<LinearLayout
|
||||
|
|
|
@ -63,6 +63,20 @@
|
|||
android:layout_height="wrap_content" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<TextView
|
||||
android:id="@+id/about_thanks_dev"
|
||||
android:text="@string/thanks_text_dev"
|
||||
android:layout_marginTop="20dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- About license -->
|
||||
<LinearLayout
|
||||
android:orientation="horizontal"
|
||||
|
|
|
@ -387,5 +387,11 @@
|
|||
Yandex a sa propre politique de confidentialité qui peut être consultée à l\'adresse suivante : https://yandex.ru/legal/confidential/?lang=en
|
||||
</string>
|
||||
|
||||
<string name="thanks_text">Merci à Stéphane pour le logo.</string>
|
||||
<string name="thanks_text">
|
||||
Merci à Stéphane pour le logo.
|
||||
</string>
|
||||
|
||||
<string name="thanks_text_dev">
|
||||
Merci à @PhotonQyv pour ses contributions.
|
||||
</string>
|
||||
</resources>
|
|
@ -398,5 +398,11 @@
|
|||
</string>
|
||||
|
||||
|
||||
<string name="thanks_text">Thank you to Stéphane for the logo.</string>
|
||||
<string name="thanks_text">
|
||||
Thank you to Stéphane for the logo.
|
||||
</string>
|
||||
|
||||
<string name="thanks_text_dev">
|
||||
Thank you to @PhotonQyv for his contributions.
|
||||
</string>
|
||||
</resources>
|
Loading…
Reference in New Issue