tdscientist / ShelfView

Android custom view to display books on shelf

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Back Ground color issue

ayush18verma opened this issue · comments

Have this library , all the books have default background color white?

If yes, Make it transparent.

Am using another images which is png , but all the images showing background color white. Please resolve it soon. Thanks.

@ayush18verma The default background is transparent. The white background is from Picasso; ain't got control over that.
Also can you share your code snippet on how you're loading the ShelfView.

ShelfView shelfView = (ShelfView) rootView.findViewById(R.id.shelfView);
shelfView.setOnBookClicked(this);
ArrayList model = new ArrayList<>();

    model.add(new BookModel("med_drvisit", "1", "Doctor"));

    model.add(new BookModel("nurse", "2","Nursing"));

    model.add(new BookModel("physio", "3", "Physio"));

    model.add(new BookModel("diagnostic", "4","Diagnosis"));

    model.add(new BookModel("dietician", "5","Dietician"));

    model.add(new BookModel("dentist", "6", "Dentist"));

    model.add(new BookModel("caregivers", "7","Patient Caregivers" ));

    model.add(new BookModel("ambulance", "8","Ambulance"));

    model.add(new BookModel("delivery", "9","Medicines"));

    model.add(new BookModel("counselling", "10","Counselling"));

    shelfView.loadData(model, ShelfView.BOOK_SOURCE_DRAWABLE_FOLDER);

(https://cloud.githubusercontent.com/assets/10360656/23064240/de47cc8c-f534-11e6-83c6-871f3e0ffcc0.png)

@ayush18verma The book covers are meant to be rectangular in shape..just like a real book..your images don't meet that criterium..More so, Picasso is responsible for the white-like background. It's beyond my control.
Use images like http://devproconnections.com/site-files/devproconnections.com/files/uploads/2014/06/Riley%20DCM1061%20Pro_Android_book_cover.jpg

Ok thanks.