RichPath
RichPath copied to clipboard
It does not support the following properties: layout_height, layout_weight
It does not support the following properties: layout_height="0dp" layout_weight="1"
Example code:
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:orientation="vertical"
android:paddingTop="15dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:paddingBottom="15dp">
<android.support.v7.widget.AppCompatTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="-3dp"
android:text="tarek360/RichPath"
android:gravity="center"
android:textColor="@android:color/white"
android:layout_gravity="center"
android:textSize="36sp"/>
<android.support.v7.widget.AppCompatTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="RichPath"
android:textAllCaps="true"
android:gravity="center"
android:textColor="@android:color/white"
android:layout_gravity="center"
android:textSize="12sp"/>
<com.richpath.RichPathView
android:id="@+id/logo"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
app:vector="drawable/vector_ag"
android:layout_margin="10dp"/>
<android.support.v7.widget.AppCompatTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TEST RichPath"
android:gravity="center"
android:layout_marginTop="4dp"
android:textColor="@android:color/white"
android:layout_gravity="center"
android:textSize="24sp"/>
</LinearLayout>

Hi @mgleonsc I have tried it using your XML code, but I can't reach to the behavior in the Gif, could you attach a full sample code, please?
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" app:layout_behavior="@string/appbar_scrolling_view_behavior" tools:showIn="@layout/activity_main" tools:context="com.example.mgleon.aapplication.MainActivity">
<ScrollView
android:layout_width="368dp"
android:layout_height="495dp"
android:fillViewport="true" tools:layout_editor_absoluteY="8dp" tools:layout_editor_absoluteX="8dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:id="@+id/al_area_sp"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:orientation="vertical"
android:paddingTop="15dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:paddingBottom="15dp">
<android.support.v7.widget.AppCompatTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="-3dp"
android:text="tarek360/RichPath"
android:gravity="center"
android:layout_gravity="center"
android:textSize="36sp"
fontPath="fonts/superficial-medium.otf"/>
<android.support.v7.widget.AppCompatTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="RichPath"
android:gravity="center"
android:layout_gravity="center"
android:textSize="12sp"
fontPath="fonts/superficial-medium.otf"/>
<com.richpath.RichPathView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
app:vector="@drawable/vector_ag"
android:layout_margin="10dp"/>
<android.support.v7.widget.AppCompatTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Rich Android Path"
android:gravity="center"
android:layout_marginTop="4dp"
android:layout_gravity="center"
android:textSize="24sp"
fonts="fonts/Myriad-Pro-Semibold_31650.ttf"/>
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="10dp"
android:paddingLeft="20dp"
android:paddingRight="20dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:orientation="vertical">
<android.support.v7.widget.AppCompatEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="text1"
android:lines="1"
android:maxLines="1"/>
<android.support.v7.widget.AppCompatEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="text1"
android:lines="1"
android:maxLines="1"/>
<android.support.v7.widget.AppCompatEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="text1"
android:lines="1"
android:maxLines="1"/>
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="BTN"
android:id="@+id/btn_login"
android:gravity="center"
android:textColor="#ffffff"
android:layout_marginTop="20dp"
android:layout_marginBottom="20dp"/>
</LinearLayout>
</RelativeLayout>
</LinearLayout>
</ScrollView>
the problem is when shows and hides the keyboard
I got it, but I think that is according to your layout attributes, to prove that remove your RichPathView and replace it with an ImageView
<ImageView
android:id="@+id/logo"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_margin="10dp"
android:layout_weight="1"
android:src="@drawable/vector_ag"/>
and you will get the same behavior, waiting for your feedback!
replace RichPathView by ImageView, with ImageView works, but not RichPathView.
You can download the complete example from: http://cf.lvps92-51-151-239.dedicated.hosteurope.de/downloads/ApplicationTest.tar.gz
the problem is when shows and hides the keyboard, the RichPathView not resizes however the ImageView adjusts size
@mgleonsc Thanks, I will fix it as soon as possible.
A work around is to use constraint view. That way you put your image percentage ways on screen. This code is a life saver by the way