Merge branch 'about-dialog' into 'master'

Apply selected theme to about dialog and dismiss it on touch outside

See merge request !572
This commit is contained in:
Hans-Christoph Steiner 2017-09-01 09:59:22 +00:00
commit fdd2a18199

View File

@ -1,6 +1,5 @@
package org.fdroid.fdroid; package org.fdroid.fdroid;
import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.support.annotation.Nullable; import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity; import android.support.v7.app.AppCompatActivity;
@ -11,14 +10,13 @@ public class AboutActivity extends AppCompatActivity {
@Override @Override
protected void onCreate(@Nullable Bundle savedInstanceState) { protected void onCreate(@Nullable Bundle savedInstanceState) {
FDroidApp fdroidApp = (FDroidApp) getApplication();
fdroidApp.applyDialogTheme(this);
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.about); setContentView(R.layout.about);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
setFinishOnTouchOutside(false);
}
String versionName = Utils.getVersionName(this); String versionName = Utils.getVersionName(this);
if (versionName != null) { if (versionName != null) {
((TextView) findViewById(R.id.version)).setText(versionName); ((TextView) findViewById(R.id.version)).setText(versionName);