I have added the cresentroContainer for rounded image bottom and KenBurnsView library to animate the image. After that I am getting out of memory error and also android studio become very slow.
Asked
Active
Viewed 860 times
0
-
1are you using bitmaps for images? – Sam Nov 29 '16 at 07:00
-
no.. I am assigning image using xml. using android:src – Ankur Khandelwal Nov 29 '16 at 07:02
2 Answers
1
You would have large images (perhaps large w.r.t your current device whihch has lower heap size in which you are testing) in your drawable, which you are assigning to your views in XML. You can downscale your images and then assign to views programticaly, for downscaling simply load your images via Picasso or Glid. Also You can do android:largeHeap = "true" in your manifest under application tag which is obviously not recommended by many of programmers.

Junaid Hafeez
- 1,618
- 1
- 16
- 25
-
if I use any universal image loader, then my app size will also increases.. I don't want that – Ankur Khandelwal Nov 29 '16 at 07:24
0
Since that library make use of images just update your manifest as,
<application
android:name=".MyApplication"
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="Mall"
android:largeHeap="true"
android:logo="@drawable/logo_for_up"
android:screenOrientation="portrait"
android:theme="@style/AppTheme" >
</application>

Manoj Perumarath
- 9,337
- 8
- 56
- 77