mirror of
https://github.com/gsantner/dandelion
synced 2024-11-22 12:22:08 +01:00
Added information about android version and device to AboutActivity
This commit is contained in:
parent
05d9edbbdb
commit
e7f74eb08d
4 changed files with 27 additions and 1 deletions
|
@ -21,6 +21,7 @@ package com.github.dfa.diaspora_android.activity;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.pm.PackageInfo;
|
import android.content.pm.PackageInfo;
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.design.widget.AppBarLayout;
|
import android.support.design.widget.AppBarLayout;
|
||||||
import android.support.design.widget.TabLayout;
|
import android.support.design.widget.TabLayout;
|
||||||
|
@ -194,6 +195,8 @@ public class AboutActivity extends AppCompatActivity {
|
||||||
View rootView = inflater.inflate(R.layout.fragment_debug, container, false);
|
View rootView = inflater.inflate(R.layout.fragment_debug, container, false);
|
||||||
TextView packageName = (TextView) rootView.findViewById(R.id.fragment_debug__package_name);
|
TextView packageName = (TextView) rootView.findViewById(R.id.fragment_debug__package_name);
|
||||||
TextView appVersion = (TextView) rootView.findViewById(R.id.fragment_debug__app_version);
|
TextView appVersion = (TextView) rootView.findViewById(R.id.fragment_debug__app_version);
|
||||||
|
TextView osVersion = (TextView) rootView.findViewById(R.id.fragment_debug__android_version);
|
||||||
|
TextView deviceName = (TextView) rootView.findViewById(R.id.fragment_debug__device_name);
|
||||||
TextView podDomain = (TextView) rootView.findViewById(R.id.fragment_debug__pod_domain);
|
TextView podDomain = (TextView) rootView.findViewById(R.id.fragment_debug__pod_domain);
|
||||||
|
|
||||||
if (isAdded()) {
|
if (isAdded()) {
|
||||||
|
@ -203,6 +206,9 @@ public class AboutActivity extends AppCompatActivity {
|
||||||
|
|
||||||
packageName.setText(pInfo.packageName);
|
packageName.setText(pInfo.packageName);
|
||||||
appVersion.setText(getString(R.string.fragment_debug__app_version, pInfo.versionName + " (" + pInfo.versionCode + ")"));
|
appVersion.setText(getString(R.string.fragment_debug__app_version, pInfo.versionName + " (" + pInfo.versionCode + ")"));
|
||||||
|
|
||||||
|
osVersion.setText(getString(R.string.fragment_debug__android_version, Build.VERSION.RELEASE));
|
||||||
|
deviceName.setText(getString(R.string.fragment_debug__device_name, Build.MANUFACTURER+" "+Build.MODEL));
|
||||||
podDomain.setText(getString(R.string.fragment_debug__pod_domain, settings.getPodDomain()));
|
podDomain.setText(getString(R.string.fragment_debug__pod_domain, settings.getPodDomain()));
|
||||||
|
|
||||||
} catch (PackageManager.NameNotFoundException e) {
|
} catch (PackageManager.NameNotFoundException e) {
|
||||||
|
|
|
@ -34,6 +34,23 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:id="@+id/fragment_debug__app_version"/>
|
android:id="@+id/fragment_debug__app_version"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/fragment_debug__section_device"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/fragment_debug__section_device"
|
||||||
|
android:paddingTop="@dimen/activity_vertical_margin"
|
||||||
|
style="@android:style/TextAppearance.DeviceDefault.Large"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:id="@+id/fragment_debug__android_version"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:id="@+id/fragment_debug__device_name"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/fragment_debug__section_pod"
|
android:id="@+id/fragment_debug__section_pod"
|
||||||
|
|
|
@ -2,4 +2,4 @@ NEWENTRY Gregor Santner (gsantner)
|
||||||
SUBTABBY https://gsantner.github.io
|
SUBTABBY https://gsantner.github.io
|
||||||
|
|
||||||
NEWENTRY Paul Schaub (vanitasvitae)
|
NEWENTRY Paul Schaub (vanitasvitae)
|
||||||
SUBTABBY https://github.com/vanitasvitaes
|
SUBTABBY https://github.com/vanitasvitae
|
||||||
|
|
|
@ -11,9 +11,12 @@
|
||||||
<string name="about_activity__title_about_license">License</string>
|
<string name="about_activity__title_about_license">License</string>
|
||||||
<string name="about_activity__title_debug_info">Debugging</string>
|
<string name="about_activity__title_debug_info">Debugging</string>
|
||||||
<string name="fragment_debug__section_app">Application</string>
|
<string name="fragment_debug__section_app">Application</string>
|
||||||
|
<string name="fragment_debug__section_device">Device</string>
|
||||||
<string name="fragment_debug__section_pod">Diaspora Pod</string>
|
<string name="fragment_debug__section_pod">Diaspora Pod</string>
|
||||||
<string name="fragment_debug__app_version">App Version: %1$s</string>
|
<string name="fragment_debug__app_version">App Version: %1$s</string>
|
||||||
<string name="fragment_debug__package_name">Package Name: %1$s</string>
|
<string name="fragment_debug__package_name">Package Name: %1$s</string>
|
||||||
|
<string name="fragment_debug__android_version">Android Version: %1$s</string>
|
||||||
|
<string name="fragment_debug__device_name">Device Name: %1$s</string>
|
||||||
<string name="fragment_debug__pod_domain">Pod Domain: %1$s</string>
|
<string name="fragment_debug__pod_domain">Pod Domain: %1$s</string>
|
||||||
<string name="fragment_license__3rd_party_libs_title">Used 3rd Party Libraries</string>
|
<string name="fragment_license__3rd_party_libs_title">Used 3rd Party Libraries</string>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue