fossasia / open-event-droidgen

Open Event Android App Generator https://github.com/fossasia/open-event-android/raw/apk/sample-apk-fossasia17-development.apk
GNU General Public License v3.0
2.06k stars 828 forks source link

ic_launcher icon does not render in navigation header #2361

Closed ParthivMangukiya closed 6 years ago

ParthivMangukiya commented 6 years ago

Actual Behaviour

ic_launcher icon does not render in navigation header in apk generated by apk generator.

Expected Behaviour

ic_launcher icon should render in navigation header.

Steps to reproduce it

  1. Generate apk from samples provided in https://github.com/fossasia/open-event/tree/master/sample through apk generator.
  2. Open navigation drawer.

Screenshots of the issue

20180310_151547

Would you like to work on the issue?

yes

ParthivMangukiya commented 6 years ago

This is happening because ic_launcher image is too big to render. Apk generator directly resize file by asuming that logo.png provided in sample is ldpi size and with reference to it generates mdpi,hdpi format. Whether should I make change in apk generator to resize logo image to size required for app OR should I make change in app to resize the image generated by apk generator?

iamareebjamal commented 6 years ago

The generator should already be resizing the images, it not, please fix the generator

ParthivMangukiya commented 6 years ago

@iamareebjamal I found that logo_url used in googleio17 sample is /images/io_logo.png and it is not able to download image using that url so image does not render. I added on error resource id in setNavHeader function and made PR. Please Review.

iamareebjamal commented 6 years ago

Then it is not the issue with the app, rather with the sample

ParthivMangukiya commented 6 years ago

@iamareebjamal I think even if this is issue of sample, It is good to set placeholder image rather than showing blank instead(There may happen any kind of error during downloading image from url).

iamareebjamal commented 6 years ago

Agreed