android.support.v4.widget.CircleImageView does not work

circular imageview android not working
circleimageview scaletype not working
circle imageview android studio example
circleimageview glide
rounded imageview android github
circular imageview with shadow android
how to create the circle image in android studio kotlin
de hdodenhof/circleimageview circleimageview shadow

when I try to use : android.support.v4.widget.CircleImageView

        <android.support.v4.widget.CircleImageView
                android:id="@+id/picture"
                android:layout_width="100dp"
                android:layout_height="100dp"
                android:layout_gravity="center_vertical"
                android:src="@drawable/ic_bg" />

it makes my app crash

how to support new Material Design Widget CircleImageView

is there any example use this new widget

Logcat

  java.lang.RuntimeException: Unable to start activity ComponentInfo{com.vogella.android.recyclerview/com.vogella.android.recyclerview.MainActivity}: android.view.InflateException: Binary XML file line #9: Error inflating class android.support.v4.widget.CircleImageView
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2255)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2309)
        at android.app.ActivityThread.access$700(ActivityThread.java:157)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1289)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:176)
        at android.app.ActivityThread.main(ActivityThread.java:5317)
        at java.lang.reflect.Method.invokeNative(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:511)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
        at dalvik.system.NativeStart.main(Native Method)
 Caused by: android.view.InflateException: Binary XML file line #9: Error inflating class android.support.v4.widget.CircleImageView
        at

The CircleImageView is a private class of the support library and cannot be used. But it is easy to create this effect yourself without the CircleImageView. You just need to define a <shape /> drawable with a transparent circle in the middle similar to this:

<shape
    android:innerRadius="0dp"
    android:shape="ring"
    android:thicknessRatio="1"
    android:useLevel="false" >

    <solid android:color="@android:color/transparent" />

    <stroke
        android:width="100dp"
        android:color="#FFFFFFFF" />
</shape>

After that just combine the image you want to display in the ImageView with the <shape /> drawable from above in a LayerList like this:

<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:drawable="@drawable/your_image" />
    <item android:drawable="@drawable/circle" />
</layer-list>

If the image you want to display is dynamic then you can create the LayerList programmatically!

v4/java/android/support/v4/widget/CircleImageView.java, Animation;. import android.widget.ImageView;. /**. * Private class created to work around issues with AnimationListeners being. * called before the animation is  The CircleImageView is a private class of the support library and cannot be used. But it is easy to create this effect yourself without the CircleImageView. You just need to define a <shape /> drawable with a transparent circle in the middle similar to this: <shape android:innerRadius=

I found a replacement for android.support.v4.widget.CircleImageView.

<de.hdodenhof.circleimageview.CircleImageView
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/meal_image_order"
android:layout_width="96dp"
android:layout_height="96dp"
android:src="@drawable/menu1"
app:civ_border_width="2dp"
app:civ_border_color="@color/white"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true" />

Library link: https://github.com/hdodenhof/CircleImageView

android.support.v4.widget.CircleImageView does not work , CircleImageView does not work. Posted by: admin January 9, 2018 Leave a comment. Questions: when I try to use : android.support.v4.widget.​CircleImageView android,circle,material-design, android.support.v4.widget.CircleImageView does not work The CircleImageView is a private class of the support library and cannot be used. But it is easy to create this effect yourself without the CircleImageView.

CircleImageView is a private class from v4, so basically you can't use it. It is used internally for rendering the progress circle in a SwipeRefreshLayout, but is not meant to be inflated by yourself.

See here for reference.

android-support-v4/CircleImageView.java at master · futuresimple , Animation;. import android.widget.ImageView;. /**. * Private class created to work around issues with AnimationListeners being. * called before the animation is  CircularProgressDrawable: Drawable that renders the animated indeterminate progress indicator in the Material design style without depending on API level 11.

If you want to do it in a native style just use this snippet

            <android.support.v7.widget.CardView
                android:id="@+id/view2"
                android:layout_width="45dp"
                android:layout_height="45dp"
                android:background="#ffffff"
                android:shape="ring"
                app:cardCornerRadius="23dp">

                <ImageView
                    android:id="@+id/profile_img_post"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:layout_alignParentTop="true"
                    android:layout_centerHorizontal="true"
                    android:scaleType="centerCrop"
                    android:src="@drawable/test_img"></ImageView>
            </android.support.v7.widget.CardView>

hdodenhof/CircleImageView, RippleDrawable', referenced from method android.support.v7.widget. I also facing this issues on API 19, here are the xml. And I did apply the  Your customizable and curated collection of the best in trusted news plus coverage of sports, entertainment, money, weather, travel, health and lifestyle, combined with Outlook/Hotmail, Facebook

This is what worked for me

xml layout:

  <de.hdodenhof.circleimageview.CircleImageView
            android:id="@+id/picid"
            android:layout_width="270dp"
            android:layout_height="270dp"
            android:src="@drawable/avatar_small"
            android:layout_marginTop="25dp"
            />

Java code:

CircleImageView pic = (de.hdodenhof.circleimageview.CircleImageView)rootView.findViewById(R.id.picid);

android.support.v4.widget.CircleImageView does not work, Я нашел решение, которое используют этот виджет альтернативу android.​support.v4.widget.CircleImageView <de.hdodenhof.circleimageview. Official Google Voice Help Center where you can find tips and tutorials on using Google Voice and other answers to frequently asked questions.

android.support.v4.widget.CircleImageView не работает, Best Java code snippets using android.support.v4.widget. Set to true if there is no view at a higher z-order than * where the progress spinner is set to appear. Stay protected and in control. Google Play Protect, regular security updates and control over how your data is shared. We’re dedicated to securing Android’s 2.5 billion+ active devices every day and keeping information private.

android.support.v4.widget.CircleImageView java code examples , cuando intento usar: Android.support.v4.widget.CircleImageView CircleImageView Android:id="@+id/picture" Android:layout_width="100dp" ZygoteInit$MethodAndArgsCaller.run(ZygoteInit. 20 may. 2015 Xaver Kapeller. CircleImageView es una clase privada de v4 , así que básicamente no puedes usarla. Se utiliza  Common Problems & Fixes For Port Forwarding. By Shane C. of PcWinTech.com . Port forwarding can sometimes be a rather big pain in the butt. Depending on which router the person has (Some routers are easier than others at setting up port forwarding rules) it can be easy to setup, but not easy to get working.

android, A smart home operating system (OS) connects virtually all of the technology in your home. With Control4 Smart Home OS 3, you and your family can control nearly every device and system in the house in ways that are easy and fun to use. Learn More About OS 3. Finally, an interface that you can depend on and operate with ease! Way beyond my

Comments
  • this is my logcat my friend
  • is there any example use this new widget
  • @MaherIsmaail You can't just edit somebody else's answer like that. I have rolled back the edit for now.
  • i put it on the linear Layout. doesn't work.
  • In that link I did not see the library to download, just source code. Can you please give more details on how to add this custom view to an app?
  • @Zvi you must be using gradle. it is mentioned here github.com/hdodenhof/CircleImageView#gradle
  • @Abhishek I know that and I have added to my gradle 'compile 'de.hdodenhof:circleimageview:2.0.0''. But it needs a file (maybe a jar or a libraray) for circleimageview. Doesn't it?
  • @Zvi just do project build gradle will automatically add the required files to your project.
  • Replace app:border_width="2dp" app:border_color="@color/white" by app:civ_border_width="2dp" app:civ_border_color="@color/white" to work
  • It is used internally in the SwipeRefreshLayout. If you just need a image view with a circle outline, there are a lot of questions here on SO.
  • Your answer is good hack. But android:shape="ring" is do nothing here. Just put app:cardCornerRadius="1000dp" (put higher) did the trick. You deserved higher upvote.
  • Oh i was never aware of this property! Cool stuff!