mirror of
https://github.com/pierre42100/ComunicAndroid
synced 2025-07-07 18:42:53 +00:00
Added post web links support
This commit is contained in:
14
app/src/main/res/drawable/bg_weblink.xml
Normal file
14
app/src/main/res/drawable/bg_weblink.xml
Normal file
@ -0,0 +1,14 @@
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<!--<gradient
|
||||
android:angle="135"
|
||||
android:centerColor="#616161"
|
||||
android:endColor="#455a64"
|
||||
android:startColor="#9e9e9e"
|
||||
android:type="linear" />-->
|
||||
<solid
|
||||
android:color="#9e9e9e" />
|
||||
|
||||
<corners android:radius="5dp" />
|
||||
|
||||
</shape>
|
BIN
app/src/main/res/drawable/world.png
Normal file
BIN
app/src/main/res/drawable/world.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.5 KiB |
@ -85,6 +85,12 @@
|
||||
android:layout_height="200dp"
|
||||
style="@style/PostMovie"/>
|
||||
|
||||
<!-- Post Web link (if any) -->
|
||||
<org.communiquons.android.comunic.client.ui.views.WebLinkView
|
||||
android:id="@+id/post_web_link"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<!-- Related PDF (if any) -->
|
||||
<org.communiquons.android.comunic.client.ui.views.PDFLinkButtonView
|
||||
android:id="@+id/btn_pdf_link"
|
||||
|
46
app/src/main/res/layout/view_web_link.xml
Normal file
46
app/src/main/res/layout/view_web_link.xml
Normal file
@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:orientation="horizontal"
|
||||
android:background="@drawable/bg_weblink">
|
||||
|
||||
<org.communiquons.android.comunic.client.ui.views.WebImageView
|
||||
android:id="@+id/link_image"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:src="@drawable/world"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginEnd="5dp"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/link_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="Link title"
|
||||
android:textSize="20sp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/link_url"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="http://example.com/link"
|
||||
style="@android:style/TextAppearance.Small"
|
||||
android:textColor="@android:color/holo_blue_dark"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/link_description"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="A description content with interesting content about the page and its content."/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
@ -88,6 +88,12 @@
|
||||
<item name="android:layout_gravity">center_horizontal</item>
|
||||
</style>
|
||||
|
||||
<!-- Post Weblink (if any) -->
|
||||
<style name="PostWebLink">
|
||||
<item name="android:layout_gravity">center_horizontal</item>
|
||||
<item name="android:visibility">gone</item>
|
||||
</style>
|
||||
|
||||
<!-- Post PDF button (when required) -->
|
||||
<style name="PostPDFButton">
|
||||
<item name="android:layout_gravity">center_horizontal</item>
|
||||
|
Reference in New Issue
Block a user