GithubHelp home page GithubHelp logo

Comments (19)

dmitry-zaitsev avatar dmitry-zaitsev commented on June 21, 2024

@HAndroid Hello, thanks for your reply.

Can you provide your XML layout file?
Also, make sure that you added CircleLayout as Android Library to your project.

from circlelayout.

HAndroid avatar HAndroid commented on June 21, 2024

Yes. Circle Layout is added as Library ..
Kindly find below the XML

<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/com.Tests.CircleTest"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/bg"
tools:context=".MainActivity" >

<ImageView
    android:id="@+id/menu_top"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_alignParentTop="true"
    android:scaleType="centerCrop"
    android:src="@drawable/top" />

<ru.biovamp.widget.CircleLayout
    android:id="@+id/circle"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_above="@+id/menu_bottom"
    android:layout_below="@+id/menu_top"
    android:visibility="gone"
    app:angleOffset="90" >

    <ImageButton
        android:layout_width="100dp"
        android:layout_height="100dp"
        android:background="@android:color/transparent"
        android:scaleType="fitXY"
        android:src="@drawable/on" />

    <ImageButton
        android:layout_width="100dp"
        android:layout_height="100dp"
        android:background="@android:color/transparent"
        android:scaleType="fitXY"
        android:src="@drawable/on" />

    <ImageButton
        android:layout_width="100dp"
        android:layout_height="100dp"
        android:background="@android:color/transparent"
        android:scaleType="fitXY"
        android:src="@drawable/on" />

    <ImageButton
        android:layout_width="100dp"
        android:layout_height="100dp"
        android:background="@android:color/transparent"
        android:scaleType="fitXY"
        android:src="@drawable/on" />

    <ImageButton
        android:layout_width="100dp"
        android:layout_height="100dp"
        android:background="@android:color/transparent"
        android:scaleType="fitXY"
        android:src="@drawable/on" />

    <ImageButton
        android:layout_width="100dp"
        android:layout_height="100dp"
        android:background="@android:color/transparent"
        android:scaleType="fitXY"
        android:src="@drawable/on" />


</ru.biovamp.widget.CircleLayout>

<ImageView
    android:id="@+id/menu_bottom"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_alignParentBottom="true"
    android:scaleType="centerCrop"
    android:src="@drawable/bottom" />

</RelativeLayout>

from circlelayout.

HAndroid avatar HAndroid commented on June 21, 2024

I also tried to use your same XML example, and got same inflating error, can't find what is missing..

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res/com.Tests.CircleTest"
android:layout_width="match_parent"
android:layout_height="match_parent" >


<ru.biovamp.widget.CircleLayout
    android:id="@+id/normal"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@android:color/white"
    android:visibility="gone"
    app:angleOffset="90" >

    <View
        android:layout_width="50dp"
        android:layout_height="50dp"
        android:background="#ff0000" />

    <View
        android:layout_width="50dp"
        android:layout_height="50dp"
        android:background="#00ff00" />

    <View
        android:layout_width="50dp"
        android:layout_height="50dp"
        android:background="#0000ff" />

    <View
        android:layout_width="50dp"
        android:layout_height="50dp"
        android:background="#ffff00" />

    <View
        android:layout_width="50dp"
        android:layout_height="50dp"
        android:background="#ff00ff" />
</ru.biovamp.widget.CircleLayout>



 </FrameLayout>

from circlelayout.

dmitry-zaitsev avatar dmitry-zaitsev commented on June 21, 2024

Are you getting this error during build or at runtime?

from circlelayout.

HAndroid avatar HAndroid commented on June 21, 2024

And this is screenshot for library:
library

from circlelayout.

HAndroid avatar HAndroid commented on June 21, 2024

During Runtime

from circlelayout.

dmitry-zaitsev avatar dmitry-zaitsev commented on June 21, 2024

Can you please post your LogCat trace here?

from circlelayout.

HAndroid avatar HAndroid commented on June 21, 2024

Below is complete LogCat for the XML same to example, so inflating is at line 8 instead of 29:

04-09 16:38:44.265: W/dalvikvm(22382): VFY: unable to resolve static field 890 (CircleLayout) in Lru/biovamp/widget/R$styleable;
04-09 16:38:44.285: D/dalvikvm(22382): VFY: replacing opcode 0x62 at 0x0029
04-09 16:38:44.285: D/dalvikvm(22382): VFY: dead code 0x002b-0097 in Lru/biovamp/widget/CircleLayout;. (Landroid/content/Context;Landroid/util/AttributeSet;)V
04-09 16:38:44.295: D/AndroidRuntime(22382): Shutting down VM
04-09 16:38:44.295: W/dalvikvm(22382): threadid=1: thread exiting with uncaught exception (group=0x2aac8578)
04-09 16:38:44.305: E/AndroidRuntime(22382): FATAL EXCEPTION: main
04-09 16:38:44.305: E/AndroidRuntime(22382): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.Tests.CircleTest/com.Tests.CircleTest.MainActivity}: android.view.InflateException: Binary XML file line #8: Error inflating class ru.biovamp.widget.CircleLayout
04-09 16:38:44.305: E/AndroidRuntime(22382): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1659)
04-09 16:38:44.305: E/AndroidRuntime(22382): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1675)
04-09 16:38:44.305: E/AndroidRuntime(22382): at android.app.ActivityThread.access$1500(ActivityThread.java:121)
04-09 16:38:44.305: E/AndroidRuntime(22382): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:943)
04-09 16:38:44.305: E/AndroidRuntime(22382): at android.os.Handler.dispatchMessage(Handler.java:99)
04-09 16:38:44.305: E/AndroidRuntime(22382): at android.os.Looper.loop(Looper.java:138)
04-09 16:38:44.305: E/AndroidRuntime(22382): at android.app.ActivityThread.main(ActivityThread.java:3701)
04-09 16:38:44.305: E/AndroidRuntime(22382): at java.lang.reflect.Method.invokeNative(Native Method)
04-09 16:38:44.305: E/AndroidRuntime(22382): at java.lang.reflect.Method.invoke(Method.java:507)
04-09 16:38:44.305: E/AndroidRuntime(22382): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:878)
04-09 16:38:44.305: E/AndroidRuntime(22382): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:636)
04-09 16:38:44.305: E/AndroidRuntime(22382): at dalvik.system.NativeStart.main(Native Method)
04-09 16:38:44.305: E/AndroidRuntime(22382): Caused by: android.view.InflateException: Binary XML file line #8: Error inflating class ru.biovamp.widget.CircleLayout
04-09 16:38:44.305: E/AndroidRuntime(22382): at android.view.LayoutInflater.createView(LayoutInflater.java:518)
04-09 16:38:44.305: E/AndroidRuntime(22382): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:570)
04-09 16:38:44.305: E/AndroidRuntime(22382): at android.view.LayoutInflater.rInflate(LayoutInflater.java:623)
04-09 16:38:44.305: E/AndroidRuntime(22382): at android.view.LayoutInflater.inflate(LayoutInflater.java:408)
04-09 16:38:44.305: E/AndroidRuntime(22382): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
04-09 16:38:44.305: E/AndroidRuntime(22382): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
04-09 16:38:44.305: E/AndroidRuntime(22382): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:207)
04-09 16:38:44.305: E/AndroidRuntime(22382): at android.app.Activity.setContentView(Activity.java:1657)
04-09 16:38:44.305: E/AndroidRuntime(22382): at com.Tests.CircleTest.MainActivity.onCreate(MainActivity.java:12)
04-09 16:38:44.305: E/AndroidRuntime(22382): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
04-09 16:38:44.305: E/AndroidRuntime(22382): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1623)
04-09 16:38:44.305: E/AndroidRuntime(22382): ... 11 more
04-09 16:38:44.305: E/AndroidRuntime(22382): Caused by: java.lang.reflect.InvocationTargetException
04-09 16:38:44.305: E/AndroidRuntime(22382): at java.lang.reflect.Constructor.constructNative(Native Method)
04-09 16:38:44.305: E/AndroidRuntime(22382): at java.lang.reflect.Constructor.newInstance(Constructor.java:415)
04-09 16:38:44.305: E/AndroidRuntime(22382): at android.view.LayoutInflater.createView(LayoutInflater.java:505)
04-09 16:38:44.305: E/AndroidRuntime(22382): ... 21 more
04-09 16:38:44.305: E/AndroidRuntime(22382): Caused by: java.lang.NoClassDefFoundError: ru.biovamp.widget.R$styleable
04-09 16:38:44.305: E/AndroidRuntime(22382): at ru.biovamp.widget.CircleLayout.(CircleLayout.java:87)
04-09 16:38:44.305: E/AndroidRuntime(22382): ... 24 more

from circlelayout.

dmitry-zaitsev avatar dmitry-zaitsev commented on June 21, 2024

Looks like that CircleLayout isn't added. Since you've provided screenshot, it looks like that you need to build it manually.

Select CircleLayout in your project list. Then in menu (that one on the top) Project->Build.

from circlelayout.

HAndroid avatar HAndroid commented on June 21, 2024

The option was build automatically .. But i removed the automatic build, built it manually again, re added it to my project and still same error :(

from circlelayout.

dmitry-zaitsev avatar dmitry-zaitsev commented on June 21, 2024

Try to change your build target to latest version (4.1.2).

Actually, always consider building with latest version of SDK (buildTarget != min SDK version supported, so don't worry).

from circlelayout.

HAndroid avatar HAndroid commented on June 21, 2024

Greaaat, the runtime inflating error solved now with build Target 16 :)
But sorry another issue arised, nothing is drawn, just an empty screen :(

from circlelayout.

dmitry-zaitsev avatar dmitry-zaitsev commented on June 21, 2024

Which layout you are using? If your own - remove visibility="gone" :)

from circlelayout.

HAndroid avatar HAndroid commented on June 21, 2024

Thanks a million for help and time :))))) it is great now ..

from circlelayout.

HAndroid avatar HAndroid commented on June 21, 2024

Just a last question please, do you have the calculations restricting the views to 50 dp width and height like the example? cause when i try to make higher , it doesn't fit the screen.. screenshot below for 100 dp.... yellow and green ones got cropped ..
screenshot circle test

from circlelayout.

dmitry-zaitsev avatar dmitry-zaitsev commented on June 21, 2024

There is no restrictions. This is how CircleLayout calculates its size now - it can't perform automatic resizing of views. If this is required - please, create new issue and I'll try to implement this feature.

from circlelayout.

HAndroid avatar HAndroid commented on June 21, 2024

It will be helpful to have such feature..
Anyway no worry, i don't want to waste your time, i will try to manage it ..
Many thanks for your help, I am new to github and didn't know how to recommend your code, so just starred the repo, if any other way, please let me know.. thanks again for your help ..

from circlelayout.

dmitry-zaitsev avatar dmitry-zaitsev commented on June 21, 2024

@HAndroid thanks for your attention. If you're happy with this library - this is enough for me )

from circlelayout.

nikolaykuz avatar nikolaykuz commented on June 21, 2024

Seems like I had the same problem. I will read this topic and example when back to Android development.
Thanks, Dmitry.

from circlelayout.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.