Android rotate ViewPager Image manually (via button click) without rotating phone -


how rotate viewpager image via button click (say clockwise)? way can set phone portrait , let users rotate image while viewing.

when rotate phone, android redraws activity fit landscape mode. results in 2 instance of activity in application.

now, if have kind of static variable instance class none-static inner class, keep reference activity , prevent gc collect to, causing common memory leak orientation rotation.

to fix this, can either change variable non-static, or inner class static well.

if problem still exist, create heap dump, , trace object's path gc root excluding weak references, in eclipse memory analyser. there great video explaining memory leak in android in 2011 google i/o.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -