Giter Site home page Giter Site logo

doesn't crop in xml about superimageview HOT 8 CLOSED

cesards avatar cesards commented on July 19, 2024
doesn't crop in xml

from superimageview.

Comments (8)

cesards avatar cesards commented on July 19, 2024

Could you provide more information? Screenshot? Phone? your XML?

from superimageview.

stavkidron avatar stavkidron commented on July 19, 2024

edit: my bad, I got an error after rebuilding the project:

Error:(224) No resource identifier found for attribute 'civ_crop' in package 'com.mypackage'

dependencies in build.gradle:

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:appcompat-v7:25.1.0'
    compile 'com.amazonaws:aws-android-sdk-ec2:2.2.+'
    compile 'com.amazonaws:aws-android-sdk-core:2.2.8'
    compile 'com.amazonaws:aws-android-sdk-cognito:2.2.+'
    compile 'com.android.support:design:25.1.0'
    compile 'com.cesards.android:cropimageview:1.0.2.1'
    testCompile 'junit:junit:4.12'
}

this is my code:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:custom="http://schemas.android.com/apk/res-auto"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent">


    <com.cesards.cropimageview.CropImageView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:src="@drawable/portrait"
        custom:civ_crop="topLeft" />

</LinearLayout>

my image:
image

it looks like this no matter what I write in the civ_crop:
image

from superimageview.

cesards avatar cesards commented on July 19, 2024

Are you using an emulator? A phone? what brind and OS? I need to upload a new version of the library and I want to fix any pending issue :-)

from superimageview.

stavkidron avatar stavkidron commented on July 19, 2024

I'm using the android studio emulator, with android 6.0 (API level 23).

from superimageview.

smarques84 avatar smarques84 commented on July 19, 2024

@cesards I do have the same problem as reported by @stavkidron on a nexus 5X running Android 7.0

Error:(53) No resource identifier found for attribute 'civ_crop' in package 'com.***'

from superimageview.

mirandole avatar mirandole commented on July 19, 2024

I have the same issue

from superimageview.

FernandoWahl avatar FernandoWahl commented on July 19, 2024

I found the problem, the correct name of the attribute is 'crop'. Not 'civ_crop' as in example!

#21

from superimageview.

cesards avatar cesards commented on July 19, 2024

@stavkidron

I'm having a look to this again. I know what's going on. You are using:

android:layout_width="wrap_content"
android:layout_height="wrap_content"

in the image, so that means that if the image is smaller than the parent/screen, it's not going to crop. You should be using match_parent for that to happen. I'm going to close this. Let me know if you keep having problems 👍

from superimageview.

Related Issues (20)

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.