1

Desired Result

Result

I am getting the animated image. But not getting the circle with text on it.

code:-

<?xml version="1.0" encoding="utf-8"?>
<developer.shivam.library.CrescentoContainer android:layout_width="match_parent"
    android:layout_height="300dp"
    xmlns:attribute="http://schemas.android.com/tools"
    android:elevation="20dp"
    android:scaleType="centerCrop"
    attribute:curvature="50dp"
    xmlns:android="http://schemas.android.com/apk/res/android">

    <com.flaviofaria.kenburnsview.KenBurnsView
        android:src="@drawable/goal_wallpaper"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

    <LinearLayout
        android:gravity="center"
        android:orientation="horizontal"
        android:weightSum="3"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <RelativeLayout
            android:layout_weight="0.8"
            android:layout_width="wrap_content"
            android:layout_height="100dp">

            <ImageView
                android:backgroundTint="@color/green"
                android:background="@drawable/circle1"
                android:layout_width="0dp"
                android:layout_height="100dp" />

            <TextView
                android:layout_centerInParent="true"
                android:textAppearance="@style/TextAppearance.AppCompat.Medium"
                android:text="140/80"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content" />

        </RelativeLayout>


        <de.hdodenhof.circleimageview.CircleImageView
            android:layout_marginEnd="@dimen/activity_horizontal_margin"
            android:layout_marginStart="@dimen/activity_horizontal_margin"
            android:src="@drawable/bp"
            android:layout_weight="1.4"
            android:layout_width="0dp"
            android:layout_height="match_parent" />


        <RelativeLayout
            android:layout_weight="0.8"
            android:layout_width="wrap_content"
            android:layout_height="100dp">

            <ImageView
                android:backgroundTint="@color/green"
                android:background="@drawable/circle1"
                android:layout_width="0dp"
                android:layout_height="100dp" />

            <TextView
                android:layout_centerInParent="true"
                android:textAppearance="@style/TextAppearance.AppCompat.Medium"
                android:text="140/80"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content" />

        </RelativeLayout>


    </LinearLayout>


</developer.shivam.library.CrescentoContainer>

I am using CrescentoContainer for bottom curve images and KenBurnsView for animated image. Sometimes I also getting out of memory error.

Ankur Khandelwal
  • 269
  • 1
  • 4
  • 17
  • are you talking about left and right circle ? – Radhey Nov 28 '16 at 13:30
  • yes. right and left circle @Radhey – Ankur Khandelwal Nov 28 '16 at 13:32
  • why you are used CrescentoContainer ? de.hdodenhof.circleimageview.CircleImageView is enough for circular imageview? any reason? – Radhey Nov 28 '16 at 13:36
  • curve the bottom of the image – Ankur Khandelwal Nov 28 '16 at 13:40
  • oks , just replace both ImageView with de.hdodenhof.circleimageview.CircleImageView in your relative layout . – Radhey Nov 28 '16 at 13:46
  • PLUS , android:layout_width="0dp", android:layout_height="100dp" ?? why this !give the value to wrap_content or 100dp for testing purpose both for width and height. – Radhey Nov 28 '16 at 13:48
  • if i set the imageview width to wrap content than it disappear. If i set it to 100dp then it will create problem different screen size – Ankur Khandelwal Nov 28 '16 at 14:30
  • you can manage that hard coded width and height later on with @dimensions for different screen size ,not too worry about it .just set fixed that value and let me know image is display or not in circular .] – Radhey Nov 29 '16 at 04:50
  • and yes one more thing I am getting OUT OF MEMORY error sometimes after I have added both the library. If you have any idea then why this is happening. – Ankur Khandelwal Nov 29 '16 at 06:28
  • and also Android Studio becomes very slow. – Ankur Khandelwal Nov 29 '16 at 06:29
  • actually no need to use de.hdodenhof.circleimageview.CircleImageView also ,#universal image loader provide circular imageview also in efficient way.just replace that library with universal image loader and about your slow speed its not related issue . – Radhey Nov 29 '16 at 06:32
  • hey, I have the changes as you said. But right now I am getting all image for equal size. what can I do? – Ankur Khandelwal Nov 29 '16 at 09:01
  • now set margin -10dp to that middle image view (its quick fix) – Radhey Nov 29 '16 at 09:14

0 Answers0