<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>quickcontact badge &#8211; Alessandro Crugnola &#8211; sephiroth.it</title>
	<atom:link href="https://blog.sephiroth.it/tag/quickcontact-badge/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.sephiroth.it</link>
	<description>programmer by pure chance</description>
	<lastBuildDate>Wed, 13 Jul 2011 20:27:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://blog.sephiroth.it/wp-content/uploads/2019/03/cropped-sepy-big-32x32.png</url>
	<title>quickcontact badge &#8211; Alessandro Crugnola &#8211; sephiroth.it</title>
	<link>https://blog.sephiroth.it</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>QuickActionView in Android</title>
		<link>https://blog.sephiroth.it/2011/07/09/quickactionview-in-android/</link>
					<comments>https://blog.sephiroth.it/2011/07/09/quickactionview-in-android/#comments</comments>
		
		<dc:creator><![CDATA[Alessandro Crugnola]]></dc:creator>
		<pubDate>Sat, 09 Jul 2011 19:24:41 +0000</pubDate>
				<category><![CDATA[android]]></category>
		<category><![CDATA[quickaction]]></category>
		<category><![CDATA[quickcontact badge]]></category>
		<guid isPermaLink="false">http://blog.sephiroth.it/?p=1559</guid>

					<description><![CDATA[While I was searching for an custom implementation of the QuickContactBadge for Android, I went into this interesting post ( Lorenz&#8217;s Blog ), which had a custom widget called QuickAction. While it&#8217;s a very nice widget, it didn&#8217;t fit my needs because I had the necessity of create different action layouts ( horizontal, vertical, grid.. &#8230; <a href="https://blog.sephiroth.it/2011/07/09/quickactionview-in-android/" class="more-link">Continue reading <span class="screen-reader-text">QuickActionView in Android</span></a>]]></description>
										<content:encoded><![CDATA[<p>While I was searching for an custom implementation of the <a href="http://developer.android.com/reference/android/widget/QuickContactBadge.html" target="_blank">QuickContactBadge</a> for Android, I went into this <a href="http://bit.ly/qU8vTQ" target="_blank">interesting post</a> ( <strong>Lorenz’s Blog</strong> ), which had a custom widget called <strong>QuickAction</strong>.<br />
While it&#8217;s a very nice widget, it didn&#8217;t fit my needs because I had the necessity of create different action layouts ( horizontal, vertical, grid.. ), so I made a very quick modification to the above code and I ended with this implementation.<br />
Basically I removed from the original Class the ActionItem list and set a <strong>BaseAdapter</strong> as content source. In this way it&#8217;s more simple and easy to add more and different views to the widget.<br />
Moreover I added the support for columns ( both fixed and automatic ).<br />
Here you can see a snippet code of the <strong>QuickActionView</strong> creation:</p>
<p>[cc lang=&#8221;java&#8221;]<br />
public void onButtonClick( View v ) {</p>
<p>	// create the quick action view, passing the view anchor<br />
	QuickActionView qa = QuickActionView.Builder( v );</p>
<p>	// set the adapter<br />
	qa.setAdapter( new CustomAdapter( this ) );</p>
<p>	// set the number of columns ( setting -1 for auto )<br />
	qa.setNumColumns( (int) (2 + (Math.random() * 10)) );<br />
	qa.setOnClickListener( new DialogInterface.OnClickListener() {</p>
<p>		@Override<br />
		public void onClick( DialogInterface dialog, int which ) {<br />
			dialog.dismiss();<br />
			Toast.makeText( getBaseContext(), &#8220;Selected item: &#8221; + which, Toast.LENGTH_SHORT ).show();<br />
		}<br />
	} );</p>
<p>	// finally show the view<br />
	qa.show();<br />
}<br />
[/cc]</p>
<p>Here some Screenshots:</p>

<a href='https://blog.sephiroth.it/wp-content/uploads/2011/07/device-2011-07-09-144935.png'><img decoding="async" width="150" height="150" src="https://blog.sephiroth.it/wp-content/uploads/2011/07/device-2011-07-09-144935-150x150.png" class="attachment-thumbnail size-thumbnail" alt="" /></a>
<a href='https://blog.sephiroth.it/wp-content/uploads/2011/07/device-2011-07-09-144920.png'><img decoding="async" width="150" height="150" src="https://blog.sephiroth.it/wp-content/uploads/2011/07/device-2011-07-09-144920-150x150.png" class="attachment-thumbnail size-thumbnail" alt="" /></a>
<a href='https://blog.sephiroth.it/wp-content/uploads/2011/07/device-2011-07-09-144859.png'><img decoding="async" width="150" height="150" src="https://blog.sephiroth.it/wp-content/uploads/2011/07/device-2011-07-09-144859-150x150.png" class="attachment-thumbnail size-thumbnail" alt="" /></a>

<p>And here you can find the source code: <strong><a href="https://blog.sephiroth.it/wp-content/uploads/2011/07/quickactionviewdemo.zip">source code</a></strong></p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.sephiroth.it/2011/07/09/quickactionview-in-android/feed/</wfw:commentRss>
			<slash:comments>11</slash:comments>
		
		
			</item>
	</channel>
</rss>
