Android: Replace return key with done, go, send...
- Category: AndroidOS
- Hits: 37232
A quick article on how to replace the return key on a soft keyboard (software based) on a touch-device.
Why?
I have an editText where a user can enter any text value but if they typed a return character, the app would crash because it didn't understand the data. I tried replacing the new lines but just stopping the return key or trying to catch it is an obsolete method.
How?
Android: Keytool and Google Maps displaying grey
- Category: AndroidOS
- Hits: 49503
- Microsoft Windows 7 Pro
- Android Studio v0.8.6 beta
- Java Development Kit v1.8.0_20
What?
The article below serves as a checklist to ensure I don't release an app that only displays maps to myself (again).
Why?
This took me a while to figure out so hopefully this will help others.
How?
The gist is that I was using the Test SHA1 when adding allowed Android Keys to the Google APIs console (there's so many) when I should be using the App SHA1 (I have now added both to the console).
Android Java: Remove first two entries from Google News feed in SimpleRssReader
- Category: AndroidOS
- Hits: 29919
A quick article on how to remove the first two entries from a RSS feed produced by a bunch of java files collectively known as "SimpleRssReader.
Why?
The original file reads of a feed from PCWorld.com. I adapted this to read a google news rss feed and the first two entries are "<query> - Google News", everytime. This article documents what I did to fix it.
How?
Basic to some but I'm new to the game. I'm trying to remove the first two entries from a news feed from a Google News feed.
Two icons created on Android
- Category: AndroidOS
- Hits: 21807
If you're installing an app and it creates two icons:
Why?
I don't think I'll forget this one but I was stumped for a bit until I found it on the a forum: Stack Overflow: Android App Development.
How?
Basically don't have the following declared more than once in the AndroidManifest.xml
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
MessageBox or AlertDialog in Android Java
- Category: AndroidOS
- Hits: 31269
A quick article on how to display a OK/Cancel popup which I use as a message to the user for debug purposes.
Why?
It's similar to javascript's message box or confirm box, only Android let's you redesign the dialog. For my purposes I have used an XML as the layout.
How?
This displays a standard Ok/cancel message popup which you attach to some event
Basic Android App using Google Maps and Current Location
- Category: AndroidOS
- Hits: 132534
- Android Studio (Beta) 0.8.6
- Google Android Maps API
What?
I am writing an app for a tablet running Android and wanted to include a Google Map. The following exercise focuses solely on creating an app which opens Google Maps at your current location.
How?
I couldn't find any instructions using the tools I had (Android Studio) which is why I've written this article.
$_SERVER['http_referer'] returns blank in Internet Explorer
- Category: Microsoft
- Hits: 21302
Thought I'd put a note about this as I spent ages rewriting an entire system. The HTTP_REFERER environment variable can be changed by the user anyway but I was using it as an additional validation check.
The only solution is to not use it for verification purposes as it will only work in every other browser except Internet Explorer (more specifically versions 6 and 7...???)
For more details: http://www.webmaster-talk.com/php-forum/19149-_server-http_referer-fails-under-internet-explorer.html
Sort order a dropdown list in MS InfoPath without programming
- Category: Infopath
- Hits: 59192
So this is for Microsoft Office Infopath 2007 (SharePoint 2007).
The situation is that I started creating a SharePoint List (datasheet) and when I made my form dropdown read from the list, it just put elements in the order that I entered them in the datasheet.
Googling this led me to browse MSDN for an hour before I realised all those experts were using programming solutions that seemed a bit over the top for something that should be so simple.
Hey presto, I found a cheat/workaround:
- Click on the list to see your datasheet (has a MS Access icon in the top left to remind you what you're getting yourself into)
- Go to Settings
- Select Create View
- Select Datasheet View (you could probably use a "Standard View", I just used the Datasheet one)
- Give the view a name, select what columns you want the form to have (I included the IDs for functional purposes)
- Further down the "Create View" page, there should be a Sort section, specify the column to sort by.
- Save the view by clicking the OK button.

