snipt

Ctrl+h for KB shortcuts
#130342

HTML

[android] Efficient, two-level cache-based way to load images to listview

https://code.google.com/p/android-imagedownloader/source/browse/trunk/src/com/example/android/imagedownloader/ImageDownloader.java
https://snipt.net/embed/1da797d69882d6055d62bc8a65e17dd6/
https://snipt.net/raw/1da797d69882d6055d62bc8a65e17dd6/
1da797d69882d6055d62bc8a65e17dd6
html
HTML
1
2014-04-16T20:00:12
True
False
Apr 15, 2014 at 07:26 PM
/api/public/snipt/130342/
android-efficient-two-level-cache-based-way-to-load-images-to-listview
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a>https://code.google.com/p/android-imagedownloader/source/browse/trunk/src/com/example/android/imagedownloader/ImageDownloader.java </span></pre></div> </td></tr></table>
adapter, android, java, list, listadapter, listview
#130273

HTML

Android - Programatically (un)lock screen orientation [untested]

http://eigo.co.uk/labs/lock-screen-orientation-in-android/
https://snipt.net/embed/27a3b8ec3258bddb555f115967b03329/
https://snipt.net/raw/27a3b8ec3258bddb555f115967b03329/
27a3b8ec3258bddb555f115967b03329
html
HTML
1
2014-04-16T16:32:03
True
False
Apr 15, 2014 at 02:52 PM
/api/public/snipt/130273/
android-programatically-unlock-screen-orientation-untested
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a>http://eigo.co.uk/labs/lock-screen-orientation-in-android/ </span></pre></div> </td></tr></table>
android, changes, config, configuration, orientation, rotate, screen, untested
#122884

HTML

[Open source] Get your app localized for free

https://crowdin.net/page/open-source-project-setup-request
https://snipt.net/embed/983b93383ddf672e57ecc52186948c03/
https://snipt.net/raw/983b93383ddf672e57ecc52186948c03/
983b93383ddf672e57ecc52186948c03
html
HTML
1
2014-04-13T17:05:58
True
False
Mar 18, 2014 at 03:44 PM
/api/public/snipt/122884/
open-source-get-your-app-localized-for-free
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a>https://crowdin.net/page/open-source-project-setup-request </span></pre></div> </td></tr></table>
android, iOS, localization, mobile
#122585

XML

[Android] Scale ImageView and contained image (format-independent) to min(width, height) keeping scaleRatio

1
2
3
4
5
6
	<ImageView android:id="@+id/YOUR_ID_HERE"
	           android:layout_width="match_parent"
	           android:layout_height="match_parent"
	           android:layout_gravity="center"
	           android:adjustViewBounds="true"
	           android:src="@drawable/YOUR_DRAWABLE_HERE"/>
https://snipt.net/embed/1013bccfd6fac84c79146e1ea0d942a3/
https://snipt.net/raw/1013bccfd6fac84c79146e1ea0d942a3/
1013bccfd6fac84c79146e1ea0d942a3
xml
XML
6
2014-04-16T22:06:38
True
False
Mar 17, 2014 at 04:34 PM
/api/public/snipt/122585/
android-scale-imageview-and-contained-image-format-independent-to-minwidth-height-keeping-scaleratio
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a> <span class="nt">&lt;ImageView</span> <span class="na">android:id=</span><span class="s">&quot;@+id/YOUR_ID_HERE&quot;</span> </span><span id="L-2"><a name="L-2"></a> <span class="na">android:layout_width=</span><span class="s">&quot;match_parent&quot;</span> </span><span id="L-3"><a name="L-3"></a> <span class="na">android:layout_height=</span><span class="s">&quot;match_parent&quot;</span> </span><span id="L-4"><a name="L-4"></a> <span class="na">android:layout_gravity=</span><span class="s">&quot;center&quot;</span> </span><span id="L-5"><a name="L-5"></a> <span class="na">android:adjustViewBounds=</span><span class="s">&quot;true&quot;</span> </span><span id="L-6"><a name="L-6"></a> <span class="na">android:src=</span><span class="s">&quot;@drawable/YOUR_DRAWABLE_HERE&quot;</span><span class="nt">/&gt;</span> </span></pre></div> </td></tr></table>
"scale ratio", "scale type", android, expand, height, image, imageview, ratio, scale, scaleratio, scaletype, width