Skip to content

Can't get it to work #1

@devloe

Description

@devloe

Any toughts?

This is my layout:

<se.jmvo.widget.ParallaxScrollView
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:app="http://schemas.android.com/tools"
    android:id="@+id/scroll"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:padding="0dp"
    android:background="#fff"
    android:fillViewport="true"
    app:scrollFactor="0.6"
    app:backgroundView="@+id/picture"
    tools:context="${packageName}.${activityClass}"
    >

   <LinearLayout 
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:layout_gravity="top"    
         >

        <ImageView
           android:id="@+id/picture"
           android:layout_width="match_parent"
           android:layout_height="200dp"
           android:adjustViewBounds="true"
           android:background="#ddd"
           android:scaleType="fitXY"
           />

        <ScrollView
            android:layout_width="match_parent"
            android:layout_height="wrap_content" >

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                >

                <LinearLayout 
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="vertical"
                    android:layout_gravity="top"
                    android:padding="20dp"
                    android:background="#fff"
                     >

                    <TextView
                        android:id="@+id/title"
                        android:textSize="22dp"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_marginBottom="15dp"
                        android:gravity="left"
                        />

                    <TextView
                        android:id="@+id/description"
                        android:textSize="14dp"
                        android:color="#888"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:gravity="left"
                         />

                </LinearLayout>

                <View 
                   android:layout_width="fill_parent"
                   android:layout_height="1dp"       
                   android:background="#ddd"
                   />

                <LinearLayout
                    android:orientation="horizontal"
                    android:layout_width="match_parent"
                    android:layout_weight="1"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center_horizontal"
                    android:paddingTop="8dp"
                    android:paddingLeft="20dp"
                    android:paddingRight="20dp"
                    android:paddingBottom="8dp"
                    >

                    <LinearLayout
                    android:orientation="horizontal"
                    android:layout_width="wrap_content"
                    android:layout_weight="2"
                    android:layout_height="wrap_content"
                    >

                        <de.hdodenhof.circleimageview.CircleImageView
                           xmlns:app="http://schemas.android.com/apk/res-auto"
                           android:id="@+id/user_picture"
                           android:layout_width="20dp"
                           android:layout_height="20dp"
                           android:layout_gravity="center"
                           android:layout_marginRight="5dp"
                           android:src="@drawable/ic_user_placeholder"
                           app:border_width="0dp"
                           app:border_color="#ccc"
                           />

                        <TextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:id="@+id/user"
                            android:layout_gravity="left|center_vertical"
                            android:layout_weight="1"
                            />

                    </LinearLayout>

                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:id="@+id/comments_count"
                        android:layout_gravity="right"
                        android:gravity="right"
                        android:layout_weight="1"
                        android:text="0"
                        />

                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:id="@+id/date"
                        android:layout_gravity="right"
                        android:gravity="right"
                        android:layout_weight="1"

                        />

                </LinearLayout>

                <View 
                   android:layout_width="fill_parent"
                   android:layout_height="400dp"       
                   android:background="#ddd"
                   android:layout_marginBottom="5dp"/>

            </LinearLayout>             

        </ScrollView>

    </LinearLayout>

</se.jmvo.widget.ParallaxScrollView>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions