mirror of
https://github.com/pierre42100/ComunicAndroid
synced 2025-07-07 18:42:53 +00:00
Can open posts PDFs.
This commit is contained in:
BIN
app/src/main/res/drawable/file_pdf.png
Executable file
BIN
app/src/main/res/drawable/file_pdf.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
13
app/src/main/res/layout/activity_pdf.xml
Normal file
13
app/src/main/res/layout/activity_pdf.xml
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".ui.activities.PDFActivity">
|
||||
|
||||
<WebView
|
||||
android:id="@+id/webview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
@ -78,6 +78,13 @@
|
||||
android:contentDescription="@string/post_image_description"
|
||||
android:scaleType="centerInside" />
|
||||
|
||||
<!-- Related PDF (if any) -->
|
||||
<org.communiquons.android.comunic.client.ui.views.PDFLinkButtonView
|
||||
android:id="@+id/btn_pdf_link"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/PostPDFButton"/>
|
||||
|
||||
<!-- Post content -->
|
||||
<TextView
|
||||
android:id="@+id/post_content"
|
||||
|
@ -190,4 +190,5 @@
|
||||
<string name="err_get_latest_posts">An error occurred while trying to retrieve the list of latest posts!</string>
|
||||
<string name="notice_no_latest_posts">You do not have any latest posts to display here.</string>
|
||||
<string name="main_menu_search_user">Search user</string>
|
||||
<string name="activity_view_pdf_label">View PDF</string>
|
||||
</resources>
|
||||
|
@ -69,6 +69,11 @@
|
||||
<item name="android:layout_gravity">center_vertical</item>
|
||||
</style>
|
||||
|
||||
<!-- Post PDF button (when required) -->
|
||||
<style name="PostPDFButton">
|
||||
<item name="android:layout_gravity">center_horizontal</item>
|
||||
</style>
|
||||
|
||||
<!-- Post content -->
|
||||
<style name="PostContent">
|
||||
<item name="android:textAlignment">center</item>
|
||||
|
Reference in New Issue
Block a user