<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>nEx.Software</title>
	
	<link>http://nexsoftware.net/wp</link>
	<description />
	<lastBuildDate>Thu, 09 May 2013 14:27:20 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/nexsoftware" /><feedburner:info uri="nexsoftware" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:browserFriendly></feedburner:browserFriendly><item>
		<title>LibGDX – Making a Paged Level Selection Screen</title>
		<link>http://nexsoftware.net/wp/2013/05/09/libgdx-making-a-paged-level-selection-screen/</link>
		<comments>http://nexsoftware.net/wp/2013/05/09/libgdx-making-a-paged-level-selection-screen/#comments</comments>
		<pubDate>Thu, 09 May 2013 14:27:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[libgdx]]></category>

		<guid isPermaLink="false">http://nexsoftware.net/wp/?p=285</guid>
		<description><![CDATA[Welp, it looks like it has been about a year since my last post, so I figured I&#8217;d get something up here before a full year went by. Today, I&#8217;ll be going over some code I put together to make a paged level selection screen with LibGDX&#8217;s Scene2D package. I endearingly refer to this as [...]]]></description>
				<content:encoded><![CDATA[            <script type="text/javascript" src="http://nexsoftware.net/wp/wp-content/plugins/wordpress-code-snippet/scripts/shBrushJava.js"></script>
            <script type="text/javascript" src="http://nexsoftware.net/wp/wp-content/plugins/wordpress-code-snippet/scripts/shBrushXml.js"></script>
<p>Welp, it looks like it has been about a year since my last post, so I figured I&#8217;d get something up here before a <em>full</em> year went by. Today, I&#8217;ll be going over some code I put together to make a paged level selection screen with LibGDX&#8217;s Scene2D package. I endearingly refer to this as Angry Birds style, but it&#8217;s obviously not exclusive to Angry Birds and has found it&#8217;s way into countless games and apps. Anyway, continuing on&#8230;</p>
<p>First of all, a screenshot of what we will be making. Note, I am not an artist, so I will just be using the basic skin as can be found in the <a href="https://github.com/libgdx/libgdx/tree/master/tests">LibGDX Tests</a> project. You&#8217;ll obviously want to use your imagination to make it nicer looking.</p>
<p><a href="http://nexsoftware.net/wp/wp-content/uploads/2013/05/device-2013-05-09-062247.png"><img src="http://nexsoftware.net/wp/wp-content/uploads/2013/05/device-2013-05-09-062247-300x180.png" alt="device-2013-05-09-062247" width="300" height="180" class="aligncenter size-medium wp-image-296" /></a></p>
<p><a href="http://nexsoftware.net/wp/wp-content/uploads/2013/05/device-2013-05-09-062327.png"><img src="http://nexsoftware.net/wp/wp-content/uploads/2013/05/device-2013-05-09-062327-300x180.png" alt="device-2013-05-09-062327" width="300" height="180" class="aligncenter size-medium wp-image-297" /></a></p>
<p>There, isn&#8217;t that nice? Still pictures don&#8217;t really do it justice but I am on a time limit here so they&#8217;ll have to do.<br />
<span id="more-285"></span><br />
The best part is, Scene2D already provides most everything we need to accomplish this so we&#8217;ll have very minimal code to introduce the concept of pages, handle centering on the nearest page after completing a scroll or fling, and loading a button will all of our fancy images and text.</p>
<hr />
<p>First, we&#8217;ll make a subclass of <a href="http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/scenes/scene2d/ui/ScrollPane.html">ScrollPane</a> so we can add the concept of pages and centering on the nearest page.</p>
<p><pre class="brush: java">package com.example.gdx.scene2d;

import com.badlogic.gdx.math.MathUtils;
import com.badlogic.gdx.scenes.scene2d.Actor;
import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane;
import com.badlogic.gdx.scenes.scene2d.ui.Skin;
import com.badlogic.gdx.scenes.scene2d.ui.Table;
import com.badlogic.gdx.utils.Array;
import com.esotericsoftware.tablelayout.Cell;

import com.badlogic.gdx.math.MathUtils;
import com.badlogic.gdx.scenes.scene2d.Actor;
import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane;
import com.badlogic.gdx.scenes.scene2d.ui.Skin;
import com.badlogic.gdx.scenes.scene2d.ui.Table;
import com.badlogic.gdx.utils.Array;
import com.esotericsoftware.tablelayout.Cell;

public class PagedScrollPane extends ScrollPane {

	private boolean wasPanDragFling = false;

	private float pageSpacing;

	private Table content;

	public PagedScrollPane () {
		super(null);
		setup();
	}

	public PagedScrollPane (Skin skin) {
		super(null, skin);
		setup();
	}

	public PagedScrollPane (Skin skin, String styleName) {
		super(null, skin, styleName);
		setup();
	}

	public PagedScrollPane (Actor widget, ScrollPaneStyle style) {
		super(null, style);
		setup();
	}

	private void setup() {
		content = new Table();
		content.defaults().space(50);
		super.setWidget(content);		
	}

	public void addPages (Actor... pages) {
		for (Actor page : pages) {
			content.add(page).expandY().fillY();
		}
	}

	public void addPage (Actor page) {
		content.add(page).expandY().fillY();
	}

	@Override
	public void act (float delta) {
		super.act(delta);
		if (wasPanDragFling &amp;&amp; !isPanning() &amp;&amp; !isDragging() &amp;&amp; !isFlinging()) {
			wasPanDragFling = false;
			scrollToPage();
		} else {
			if (isPanning() || isDragging() || isFlinging()) {
				wasPanDragFling = true;
			}
		}
	}

	@Override
	public void setWidget (Actor widget) {
		throw new UnsupportedOperationException(&quot;Use PagedScrollPane#addPage.&quot;);
	}
	
	@Override
	public void setWidth (float width) {
		super.setWidth(width);
		if (content != null) {
			for (Cell cell : content.getCells()) {
				cell.width(width);
			}
			content.invalidate();
		}
	}

	public void setPageSpacing (float pageSpacing) {
		if (content != null) {
			content.defaults().space(pageSpacing);
			for (Cell cell : content.getCells()) {
				cell.space(pageSpacing);
			}
			content.invalidate();
		}
	}

	private void scrollToPage () {
		final float width = getWidth();
		final float scrollX = getScrollX();
		final float maxX = getMaxX();

		if (scrollX &gt;= maxX || scrollX &lt;= 0) return;

		Array&lt;Actor&gt; pages = content.getChildren();
		float pageX = 0;
		float pageWidth = 0;
		if (pages.size &gt; 0) {
			for (Actor a : pages) {
				pageX = a.getX();
				pageWidth = a.getWidth();
				if (scrollX &lt; (pageX + pageWidth * 0.5)) {
					break;
				}
			}
			setScrollX(MathUtils.clamp(pageX - (width - pageWidth) / 2, 0, maxX));
		}
	}

}</pre></p>
<p>Finally, it&#8217;s just a matter of making the grid of buttons. In Scene2D, a <a href="http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/scenes/scene2d/ui/Button.html">Button</a> is a <a href="http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/scenes/scene2d/ui/Table.html">Table</a>, so it enjoys all the abilities that the table provides, including the ability to add and layout children as you like.</p>
<p>For our buttons we&#8217;ll have an image and a label at the top, with a table showing the number of stars they&#8217;ve earned on the level. Did I mention I am not an artist? We&#8217;ll just be using the default button background (tinted red, for fun) for our top image and tinted squares as our stars.</p>
<hr />
<p>First we&#8217;ll create our PagedScrollPane, with each page being a table consisting of four columns and three rows:<br />
<pre class="brush: xml">PagedScrollPane scroll = new PagedScrollPane();
scroll.setFlingTime(0.1f);
scroll.setPageSpacing(25);
int c = 1;
for (int l = 0; l &lt; 10; l++) {
	Table levels = new Table().pad(50);
	levels.defaults().pad(20, 40, 20, 40);
	for (int y = 0; y &lt; 3; y++) {
		levels.row();
		for (int x = 0; x &lt; 4; x++) {
			levels.add(getLevelButton(c++)).expand().fill();
		}
	}
	scroll.addPage(levels);
}</pre></p>
<p>For each level we create a button, like so:<br />
<pre class="brush: xml">	/**
	 * Creates a button to represent the level
	 * 
	 * @param level
	 * @return The button to use for the level
	 */
	public Button getLevelButton(int level) {
		Button button = new Button(skin);
		ButtonStyle style = button.getStyle();
		style.up = 	style.down = null;
		
		// Create the label to show the level number
		Label label = new Label(Integer.toString(level), skin);
		label.setFontScale(2f);
		label.setAlignment(Align.center);		
		
		// Stack the image and the label at the top of our button
		button.stack(new Image(skin.getDrawable(&quot;top&quot;)), label).expand().fill();

		// Randomize the number of stars earned for demonstration purposes
		int stars = MathUtils.random(-1, +3);
		Table starTable = new Table();
		starTable.defaults().pad(5);
		if (stars &gt;= 0) {
			for (int star = 0; star &lt; 3; star++) {
				if (stars &gt; star) {
					starTable.add(new Image(skin.getDrawable(&quot;star-filled&quot;))).width(20).height(20);
				} else {
					starTable.add(new Image(skin.getDrawable(&quot;star-unfilled&quot;))).width(20).height(20);
				}
			}			
		}
		
		button.row();
		button.add(starTable).height(30);
		
		button.setName(&quot;Level&quot; + Integer.toString(level));
		button.addListener(levelClickListener);		
		return button;
	}</pre></p>
<p>And here&#8217;s the whole file:<br />
<pre class="brush: java">package com.example.gdx.scene2d;

import com.badlogic.gdx.ApplicationAdapter;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.GL10;
import com.badlogic.gdx.math.MathUtils;
import com.badlogic.gdx.scenes.scene2d.Actor;
import com.badlogic.gdx.scenes.scene2d.InputEvent;
import com.badlogic.gdx.scenes.scene2d.InputListener;
import com.badlogic.gdx.scenes.scene2d.Stage;
import com.badlogic.gdx.scenes.scene2d.ui.Button;
import com.badlogic.gdx.scenes.scene2d.ui.Button.ButtonStyle;
import com.badlogic.gdx.scenes.scene2d.ui.Image;
import com.badlogic.gdx.scenes.scene2d.ui.Label;
import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane;
import com.badlogic.gdx.scenes.scene2d.ui.Skin;
import com.badlogic.gdx.scenes.scene2d.ui.Slider;
import com.badlogic.gdx.scenes.scene2d.ui.Table;
import com.badlogic.gdx.scenes.scene2d.ui.TextButton;
import com.badlogic.gdx.scenes.scene2d.ui.Skin.TintedDrawable;
import com.badlogic.gdx.scenes.scene2d.ui.TextButton.TextButtonStyle;
import com.badlogic.gdx.scenes.scene2d.utils.Align;
import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener;
import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;
import com.badlogic.gdx.scenes.scene2d.utils.Drawable;
import com.esotericsoftware.tablelayout.Value;

public class PagedScrollPaneTest extends ApplicationAdapter {
	
	private Skin skin;
	private Stage stage;
	private Table container;

	public void create () {
		stage = new Stage(0, 0, false);
		skin = new Skin(Gdx.files.internal(&quot;data/uiskin.json&quot;));
		skin.add(&quot;top&quot;, skin.newDrawable(&quot;default-round&quot;, Color.RED), Drawable.class);
		skin.add(&quot;star-filled&quot;, skin.newDrawable(&quot;white&quot;, Color.YELLOW), Drawable.class); 
		skin.add(&quot;star-unfilled&quot;, skin.newDrawable(&quot;white&quot;, Color.GRAY), Drawable.class);
		
		Gdx.input.setInputProcessor(stage);

		container = new Table();
		stage.addActor(container);
		container.setFillParent(true);

		PagedScrollPane scroll = new PagedScrollPane();
		scroll.setFlingTime(0.1f);
		scroll.setPageSpacing(25);
		int c = 1;
		for (int l = 0; l &lt; 10; l++) {
			Table levels = new Table().pad(50);
			levels.defaults().pad(20, 40, 20, 40);
			for (int y = 0; y &lt; 3; y++) {
				levels.row();
				for (int x = 0; x &lt; 4; x++) {
					levels.add(getLevelButton(c++)).expand().fill();
				}
			}
			scroll.addPage(levels);
		}
		container.add(scroll).expand().fill();
	}

	public void render () {
		Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT);
		stage.act(Gdx.graphics.getDeltaTime());
		stage.draw();
		Table.drawDebug(stage);
	}

	public void resize (int width, int height) {
		stage.setViewport(width, height, false);
	}

	public void dispose () {
		stage.dispose();
		skin.dispose();
	}

	public boolean needsGL20 () {
		return false;
	}

	
	/**
	 * Creates a button to represent the level
	 * 
	 * @param level
	 * @return The button to use for the level
	 */
	public Button getLevelButton(int level) {
		Button button = new Button(skin);
		ButtonStyle style = button.getStyle();
		style.up = 	style.down = null;
		
		// Create the label to show the level number
		Label label = new Label(Integer.toString(level), skin);
		label.setFontScale(2f);
		label.setAlignment(Align.center);		
		
		// Stack the image and the label at the top of our button
		button.stack(new Image(skin.getDrawable(&quot;top&quot;)), label).expand().fill();

		// Randomize the number of stars earned for demonstration purposes
		int stars = MathUtils.random(-1, +3);
		Table starTable = new Table();
		starTable.defaults().pad(5);
		if (stars &gt;= 0) {
			for (int star = 0; star &lt; 3; star++) {
				if (stars &gt; star) {
					starTable.add(new Image(skin.getDrawable(&quot;star-filled&quot;))).width(20).height(20);
				} else {
					starTable.add(new Image(skin.getDrawable(&quot;star-unfilled&quot;))).width(20).height(20);
				}
			}			
		}
		
		button.row();
		button.add(starTable).height(30);
		
		button.setName(&quot;Level&quot; + Integer.toString(level));
		button.addListener(levelClickListener);		
		return button;
	}
	
	/**
	 * Handle the click - in real life, we'd go to the level
	 */
	public ClickListener levelClickListener = new ClickListener() {
		@Override
		public void clicked (InputEvent event, float x, float y) {
			System.out.println(&quot;Click: &quot; + event.getListenerActor().getName());
		}
	};

}</pre></p>
<p>Note, this is only one way to go about accomplishing this task and may not be the best way to do it, but it gets the job done so I&#8217;m happy with it.</p>
]]></content:encoded>
			<wfw:commentRss>http://nexsoftware.net/wp/2013/05/09/libgdx-making-a-paged-level-selection-screen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick Tip: LibGDX – GWT – Mouse Pointer</title>
		<link>http://nexsoftware.net/wp/2012/05/10/quick-tip-libgdx-gwt-mouse-pointer/</link>
		<comments>http://nexsoftware.net/wp/2012/05/10/quick-tip-libgdx-gwt-mouse-pointer/#comments</comments>
		<pubDate>Thu, 10 May 2012 15:54:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[gwt]]></category>
		<category><![CDATA[libgdx]]></category>

		<guid isPermaLink="false">http://nexsoftware.net/wp/?p=266</guid>
		<description><![CDATA[Today, I was working with the GWT backend for LibGDX and in this particular game I was using mouse drag. I was met with an unsightly text-selection cursor on my mouse. It made me sad, and I bet it&#8217;d make you sad too. Here&#8217;s one way to fix that&#8230; The default index that the LibGDX [...]]]></description>
				<content:encoded><![CDATA[            <script type="text/javascript" src="http://nexsoftware.net/wp/wp-content/plugins/wordpress-code-snippet/scripts/shBrushJava.js"></script>
            <script type="text/javascript" src="http://nexsoftware.net/wp/wp-content/plugins/wordpress-code-snippet/scripts/shBrushXml.js"></script>
<p>Today, I was working with the GWT backend for <a href="http://www.libgdx.com" title="LibGDX">LibGDX</a> and in this particular game I was using mouse drag. I was met with an unsightly text-selection cursor on my mouse. It made me sad, and I bet it&#8217;d make you sad too.</p>
<p>Here&#8217;s one way to fix that&#8230;</p>
<p>The default index that the LibGDX Setup creates is pretty basic, which is good as it makes no assumptions as to what you want. Here&#8217;s an example:</p>
<p><pre class="brush: xml">&lt;!doctype html&gt;
&lt;html&gt;
	&lt;head&gt;
		&lt;title&gt;lines&lt;/title&gt;
		&lt;meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=UTF-8&quot;&gt;
	&lt;/head&gt;
	
	&lt;body&gt;
		&lt;div align=&quot;center&quot; id=&quot;embed-com.mobi.lines.Lines&quot;&gt;&lt;/div&gt;
		&lt;script type=&quot;text/javascript&quot; src=&quot;com.mobi.lines.Lines/com.mobi.lines.Lines.nocache.js&quot;&gt;&lt;/script&gt;
	&lt;/body&gt;
&lt;/html&gt;
</pre></p>
<p>Unmodified, this allows the aforementioned text-selection cursor to appear upon drag operations. If you don&#8217;t want that, you can add the following style (to the head) and script (at the end of the body) tags to your index.html:</p>
<p><pre class="brush: xml">&lt;style&gt;
	canvas { cursor: pointer; }
&lt;/style&gt;</pre></p>
<p>and </p>
<p><pre class="brush: xml">&lt;script&gt;
	function handleMouseDown(evt) {
	  evt.preventDefault();
	  evt.stopPropagation();
	  evt.target.style.cursor = 'pointer';
	}
	function handleMouseUp(evt) {
	  evt.preventDefault();
	  evt.stopPropagation();
	  evt.target.style.cursor = '';
	}
	document.getElementById('embed-com.mobi.lines.Lines').addEventListener('mousedown', handleMouseDown, false);
	document.getElementById('embed-com.mobi.lines.Lines').addEventListener('mouseup', handleMouseUp, false);
&lt;/script&gt;</pre></p>
<p>In the end, you should have something like this:</p>
<p><pre class="brush: xml">&lt;!doctype html&gt;
&lt;html&gt;
	&lt;head&gt;
		&lt;title&gt;lines&lt;/title&gt;
		&lt;meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=UTF-8&quot;&gt;
		&lt;style&gt;
			canvas { cursor: pointer; }
		&lt;/style&gt;
	&lt;/head&gt;
	
	&lt;body&gt;
		&lt;div align=&quot;center&quot; id=&quot;embed-com.mobi.lines.Lines&quot;&gt;&lt;/div&gt;
		&lt;script type=&quot;text/javascript&quot; src=&quot;com.mobi.lines.Lines/com.mobi.lines.Lines.nocache.js&quot;&gt;&lt;/script&gt;
		
		&lt;script&gt;
			function handleMouseDown(evt) {
			  evt.preventDefault();
			  evt.stopPropagation();
			  evt.target.style.cursor = 'pointer';
			}
			function handleMouseUp(evt) {
			  evt.preventDefault();
			  evt.stopPropagation();
			  evt.target.style.cursor = '';
			}
			document.getElementById('embed-com.mobi.lines.Lines').addEventListener('mousedown', handleMouseDown, false);
			document.getElementById('embed-com.mobi.lines.Lines').addEventListener('mouseup', handleMouseUp, false);
		&lt;/script&gt;
		
	&lt;/body&gt;
&lt;/html&gt;</pre></p>
<p>I know, it&#8217;s not exactly earth-shattering stuff here, but I hope it can help someone.</p>
]]></content:encoded>
			<wfw:commentRss>http://nexsoftware.net/wp/2012/05/10/quick-tip-libgdx-gwt-mouse-pointer/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>LibGDX via AIDE</title>
		<link>http://nexsoftware.net/wp/2012/05/06/libgdx-via-aide/</link>
		<comments>http://nexsoftware.net/wp/2012/05/06/libgdx-via-aide/#comments</comments>
		<pubDate>Sun, 06 May 2012 22:06:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[aide]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[libgdx]]></category>

		<guid isPermaLink="false">http://nexsoftware.net/wp/2012/05/06/libgdx-via-aide/</guid>
		<description><![CDATA[For quite some time I&#8217;ve dreamed of being able to use my Android devices for development. Until recently, this dream seemed like it would never become a reality (at least, to the extent I wanted). Then, I learned of a new app available on the Google Play store&#8230; AIDE &#8211; Android IDE, an on-device development [...]]]></description>
				<content:encoded><![CDATA[            <script type="text/javascript" src="http://nexsoftware.net/wp/wp-content/plugins/wordpress-code-snippet/scripts/shBrushJava.js"></script>
            <script type="text/javascript" src="http://nexsoftware.net/wp/wp-content/plugins/wordpress-code-snippet/scripts/shBrushXml.js"></script>
<p>For quite some time I&#8217;ve dreamed of being able to use my Android devices for development. Until recently, this dream seemed like it would never become a reality (at least, to the extent I wanted). Then, I learned of a new app available on the Google Play store&#8230; <a href="https://play.google.com/store/apps/details?id=com.aide.ui">AIDE &#8211; Android IDE</a>, an on-device development environment for Android applications. I&#8217;m not sure if this is the first app of its kind or not, but it sure seems like it&#8217;s the best.</p>
<p>So, what exactly does AIDE do that makes it so awesome? Well, first of all, like any good code editor AIDE offers syntax highlighting. More interestingly though, it provides code completion, refactoring, and other helpful features that traditional IDEs offer (and most on-device code editors don&#8217;t). Lastly AIDE, makes it possible to compile and run your application directly without having to use a computer. This is, to me, the most exciting aspect of AIDE.</p>
<p>After working with <a href="http://www.libgdx.com">LibGDX</a> for the last year and a half, I naturally wanted to see if I could use AIDE to continue to do so. My first attempt ended rather quickly with a issue report to the developer of AIDE but they turned around a fix very quickly and I was back in business. Lo and behold, it works!</p>
<p>There are a couple ways to get this set up, but here I&#8217;ll describe an easy way to start a new project. I&#8217;ll assume we want to maintain the best practice 3+ project setup and, to make it easier, I will utilize the dev-guide demo project from the LibGDX SVN repository on <a href="http://code.google.com/p/libgdx/">Google Code</a>.</p>
<p>I&#8217;m sure I don&#8217;t have to tell you this but, to be sure, ensure you have AIDE installed on your Android device (this will work the same on phones or tablets).</p>
<p>With that out of the way, the first step will be to acquire the dev-guide project. I did this right on my device using <a href="https://play.google.com/store/apps/details?id=com.valleytg.oasvnlite.android">Open Android SVN</a> but you can use any means you like (Box, Dropbox, and Google Drive are all fine choices, as is copying from your computer). I copied the dev-guide folder to the AppProjects folder that AIDE sets up on the sdcard but this isn&#8217;t strictly necessary as AIDE will open projects from anywhere you like. Next, start AIDE, then locate and open the my-gdx-game-android project. We&#8217;ll need to make some very minor modifications so it works in the AIDE environment. Open the .classpath file in the project root. Update the references to the shared project and gdx.jar so that they are relative to the project (as opposed to the workspace). At the time of writing, the icons included in the my-gdx-game-android project are broken so you&#8217;ll need to replace them. Creating a new project in AIDE is a fine method of acquiring new ic_launcher.png graphics. Just copy and replace the same in the my-gdx-game-android project. Now, we are ready to run the game to make sure everything is correctly setup. Simply choose the Run option from the Menu (or Action Bar if on Android 3.0+). It will take a few moments to compile and install. When it opens you should be met with a nice fuschia screen (You can thank Mario for that one).</p>
<p>Assuming all went well, you are now ready to build out the next big thing. You&#8217;re only limited by your own imagination. Well, that and your ability to be productive and creative on your Android device. Perhaps, I will do another post with some apps I&#8217;ve found useful in that regard.</p>
<p>So, to recap, the steps are:</p>
<ol>
<li>Acquire AIDE</li>
<li>Acquire the dev-guide project from Google Code</li>
<li>Update the classpath</li>
<li>Replace the icons</li>
<li>Run</li>
<li>???</li>
<li>Profit</li>
</ol>
<p><strong>Update:</strong>: I&#8217;ve fixed the icons in the LibGDX SVN, so that step should no longer be required.</p>
]]></content:encoded>
			<wfw:commentRss>http://nexsoftware.net/wp/2012/05/06/libgdx-via-aide/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Changes Coming Soon</title>
		<link>http://nexsoftware.net/wp/2011/07/09/changes-coming-soon/</link>
		<comments>http://nexsoftware.net/wp/2011/07/09/changes-coming-soon/#comments</comments>
		<pubDate>Sat, 09 Jul 2011 22:22:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Announcements]]></category>

		<guid isPermaLink="false">http://nexsoftware.net/wp/2011/07/09/changes-coming-soon/</guid>
		<description><![CDATA[I realize I have been neglecting this blog, and since it is currently set as the default site for nEx.Software that doesn&#8217;t look very good. I am in the beginning stages of a redesign and a refocusing of the site. I plan to put more of a focus on nEx.Software as a company as opposed [...]]]></description>
				<content:encoded><![CDATA[            <script type="text/javascript" src="http://nexsoftware.net/wp/wp-content/plugins/wordpress-code-snippet/scripts/shBrushJava.js"></script>
            <script type="text/javascript" src="http://nexsoftware.net/wp/wp-content/plugins/wordpress-code-snippet/scripts/shBrushXml.js"></script>
<p>I realize I have been neglecting this blog, and since it is currently set as the default site for nEx.Software that doesn&#8217;t look very good. I am in the beginning stages of a redesign and a refocusing of the site. I plan to put more of a focus on nEx.Software as a company as opposed to nEx.Software as a blog since I clearly haven&#8217;t been the most attentive blogger around.</p>
<p>Stay tuned.</p>
]]></content:encoded>
			<wfw:commentRss>http://nexsoftware.net/wp/2011/07/09/changes-coming-soon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How Not To Ask A Developer For Updates</title>
		<link>http://nexsoftware.net/wp/2010/06/22/how-not-to-ask-a-developer-for-updates/</link>
		<comments>http://nexsoftware.net/wp/2010/06/22/how-not-to-ask-a-developer-for-updates/#comments</comments>
		<pubDate>Tue, 22 Jun 2010 14:35:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://nexsoftware.net/wp/?p=252</guid>
		<description><![CDATA[Recently, we received an email from a customer looking for updates on BarTor. OK, not all that uncommon right? The thing that stood out was the approach this customer took in asking for these updates. Lets just say that it was shockingly hostile, especially for a first contact email. Rather than explaining it, I will [...]]]></description>
				<content:encoded><![CDATA[            <script type="text/javascript" src="http://nexsoftware.net/wp/wp-content/plugins/wordpress-code-snippet/scripts/shBrushJava.js"></script>
            <script type="text/javascript" src="http://nexsoftware.net/wp/wp-content/plugins/wordpress-code-snippet/scripts/shBrushXml.js"></script>
<p>Recently, we received an email from a customer looking for updates on BarTor. OK, not all that uncommon right? The thing that stood out was the approach this customer took in asking for these updates. Lets just say that it was shockingly hostile, especially for a first contact email. Rather than explaining it, I will just include the email here along with my response.<br />
<span id="more-252"></span></p>
<blockquote><p>
From: Chris<br />
Date: Sun, Jun 20, 2010 at 4:35 AM</p>
<p>the open source world should bitch slap you across the fucking face for getting rich off of us &#8211; at least $10,000 rich and now you&#8217;re ignoring us and no longer providing updates to an app that you charged $2.99 on the android market??????? how&#8217;s about an update you fucking cheapskate. your app only searches for torrents from isohunt.com and isohunt.com has since gone legit and no longer carries any torrents worth downloading. wtf man? i outta press charges on your ass. i&#8217;m looking into googles agreement and checking to see if you are at fault here. dick.</p>
</blockquote>
<p>And my response:</p>
<blockquote><p>
To: Chris<br />
Date: Sun, Jun 20, 2010 at 7:46 AM</p>
<p>Hello Chris,</p>
<p>How are you? I am sorry to hear that you are upset about the BarTor update frequency; however, a little respect would have been more appropriate. </p>
<p>Although, I don&#8217;t think your email truly warrants a response, I will do so. First and foremost, a general tip on social etiquette: when making first contact with someone, especially someone who you expect to do something for you, hostility is rarely an appropriate method.</p>
<p>nEx.Software as an entity, and in particular the product, BarTor, has little to do with the open source community. BarTor was a commercial endeavour and unfortunately a rather unsuccessful one. I can&#8217;t even begin to guess where you got your estimate from, but I can assure that the real numbers are FAR less than that&#8230; more in the $1,000-$1,500 range over the course of 15 months. Not that it is any of our business though.</p>
<p>Although ISOHunt may have changed its business model, BarTor continues to function as intended and advertised. Your assumption that the business model of ISOHunt has any direct correlation or impact on BarTor is just plain wrong.</p>
<p>Yours is the first email we have received of this nature, so I can assure you we have not ignored anyone. As previously stated, BarTor continues to work as intended and I think most people understand that.</p>
<p>That being said, we are not opposed to making an update if it seems necessary, but sending hostile threats is not a good way to let us know you&#8217;d like an update.</p>
<p>Respectfully,</p>
<p>Justin<br />
Founder<br />
nEx.Software</p>
<p>http://www.nexsoftware.net</p>
</blockquote>
<p>Now, I am sure that I will catch a little flack about the &#8220;has little to do with the open source community&#8221; comment in my response but, if we are being completely honest, it is mostly true. While I, Justin, make an attempt to be a part of the community and contribute occasionally, nEx.Software itself does not follow an open source model. But that&#8217;s enough about that, as it is not the point of this post.</p>
<p>The reason I posted this here is due to the fact that I was a little bit floored by this first contact email from someone looking for something from us. I certainly understand that this customer is frustrated, and would like us to update the software; however, this approach of name-calling and making threats is almost guaranteed to not have the intended effect.</p>
<p>So, now that we know how not to approach developers to ask for updates&#8230; Let me give a tip on how to approach us: Ask nicely. I know, profound, huh? Even if it is only for the first email you send, a first impression goes a long way.</p>
]]></content:encoded>
			<wfw:commentRss>http://nexsoftware.net/wp/2010/06/22/how-not-to-ask-a-developer-for-updates/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Announcement: Android 1.5 and nEx.Software Apps</title>
		<link>http://nexsoftware.net/wp/2009/11/05/announcement-android-1-5-and-nex-software-apps/</link>
		<comments>http://nexsoftware.net/wp/2009/11/05/announcement-android-1-5-and-nex-software-apps/#comments</comments>
		<pubDate>Thu, 05 Nov 2009 16:13:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Announcements]]></category>
		<category><![CDATA[Mobile]]></category>

		<guid isPermaLink="false">http://nexsoftware.net/wp/?p=239</guid>
		<description><![CDATA[We at nEx.Software feel strongly about Android, and we want to see it evolve. For SOME of the world, Android HAS evolved. The release of Android 1.6 in October of 2009 brought Android to a new level in many ways, and we feel that this is a step in the right direction. The fact that [...]]]></description>
				<content:encoded><![CDATA[            <script type="text/javascript" src="http://nexsoftware.net/wp/wp-content/plugins/wordpress-code-snippet/scripts/shBrushJava.js"></script>
            <script type="text/javascript" src="http://nexsoftware.net/wp/wp-content/plugins/wordpress-code-snippet/scripts/shBrushXml.js"></script>
<p>We at nEx.Software feel strongly about Android, and we want to see it evolve. For SOME of the world, Android HAS evolved. The release of Android 1.6 in October of 2009 brought Android to a new level in many ways, and we feel that this is a step in the right direction. The fact that there are still phones being released based on Android 1.5 (Motorola CLIQ [T-Mobile], Samsung Behold II [T-Mobile], Samsung Moment [Sprint], HTC Hero [Sprint], HTC Droid Eris [Verizon], and even a Motorola device rumored to be coming out in 2010 [Unknown]) is counterproductive to this evolution. While we do understand that it takes time to update something as big as an operating system, and this is especially true when dealing with custom user interfaces and functionalities, there needs to be a sense of urgency coming from manufacturers and carriers.<br />
<span id="more-239"></span><br />
It is our opinion that, as long as applications are being made to support Android 1.5, there is no true drive for the manufacturers to upgrade their users&#8217; devices. But what would happen if users of those devices were unable to access many of the applications in the Market (undoubtedly, this is the case already)? Surely, that would create the sense of urgency that seems to be missing at this time. We cannot have users missing out on the evolution of Android simply because the manufacturers and/or carriers don&#8217;t see a need or don&#8217;t think that those features are necessary for a certain device. This is an unacceptable approach to Android, in our opinion.</p>
<p>Accordingly, we have decided to no longer support Android 1.5 in the Android Market. We propose that other developers, who are able to do so, do the same in an effort to exact change. We are aware that there are many developers who cannot or will not follow in this decision, and we respect their decision whatever they choose. This is the path we have chosen to take.</p>
<p>We will be updating all of our applications currently available in the Android Market to require Android 1.6. We will however, try to move Android 1.5 versions into the alternative markets (such as <a href="http://www.andappstore.com">AndAppStore</a> and <a href="http://www.slideme.org">SlideME</a>), and, where it makes sense to do so, we will distribute the Android 1.5 versions from our website.</p>
<p>You may be asking “Why not Android 2.0?” and to that we have to bring up the fact that ONLY ONE device is currently running Android 2.0, and as of the time of this announcement Google has given no indication that Android 2.0 will be made available in the Android Open Source Project anytime soon. While it is true that manufacturers may have or get access to Android 2.0, the fact remains that we have seen no commitment from these manufacturers that they will in fact update existing devices (HTC has announced via Twitter that the Hero will receive an update 2.0, but failed to mention anything about Dream and/or Sapphire devices).</p>
]]></content:encoded>
			<wfw:commentRss>http://nexsoftware.net/wp/2009/11/05/announcement-android-1-5-and-nex-software-apps/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>My Three-Day Review Of The Motorola CLIQ</title>
		<link>http://nexsoftware.net/wp/2009/11/01/my-three-day-review-of-the-motorola-cliq/</link>
		<comments>http://nexsoftware.net/wp/2009/11/01/my-three-day-review-of-the-motorola-cliq/#comments</comments>
		<pubDate>Sun, 01 Nov 2009 22:06:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://nexsoftware.net/wp/?p=222</guid>
		<description><![CDATA[After having my Motorola CLIQ for three days, I decided to write down my thoughts and opinions of the phone and specifically focus on those aspects that are (in my opinion) of interest to current Android users who are looking at the CLIQ as a possible upgrade device. So here it goes&#8230; The Contents of [...]]]></description>
				<content:encoded><![CDATA[            <script type="text/javascript" src="http://nexsoftware.net/wp/wp-content/plugins/wordpress-code-snippet/scripts/shBrushJava.js"></script>
            <script type="text/javascript" src="http://nexsoftware.net/wp/wp-content/plugins/wordpress-code-snippet/scripts/shBrushXml.js"></script>
<p>After having my Motorola CLIQ for three days, I decided to write down my thoughts and opinions of the phone and specifically focus on those aspects that are (in my opinion) of interest to current Android users who are looking at the CLIQ as a possible upgrade device.<span id="more-222"></span> So here it goes&#8230;</p>
<p><strong>The Contents of the Box:</strong><br />
•	Motorola CLIQ Phone<br />
•	AC Adapter Plug<br />
•	USB Cable<br />
•	SIM Card<br />
•	Instructions</p>
<p>Of course, there is nothing incredibly out-of-the-ordinary here but there are a few things worthy of a mention. First, the AC Adapter plug&#8230; It&#8217;s just that&#8230; a plug. You actually use the provided USB Cable for both the AC Power and for connecting your phone to your computer. This works fine, it is just weird. Second, there is a curious lack of reference to Android in the instructions. It&#8217;s there, just infrequently. Again, it’s just a little weird, especially considering Motorola’s almost over-zealous dedication to Android.</p>
<p><strong>The Hardware:</strong><br />
Having heard numerous people half-jokingly refer to the CLIQ as a toy, I am pleasantly surprised at the perceived ruggedness of the build. Only time will tell whether the ruggedness is real or not, but at this point I’m quite happy with it. When compared to the HTC Dream (T-Mobile G1) the lack of the swivel motion in the keyboard makes it seem sturdier. Also unlike the Dream there is far less motion between the front and back pieces when closed. There is still some motion, however, which is most noticeable when pressing at the left and right edges of the screen. So far there is no creaking or squeaking related to this motion, which was not the case with the Dream.</p>
<p>The CLIQ is similar in size and weight to the HTC Sapphire (T-Mobile MyTouch 3G, HTC Magic), but slightly thicker. And, although similar shape, the CLIQ does lack the “chin” as seen on most of the HTC Android devices. So if you don’t dig the chin, you might find the flat-face of the CLIQ more appealing.</p>
<p>When closed, the CLIQ has the Menu (designated by four squares), Home, and Back buttons on the front, a silent-mode switch and volume rocker on the left, the power/lock button and camera button on the right. On the top is the 3.5mm headphone jack and on the left is the MicroUSB slot. Slide open the keyboard to reveal the 5-Way Directional Pad to the left of the Four-Row Keyboard. For those coming from one of the existing Android devices such as the Dream, Sapphire, or Hero, this is where things get different.</p>
<p>The fact that you have to open the keyboard to get at the directional pad is somewhat troublesome. It’s amazing but you don’t realize how often you actually use the navigation controls (trackball or directional pad) until you don’t have them accessible. For me, this is most obvious when using the virtual keyboard and need to go back a few characters or lines to correct something. Having used a Dream and a Sapphire for nearly a year now, I find myself constantly going to the trackball only to find it isn’t there. Also, the placement of the directional pad on the left is proving to be a little hard for me handle. At first, I had though “Sweet! It’s more like the game controllers I am used to, this is going to be awesome!” but I have found I am more comfortable with the trackball on the right. Again, this is probably because I am used to it.</p>
<p>The keyboard itself is different and interesting to get used to. With the Dream, our beloved physical-keyboarded Android, we have a 5-Row Keyboard which makes typing a bit easier than with the 4-Row Keyboard of the CLIQ. Also, it may just be me but it seems like the CLIQ takes a touch more pressure to press the keys. That being said, the shape of the keys (somewhat like a rounded pyramid) and their closeness to each other actually helps with typing speed because in many cases you can rock between the keys easily. The keyboard is where the CLIQ gets its name. There is actually a clicking sound with each keypress. It’s not a software generated sound but rather there is an actual clicking sound coming from the hardware. I know what you are thinking… Yes, I think this is intentional and not a defect. It’s not loud but it is noticeable, which means no secret texting in class kids (unless you go virtual).</p>
<p>Lastly, something that isn’t really keyboard related but is related to typing on the CLIQ. The placement of the volume rocker on the left side (which becomes the bottom when the keyboard is open) is unfortunate. This is because depending on how you rest your non-typing fingers while typing you may find yourself accidentally adjusting your ringer volume frequently.</p>
<p>The touch screen is slightly smaller than the HTC phones, coming in at 3.1” as opposed to 3.2” but this doesn’t make a huge difference (for me at least). Sometimes the touch response can seem a little lagged and somewhat inaccurate but perhaps I am at fault. I find myself hitting the wrong keys on the virtual keyboard more often on the CLIQ than on my other phones.</p>
<p>So I bet at this point you are asking yourself, this is a phone so how does it work as a phone? Although I don’t often use my phone as a phone, I have found the voice quality both on the CLIQ side and on the other caller’s side is loud and clear, and without any weird artifacts. This is not new to me though as I have experienced flawless voice quality on my other Android phones as well.</p>
<p><strong>The Software:</strong><br />
Somewhat disappointing is the fact that the CLIQ, with its MOTOBLUR services, is based on Android 1.5. This is disappointing for two reasons: First, the CLIQ is being released on a carrier that has already rolled out Android 1.6 to all of its existing Android phones (T-Mobile USA). Second, Motorola is releasing another device only days later that is running Android 2.0. I understand that the CLIQ is Motorola’s first Android device and that its MOTOBLUR services were built on that framework, but Motorola obviously has had the benefit of knowing Android 2.0 for at least some time and I would have liked for them to have MOTOBLUR updated to Android 2.0. Perhaps there is going to be a quick follow-up release to upgrade CLIQ users to 2.0 but I doubt it.</p>
<p>So, now that we know MOTOBLUR was likely a part of reason that the CLIQ is being release with Android 1.5, let’s talk about those services and see if they justify the ends. We’ll begin with my experience starting up the phone and setting up the MOTOBLUR services, and then lead into how those services come into play with real use of the phone. Finally, I’ll discuss the overall experience without specific focus on MOTOBLUR.</p>
<p>Anyone who follows me on Twitter will know that I was very excited to receive my CLIQ and was very eager to get home from work and fire it up. And I did exactly that. I got home, I popped the SIM card out of my Sapphire and into the CLIQ and excitedly powered it on. Much as is the case with the instructions booklet, I found myself a touch confused when I was not presented with any indication that the phone I was booting was indeed Android. Instead, I got a pulsing MOTOBLUR logo. Fine, whatever, I can deal with that. I then got to what I will call the Welcome to Android screen, but again, saw no indication of Android’s presence. Instead I got a customized welcome screen and was directed to begin MOTOBLUR setup. This was easy enough, I enter my Name, my Email Address and a Password and I am good to go. After that I get to choose which accounts I sync (including MySpace, Facebook, Google, Last.FM, Twitter, Email, Corporate Sync, Picasa, Photbucket and Yahoo Mail). I am not sure if Google was optional or not but since this is Google Android, I chose it automatically. I also included Facebook and Twitter. It might have been nice to also have LinkedIn as an option for those corporate types. Everything went fine here and I was delivered to the Home screen of my phone.</p>
<p>Although I knew it was coming, I was caught a little off guard by the number of Widgets that were loaded by default to my Home screen. My Android experience, having flashed and re-flashed and wiped and re-wiped my phones countless times, has always been a minimalistic default Home screen. Instead I was presented with the Social Status, Happenings, Messages, Weather, News, Music, and Search Widgets already preloaded with either my social networking content or default selections. I updated the weather widget to show my location, removed the News and Music widgets, and went along my way a much happier person.<br />
As you probably noticed, I left all of the social networking widgets in place. So, how does “The First Phone With Social Skills” stack up in terms of social networking? It’s kind of a mixed bag. While I am generally pleased with the way that MOTOBLUIR retrieves my statuses and messages from various sites, there is a bit to be desired. First of all, I have yet to find out if there is a way that I can set the frequency at which these sites are polled for updates, or whether I can manually trigger an update. In the case of Twitter, where conversations seem to fly by at the speed of a hummingbird, I find myself a little behind the times when I get updates. The good thing: MOTOBLUR makes is very easy to see what is new because only new statuses are shown in the Happenings widget. Once you view them, they are removed from the widget (but are still available for viewing in the Happenings application). This behavior is the same for the Messages, and News widgets. The Happenings application also functions as a Twitter (or whatever service to which the current message applies) client but it is somewhat rudimentary. For example, there is a way to Reply to Tweets and to Direct Message the Sender of a Tweet, but there is no option to Retweet, or follow Mentions or Hashes. This is probably due to supporting so many different services that they had to compromise some functionality. Needless to say, I have not been able to use MOTOBLUR as my sole Twitter client. Facebook, operates in much the same way so I won’t go into that here. I use Facebook much less frequently that Twitter so I am happy with the MOTOBLUR implementation there.</p>
<p>Where I think MOTOBLUR shines is actually in its modifications to the Contacts application. Instead of just being a list of people, the Contacts application becomes yet another way to see the status of your Contacts and consolidates all of your contacts from your various synced services. Of course, you have the option to just view a list as well. The Dialer view presents us with the Dialer and additional tabs for Recent, Frequent, and Speed Dial contacts.</p>
<p>Of course, with these modifications, the Contacts database had to be changed. Unfortunately, there have been reports of Contacts based applications not functioning properly in some cases. Keep this in mind of you see any weird things happening and notify the developer of the affected application so they are aware and can implement a fix or help troubleshoot.</p>
<p>As that pretty much covers the main features of MOTOBLUR in the device (there are other features such as remote wipe, but those are not device related, so we’ll skip them for now) I will move on to the general observations of the user experience.</p>
<p>If you’ve seen any videos or screenshots of the CLIQ you will already know that the UI is modified from the vanilla Android experience. Most of the UI is similar but colors have been modified and some elements have changed graphically. The theme of the CLIQ is nEx.Software colors. Only kidding, but they are red and black so in most places that you would normally see orange, you see red. In most places this works but there are some places where it might have been best to not modify the colors. For example, the stars to indicate rating in the Market are red instead of green, which makes them a little difficult to see due to their small size.</p>
<p>The phone has no physical call or end call buttons, which means that you have to go to the home screen to make a call, which is fine because if you are making a call you probably don’t need to be in another app. As you would expect you can answer a call while in any application.</p>
<p>Overall, the phone seems a little snappier than the Dream and Sapphire (except for the HTC branded variant which has the 256MB RAM) because it has more RAM. However, I would imagine that MOTOBLUR can dig into the speed on updates, which it seems you have no control over.</p>
<p><strong>Conclusion:</strong><br />
After having spent three days with this phone, I have definite things that I like and things that I don’t really care for but I have been generally impressed by this phone and would say that it is a good entry into the Android market (not the Android Market of course). I would recommend it as a replacement for the Dream if a replacement was needed, but would probably not recommend it if there was no actual <em>need</em>. It’s just not that compelling an upgrade for those who don’t have to. For a new Android user who wants a keyboard I’d recommend it over the Dream. But I’d venture a guess that it would be hard to choose this over the Motorola Droid or some of the other Android phones de out in the near(ish) future.</p>
<p>An item of note that isn’t really a part of the review but I felt like mentioning anyway. There is currently a bug in the CLIQ firmware which has broken some games, and has caused them to not display their graphics (i.e. Buka and Totemo by Hexage). If you know of any games that are experiencing this issue, please let the developer know so that they can work around the bug.</p>
<p><strong>Please let me know if there is anything else you&#8217;d like to know about the CLIQ, or my experiences with it.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://nexsoftware.net/wp/2009/11/01/my-three-day-review-of-the-motorola-cliq/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Sialia</title>
		<link>http://nexsoftware.net/wp/2009/09/01/sialia/</link>
		<comments>http://nexsoftware.net/wp/2009/09/01/sialia/#comments</comments>
		<pubDate>Tue, 01 Sep 2009 21:25:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://nexsoftware.net/wp/?p=204</guid>
		<description><![CDATA[Coming soon&#8230;]]></description>
				<content:encoded><![CDATA[            <script type="text/javascript" src="http://nexsoftware.net/wp/wp-content/plugins/wordpress-code-snippet/scripts/shBrushJava.js"></script>
            <script type="text/javascript" src="http://nexsoftware.net/wp/wp-content/plugins/wordpress-code-snippet/scripts/shBrushXml.js"></script>
<p>Coming soon&#8230;</p>
<div style="background:white; padding: 5px"><img class="aligncenter size-full wp-image-205" title="sialia" src="http://nexsoftware.net/wp/wp-content/uploads/2009/09/sialia.png" alt="sialia" width="160" height="210" /></div>
]]></content:encoded>
			<wfw:commentRss>http://nexsoftware.net/wp/2009/09/01/sialia/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Tutorial – Creating a Custom Analog Clock Widget</title>
		<link>http://nexsoftware.net/wp/2009/07/29/tutorial-creating-a-custom-analogclock-widget/</link>
		<comments>http://nexsoftware.net/wp/2009/07/29/tutorial-creating-a-custom-analogclock-widget/#comments</comments>
		<pubDate>Wed, 29 Jul 2009 15:06:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://nexsoftware.net/wp/?p=91</guid>
		<description><![CDATA[Hi all&#8230; Note, I am going to assume that there are at least a few people who have wandered off, gotten lost, and somehow ended up here. Hopefully, a few of you meant to be here too&#8230; Yesterday, I was perusing the forums over at www.androidandme.com (as I often do) and one of the members [...]]]></description>
				<content:encoded><![CDATA[            <script type="text/javascript" src="http://nexsoftware.net/wp/wp-content/plugins/wordpress-code-snippet/scripts/shBrushJava.js"></script>
            <script type="text/javascript" src="http://nexsoftware.net/wp/wp-content/plugins/wordpress-code-snippet/scripts/shBrushXml.js"></script>
<p>Hi all&#8230; Note, I am going to assume that there are at least a few people who have wandered off, gotten lost, and somehow ended up here. Hopefully, a few of you meant to be here too&#8230;</p>
<p>Yesterday, I was perusing the forums over at <a href="http://www.androidandme.com">www.androidandme.com</a> (as I often do) and one of the members had posted a question related to development. Of course, I hunt these down and pounce whenever I see them. So, on to the question, which I am going to strip down to the scope of this post&#8230; How does one write a custom Analog Clock Home Screen Widget for Android.</p>
<p style="text-align: left;"><img class="size-medium wp-image-200 aligncenter" title="AnalogClock" src="http://nexsoftware.net/wp/wp-content/uploads/2009/07/AnalogClock-200x300.png" alt="AnalogClock" width="200" height="300" />So, as I am sure you have already guessed, I have decided to write a tutorial (with code) to explain in detail how to do just that.</p>
<p>Before we continue, I should point out that as I am writing this I am going to assume that you have obtained, installed, and know how to use the software tools for Android Development. For the purpose of this tutorial, these tools are: JDK 1.5 or higher, Android 1.5 SDK, Eclipse 3.4 or higher, and the Android Development Tools Plugin for Eclipse.</p>
<p>Now that that is all out of the way, let&#8217;s move on to the tutorial&#8230;</p>
<p><span id="more-91"></span></p>
<p>First off, we are going to create a new Android Project in Eclipse. For my own code for the tutorial (which can be downloaded here), I will call the Project AnalogClockWidget, I will choose Android 1.5 as the build target (required for Widgets), I will set the Application Name to Analog Clock Widget, the package name to nEx.Software.Tutorials.Widgets.AnalogClock, and create an Activity called Info (this will be explained later).</p>
<p>During the course of this tutorial we will be creating several files that implement various aspects of the widget. These files we will be creating are:</p>
<ul>
<li>Java Source Files
<ul>
<li>Info.java</li>
<li>Widget.java</li>
</ul>
</li>
</ul>
<ul>
<li>Resource Files
<ul>
<li>res/xml/widget.xml</li>
<li>res/layout/info.xml</li>
<li>res/layout/widget.xml</li>
<li>res/drawable/widgetdial.png</li>
<li>res/drawable/widgethour.png</li>
<li>res/drawable/widgetminute.png</li>
</ul>
</li>
</ul>
<p>We will also be working with AndroidManifest.xml within the root directory of our project.</p>
<h3>Resource Files</h3>
<p>The most logical place to start in creating a widget such as this is creating the layout files and the xml file declaring the app-widgetprovider (in our case, res/xml/widget.xml).</p>
<p><strong><a href="http://nexsoftware.net/wp/wp-content/uploads/2009/07/res_xml_widget.xml.txt" target="_blank">res/xml/widget.xml</a></strong>: This file contains the definition of our Analog Clock widget. It is an xml file with only one element: appwidget-provider, which has the following attributes: xmlns:android (standard in Android resource files, defines the android namespace), android:minWidth (defines the minimum width of our Widget, translates to number of cells in the horizontal space), android:minHeight (defines the minimum height of our Widget, translates to number of cells in the vertical space), android:updatePeriodMillis (defines the update frequency, a value of 0 means no updates), android:initialLayout (a pointer to the layout file to display during loading of the widget).</p>
<p>the graphics I am using for this custom version of the Analog Clock will be a nEx.software themed version of the original Analog Clock. As such, I am going to use the same size parameters as the original. That that is, my Clock Dial will be 146ppx by 146 px. Ecah hand will be 14px by 146px.  This size will fit nicely into a 2 cell by 2 cell space on the home screen (in both landscape and portrait modes), just like the original clock. Note that we refer to res/layout/widget.xml here as our android:initialLayout.</p>
<p>Click the link at the beginning of this section to see what our widget definition should look like.</p>
<p><strong><a href="http://nexsoftware.net/wp/wp-content/uploads/2009/07/res_layout_info.xml.txt" target="_blank">res/layout/info.xml</a></strong>: This file simply provides the layout for an information screen to tell the user about your widget, and provide instructions on how to use it. In our case, we have a very simple widget which requires no configuration, and no special instructions so it will be a very simple layout containing only a LinearLayout and TextView. More complex widgets will usually require more complex information screens.</p>
<p>Click the link at the beginning of this section to see what our info screen should look like.</p>
<p><strong><a href="http://nexsoftware.net/wp/wp-content/uploads/2009/07/res_layout_widget.xml.txt" target="_blank">res/layout/widget.xml</a></strong>: This file provides the layout which we will use for our widget. Again, because this is a simple widget this will be a simple file. In fact, the only elements we will include here are RelativeLayout and AnalogClock. This could also be done without the RelativeLayout, but I usually prefer to have a container in my layout.</p>
<p>Click the link at the beginning of this section to see what our widget should look like.</p>
<p>The remainder of the Resource files listed above are just the graphics we will use for the clock, and need not be specifically mentioned here.</p>
<h3>Java Source Files</h3>
<p><strong>Info.java</strong>: This class extends Activity, and only serves to provide an informational screen to the user. Technically, this is not required for a Widget project, but I recommend it for the following reason:</p>
<p>If you plan to release to the Android Market, it will mitigate those useless and uninformed comments such as &#8220;It doesn&#8217;t launch.&#8221; or &#8220;Please remove from the app drawer.&#8221; and help you to achieve and retain a better ranking in the Android Market. So, I know you are thinking now &#8220;Spill the beans already!&#8221; so here it goes&#8230; Provide an Info activity which opens from the Android Market when the user presses the Open button, but does not add itself to the app drawer (Launcher). Sounds simple enough, so how do we do it? All you need to do is open the AndroidManifest.xml file,</p>
<p>and replace</p>
<p><code>android.intent.category.LAUNCHER</code></p>
<p>with</p>
<p><code>android.intent.category.INFO</code>.</p>
<p>It&#8217;s amazing how a simple change like this can easily amount to a full star or more in your Android Market rankings.</p>
<p>While we are in the AndroidManifest.xml file, we might as well make our other required changes too. Because this is a widget project, we must define our widget in the manifest. To do this, you must define a receiver tag with an intent-filter for <code>android.appwidget.action.APPWIDGET_UPDATE</code> and including a meta-data tag which defines the resource file for the widget.</p>
<p><a href="http://nexsoftware.net/wp/wp-content/uploads/2009/07/AndroidManifest.xml.txt" target="_blank">Click here to see what your AndroidManifest.xml file should now look like.</a></p>
<p><strong>Widget.java</strong>: This is where the magic happens, and is where we will spend the rest of this tutorial. In order to create and use a widget we must extend AppWidgetProvider. Remember, we already added the reference to this class in the AndroidManifest.xml file.</p>
<p>Because this is a very simple widget that relies on nothing but itself (no calls to the web, no background updates, etc&#8230;) our Widget class will be very simple. We will only handle the onReceive event that gets called by the AppWidget framework whenever a Widget is Added, Deleted, Updated, etc&#8230;</p>
<p>In this onReceive method we will only look watch for the &#8220;update&#8221; event, so that we can reapply our Widget when appropriate. For some reason, I decided on a blog format that doesn&#8217;t not work exceptionally well for including code within a post (layout is not really wide enough). Until I find a better layout for this sort of thing, <a href="http://nexsoftware.net/wp/wp-content/uploads/2009/07/Widget_onReceive.txt" target="_blank">please click here to view the code sample for our onReceive method</a>.</p>
<p>At this point, we actually have a working Analog Clock Widget, and could compile and use it as is. But that wouldn&#8217;t be any fun. What we also want to do is handle when the user clicks on the Clock, and take the user to the Alarm Clock application. to do that, we must create a PendingIntent, and assign it to the click event for the widget. Do do that we will add to the onReceive method three lines. <a href="http://nexsoftware.net/wp/wp-content/uploads/2009/07/Widget_onReceive_PendingIntent.txt" target="_blank">Please click here for the updated code</a>.</p>
<p>At this point, all that is left is to replace the widgetdial.png, widgethour.png, and widgetminute.png in the res/drawable/folder with your own graphics, compile, and install.</p>
<p>You can download my Eclipse project for this widget <a href="http://nexsoftware.net/wp/wp-content/uploads/2009/07/CustomAnalogClock.zip">here</a>.</p>
<p>Regrettably, I somewhat rushed this tutorial, since I had promised to get it out as soon as possible, and I am aware that there are things that could be done better (formatting, maybe more verbose, maybe simpler terminology, possibly different writing style). I intend to update this tutorial in the coming days to be fix some of these issues. Please let me know what I can do better, and offer any suggestions for improvements for this and future tutorials.</p>
]]></content:encoded>
			<wfw:commentRss>http://nexsoftware.net/wp/2009/07/29/tutorial-creating-a-custom-analogclock-widget/feed/</wfw:commentRss>
		<slash:comments>67</slash:comments>
		</item>
		<item>
		<title>New Post Series – Custom Drawing in Android</title>
		<link>http://nexsoftware.net/wp/2009/07/27/new-post-series-custom-drawing-in-android/</link>
		<comments>http://nexsoftware.net/wp/2009/07/27/new-post-series-custom-drawing-in-android/#comments</comments>
		<pubDate>Mon, 27 Jul 2009 18:38:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Mobile]]></category>

		<guid isPermaLink="false">http://nexsoftware.net/wp/?p=77</guid>
		<description><![CDATA[In BarTor, we custom draw a lot of our controls, and we do this for a couple of reasons. First, we do this so that we can have better contol of the overall look-and-feel of the application, and we also as a framework for color theming capability (in other words, allowing the user to pick [...]]]></description>
				<content:encoded><![CDATA[            <script type="text/javascript" src="http://nexsoftware.net/wp/wp-content/plugins/wordpress-code-snippet/scripts/shBrushJava.js"></script>
            <script type="text/javascript" src="http://nexsoftware.net/wp/wp-content/plugins/wordpress-code-snippet/scripts/shBrushXml.js"></script>
<p>In BarTor, we custom draw a lot of our controls, and we do this for a couple of reasons. First, we do this so that we can have better contol of the overall look-and-feel of the application, and we also as a framework for color theming capability (in other words, allowing the user to pick his/her own color scheme).</p>
<p>It is my goal to write a series of posts that outline some of the Android drawing classes and methods and how to use them in your own Android applications. While the focus of these posts will be on how we have used them in BarTor, we will certainly be presenting them in a way that makes the information usable for any application.</p>
<p>Stay tuned, the first post in this series is coming soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://nexsoftware.net/wp/2009/07/27/new-post-series-custom-drawing-in-android/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
