prepare how-to support

This commit is contained in:
Thomas 2020-02-17 17:59:06 +01:00
parent 93ecea35b5
commit 91afcbea98
4 changed files with 32 additions and 3 deletions

View File

@ -104,6 +104,12 @@ public class AboutActivity extends AppCompatActivity {
startActivity(browserIntent);
});
Button how_to = findViewById(R.id.how_to);
how_to.setOnClickListener(v -> {
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://fedilab.app/wiki/nitterizeme/"));
startActivity(browserIntent);
});
TextView license = findViewById(R.id.license);
content = new SpannableString(license.getText().toString());
content.setSpan(new ForegroundColorSpan(ContextCompat.getColor(AboutActivity.this,R.color.colorAccent)), 0, content.length(), 0);
@ -113,10 +119,9 @@ public class AboutActivity extends AppCompatActivity {
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://www.gnu.org/licenses/quick-guide-gplv3.fr.html"));
startActivity(browserIntent);
});
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
if (item.getItemId() == android.R.id.home) {

View File

@ -36,7 +36,6 @@ import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.ImageButton;
import android.widget.TextView;

View File

@ -174,6 +174,30 @@
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Wiki"
tools:ignore="HardcodedText" />
<Button
style="@style/Widget.AppCompat.Button.Colored"
android:textColor="@android:color/white"
android:layout_marginTop="10dp"
android:layout_gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/how_to"
android:paddingRight="30dp"
android:paddingStart="30dp"
android:paddingEnd="30dp"
android:paddingLeft="30dp"
android:id="@+id/how_to"
android:layout_marginStart="10dp"
android:layout_marginLeft="10dp"
android:layout_marginBottom="20dp"
/>
<!-- About the app -->
<TextView
android:layout_margin="10dp"

View File

@ -30,4 +30,5 @@
<string name="display_supported_links">Display supported links</string>
<string name="hide_supported_links">Hide supported links</string>
<string name="use_geo_uri">Use geo URI</string>
<string name="how_to">How-to</string>
</resources>