Commit 9cc0d29e authored by Nastuzzi Samy's avatar Nastuzzi Samy
Browse files

XML Articles

All layouts, colors and background are prepared
parent 62ab64e2
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<solid
android:color="@color/add" />
<stroke
android:width="2dp"
android:color="@color/white" />
<corners
android:radius="2dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
......@@ -8,7 +8,8 @@
<TabHost
android:id="@+id/tab_categories"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:layout_marginBottom="50dp">
<LinearLayout
android:layout_width="match_parent"
......@@ -19,21 +20,55 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fillViewport="true"
android:scrollbars="none" >
android:scrollbars="none">
<TabWidget
android:id="@android:id/tabs"
android:layout_width="wrap_content"
android:layout_height="match_parent">
</TabWidget>
android:layout_height="match_parent"></TabWidget>
</HorizontalScrollView>
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="match_parent"
android:layout_height="match_parent">
</FrameLayout>
android:layout_height="match_parent"></FrameLayout>
</LinearLayout>
</TabHost>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_alignParentBottom="true"
android:orientation="horizontal">
<ImageButton
android:id="@+id/image_param"
android:layout_weight="1.0"
android:layout_width="100dp"
android:layout_height="match_parent"
android:src="@android:drawable/ic_menu_manage" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="8.0"
android:gravity="center"
android:orientation="horizontal">
<TextView
android:id="@+id/text_price"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:textSize="20dp" />
</LinearLayout>
<ImageButton
android:id="@+id/image_delete"
android:layout_weight="1.0"
android:layout_width="100dp"
android:layout_height="match_parent"
android:src="@android:drawable/ic_menu_delete" />
</LinearLayout>
</RelativeLayout>
......@@ -3,25 +3,52 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:layout_rowWeight="1"
android:orientation="vertical"
android:layout_marginTop="15dp"
android:layout_marginBottom="5dp"
android:rowCount="2">
<RelativeLayout
android:layout_width="match_parent"
android:gravity="center_horizontal"
android:layout_rowWeight="1">
<ImageView
android:id="@+id/image_article"
android:src="@mipmap/ic_launcher"
android:gravity="center_horizontal"
android:contentDescription="@string/article"
android:layout_marginTop="15dp"
android:layout_width="150dp"
android:layout_height="150dp" />
<TextView
android:id="@+id/text_nbr_clicks"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
android:layout_height="wrap_content"
android:layout_alignEnd="@+id/image_article"
android:layout_alignParentTop="true"
android:background="@drawable/article_click_background"
android:paddingTop="1dp"
android:paddingRight="4dp"
android:paddingBottom="1dp"
android:paddingLeft="4dp"
android:textColor="@color/white"
android:text="@string/app_name" />
</RelativeLayout>
<TextView
android:id="@+id/text_article"
android:layout_rowWeight="1"
<RelativeLayout
android:layout_width="match_parent"
android:gravity="center_horizontal"
android:text="@string/article" />
android:layout_rowWeight="1">
<TextView
android:id="@+id/text_article"
android:layout_height="35dp"
android:layout_width="match_parent"
android:gravity="center_horizontal"
android:text="@string/article" />
</RelativeLayout>
</GridLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<GridView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/grid_articles"
android:numColumns="auto_fit"
android:gravity="center"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ScrollView
android:id="@+id/scroll_articles"
android:layout_width="match_parent"
android:layout_height="match_parent">
<GridLayout
android:id="@+id/grid_articles"
android:layout_width="match_parent"
android:layout_height="wrap_content">
</GridLayout>
</ScrollView>
</LinearLayout>
</GridView>
......@@ -3,4 +3,7 @@
<color name="colorPrimary">#3F51B5</color>
<color name="colorPrimaryDark">#303F9F</color>
<color name="colorAccent">#FF9F3F</color>
<color name="add">#303F9F</color>
<color name="remove">#FF1F1F</color>
<color name="white">#EEEEEE</color>
</resources>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment