Skip to content

Commit ba47895

Browse files
[App] Add basic about text
1 parent 94e2ca7 commit ba47895

3 files changed

Lines changed: 33 additions & 0 deletions

File tree

application/app/src/main/java/com/viliussutkus89/android/pdf2htmlex/application/AboutActivity.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import android.content.Intent;
44
import android.os.Bundle;
5+
import android.widget.TextView;
56

67
import androidx.appcompat.app.ActionBar;
78
import androidx.appcompat.app.AppCompatActivity;
@@ -23,6 +24,9 @@ protected void onCreate(Bundle savedInstanceState) {
2324
actionBar.setDisplayShowHomeEnabled(true);
2425
}
2526

27+
TextView versionView = findViewById(R.id.about_version);
28+
versionView.setText(BuildConfig.VERSION_NAME);
29+
2630
findViewById(R.id.button_licenses).setOnClickListener(view -> startActivity(new Intent(this, OssLicensesMenuActivity.class)));
2731
}
2832
}

application/app/src/main/res/layout/activity_about.xml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,26 @@
1616
android:layout_height="match_parent"
1717
android:gravity="center"
1818
android:orientation="vertical">
19+
<LinearLayout
20+
android:layout_width="wrap_content"
21+
android:layout_height="wrap_content">
22+
<TextView
23+
android:layout_width="wrap_content"
24+
android:layout_height="wrap_content"
25+
android:text="@string/about_version" />
26+
<TextView
27+
android:id="@+id/about_version"
28+
android:layout_width="wrap_content"
29+
android:layout_height="wrap_content" />
30+
</LinearLayout>
1931

32+
<TextView
33+
android:layout_width="wrap_content"
34+
android:layout_height="wrap_content"
35+
android:gravity="center"
36+
android:text="@string/about_text"
37+
android:singleLine="false"
38+
android:autoLink="web" />
2039
<Button
2140
android:id="@+id/button_licenses"
2241
android:layout_width="wrap_content"

application/app/src/main/res/values/strings.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,14 @@
2323
<string name="error_share_failed">Failed to share HTML document!</string>
2424
<string name="error_save_failed">Failed to save HTML document!</string>
2525
<string name="save_successful">HTML document saved.</string>
26+
27+
<string name="about_version">pdf2htmlEX-Android v</string>
28+
<string name="about_text">
29+
https://github.com/ViliusSutkus89/pdf2htmlEX-Android<br/>\n<br/>\n
30+
31+
Android port of pdf2htmlEX<br/>\n
32+
https://github.com/pdf2htmlEX/pdf2htmlEX<br/>\n<br/>\n
33+
34+
Convert PDF to HTML without losing text or format
35+
</string>
2636
</resources>

0 commit comments

Comments
 (0)