Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BootstrapCircleThumbnail Error parsing XML: unbound prefix #63

Closed
hatim-haffane opened this issue Nov 14, 2014 · 8 comments
Closed

BootstrapCircleThumbnail Error parsing XML: unbound prefix #63

hatim-haffane opened this issue Nov 14, 2014 · 8 comments

Comments

@hatim-haffane
Copy link

hello
i'm trying to integrate the BootstrapCircleThumbnail on my list item , but when i call it i get this error error: Error parsing XML: unbound prefix.

Here is my code

            <com.beardedhen.androidbootstrap.BootstrapCircleThumbnail
                android:id="@+id/txt_long_desc"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                bootstrap:bct_image="@drawable/ic_taxi_detail_phone"
                bootstrap:bct_size="large" />
     </LinearLayout>
@theDazzler
Copy link
Contributor

Inside the xml of your BootstrapCircleThumbnail you need to use the same name you declared at the top of your file. You don't have "bootstrap" declared anywhere. You have "xmlns:bootstrapbutton" and "xmlns:fontawesometext"

@hatim-haffane
Copy link
Author

even if i add the BootstrapCircleThumbnail ="http://schemas.android.com/apk/res-auto" i still get the error

@theDazzler
Copy link
Contributor

You can call it whatever you want on top, but you have to use that name inside the view. If you add this,

bootstrapthumbnail="http://schemas.android.com/apk/res-auto"

Then you need to change this

bootstrap:bct_image="@drawable/ic_taxi_detail_phone"
bootstrap:bct_size="large"

to this

bootstrapthumbnail="@drawable/ic_taxi_detail_phone"
bootstrapthumbnail="large"

All you need at the top is this though:

bootstrap="http://schemas.android.com/apk/res-auto"

You don't need all three like this

bootstrapbutton="http://schemas.android.com/apk/res-auto"
bootstrapthumbnail="http://schemas.android.com/apk/res-auto"
fontawesometext="http://schemas.android.com/apk/res-auto"

Then just use the name "bootstrap" everywhere you use custom attributes

@jamie-beardedhen
Copy link
Contributor

I've updated the readme just in case someone comes across this again in future. The comments already cover it very well, so I'm closing this ticket - feel free to comment again if you're still having problems.

@hatim-haffane
Copy link
Author

thanks for your help its works now , but i have a small question , what is the best image size for each size the BootstrapCircleThumbnail ???

@jamie-beardedhen
Copy link
Contributor

The BootstrapCircleThumbnail sizes (dp) are pasted below, so you should aim for them if you're looking to save space.

private static final int SIZE_SMALL = 48; //dp total size (outer circle)
private static final int SIZE_MEDIUM = 80;//dp
private static final int SIZE_LARGE = 112;//dp
private static final int SIZE_XLARGE = 176;//dp

@hatim-haffane
Copy link
Author

hello , sorry for all this questions , so i want to ask you if i can do a .getDrawable(); from the BootstrapCircleThumbnail , and also i cant make the image show properly on the BootstrapCircleThumbnail , thanks

@jamie-beardedhen
Copy link
Contributor

Can you create a separate issue for these image issues and post whatever code you've written? BootstrapCircleThumbnail doesn't have a getDrawable() method, why do you need to use that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants