Reinstate the About dialog.
Currently available as the first entry in Preferences. Used to be available in the main action bar menu. Fixes #906.
This commit is contained in:
parent
5ef5288e3a
commit
655c4bfdd3
@ -530,6 +530,8 @@
|
||||
android:value=".views.main.MainActivity" />
|
||||
</activity>
|
||||
|
||||
<activity android:name=".AboutActivity" android:theme="@style/Theme.AppCompat.Light.Dialog" />
|
||||
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
|
34
app/src/main/java/org/fdroid/fdroid/AboutActivity.java
Normal file
34
app/src/main/java/org/fdroid/fdroid/AboutActivity.java
Normal file
@ -0,0 +1,34 @@
|
||||
package org.fdroid.fdroid;
|
||||
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
public class AboutActivity extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
setContentView(R.layout.about);
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
|
||||
setFinishOnTouchOutside(false);
|
||||
}
|
||||
|
||||
String versionName = Utils.getVersionName(this);
|
||||
if (versionName != null) {
|
||||
((TextView) findViewById(R.id.version)).setText(versionName);
|
||||
}
|
||||
|
||||
findViewById(R.id.ok_button).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
finish();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
@ -50,6 +50,25 @@
|
||||
android:text="@string/license_gplv3_later"
|
||||
style="@style/BodyText" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:layout_marginTop="12dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:clipToPadding="false">
|
||||
|
||||
<Button
|
||||
android:layout_width="wrap_content"
|
||||
android:minWidth="100dp"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/DetailsPrimaryButtonStyle"
|
||||
android:id="@+id/ok_button"
|
||||
android:text="@string/ok" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
@ -1,5 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<PreferenceCategory android:title="@string/menu_about">
|
||||
<PreferenceScreen android:title="@string/about_title">
|
||||
<intent
|
||||
android:action="android.intent.action.MAIN"
|
||||
android:targetPackage="org.fdroid.fdroid"
|
||||
android:targetClass="org.fdroid.fdroid.AboutActivity" />
|
||||
</PreferenceScreen>
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory android:title="@string/preference_category__my_apps">
|
||||
<PreferenceScreen android:title="@string/preference_manage_installed_apps">
|
||||
<intent
|
||||
|
Loading…
x
Reference in New Issue
Block a user