Category: Android


While watching some videos on youtube, I noticed a change! Yes, after Android Market following the Microsoft’s Metro UI, it’s now our favorite Youtube that’s following up on the tile based UI that MS introduced with their WP7 release. Now that we’ll going to see Metro UI in Windows 8 (Tablets and PCs) and in Xbox 360, I expect that others will follow the same trend soon.

 

image

 

Heads up to Microsoft for the introducing a simplistic, fast and neat UI for modern devices.

Text is one of the most important part of any application or game regardless of the platform it is running on. Without good fonts your overall design doesn’t finish up looking neat.

I was recently making and designing a small fun app for Android (find it here) and I opted to use paper/pencil sort of design for it. I happily designed some backgrounds with paper textures (in GIMP) but eventually I faced a bad situation since Android doesn’t have a font (natively available) that gives a sketchy/handwriting type of look to the text. Without the fonts I liked the app to have, the overall feel of the application would be ruined. I was using libgdx for the main part but one of the screens was build with Android views and layouts. Libgdx does support custom fonts and integrating it was smooth. The problem aroused when I tried to use the same font for the views I was using in the other activity. After a lot of experimenting and surfing on the internet, I got it to work!

So, here’s what you need to do in order to use custom fonts in your apps. Before beginning, let me make this clear that font files are incorporated in your app’s apk. This means that the more larger the font file (.ttf) is the larger your apk will become.

  • First step – Choose a font! Remember, the font should not be large enough that results in drastically increasing the apk size.
  • Then, you need to copy its TTF file into the assets folder of your app/game. You can directly put it into this folder or you can also keep a separate folder inside the assets for fonts.
  • Declare a Typeface instance either globally or inside the function in which you’ll assign this to your controls.
  • Next, initialize this variable by calling Typeface.createFromAsset function like below:

image

  • I made a fonts folder inside the assets folder and the same was specified in the function argument. I found people using and suggesting createFromFile function instead of createFromAsset but that simply didn’t work out for me. So this is what I will recommend to my readers.
  • Now that you have the Typeface initialized, you can simply assign it to any view that has something to do with fonts or text (EditText, TextView etc). You need to use setTypeface function of the view in order to assign the typeface to that view.

And that’s it! Do get back to me with your queries or if you have other method of achieving this objective in Android apps/games.

Native dialogs in Android are boring! Open-mouthed smile if you are developing an app having some cool and customized theme then doing something about those dull dialogs is a must. They wouldn’t just compliment the overall look of your application. I faced this kinda scenario recently and while experimenting and trying different suggestions on forums, I finally got around it and made it to work!

First things first, as far as my experience went, AlertDialog is not going to help you here. It just don’t get rid of that black background that is there by default (talking about gingerbread dialogs here). No matter what you do, it’ll always show the black background from behind your image (if you have any). Anyways, to create a custom dialog, we need to create a layout first in a separate xml file. Here’s an example:

Capture

This is just a simple layout having a background image that has irregular borders. Now we just need to write a few lines of code in order to make it work:

Capture

Here, we are setting the background color to transparent in order to get rid of the default dialog background color. After that, we just need to assign the layout resource to the dialog and that gets the job done.

Notice the resultDlg.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND); This will remove the dim effect that makes your parent layout a bit darker. You can also set some additional flags like adding a blurred effect to the background/host activity from which this dialog is invoked. To do this, simply use the addFlags function with FLAG_BLUR_BEHIND flag. Here’s the exact statement:

resultDlg.getWindow().addFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND);

This will create a very nice blur effect which I find more neat than the original dim effect. And that ends this post here. Feel free to comment and ask questions, I’ll try to answer them as swiftly as I can.

Quite a long title, isn’t it? Smile

On-screen keyboard usually takes around half of the screen space while it’s shown. Most of the times it hides important controls/views that you want to be shown to the user all the times. Consider a layout having a EditText widget at the top, a list or some other control in the middle and some Buttons right at the bottom. While the user is writing text in the EditText view through on-screen keyboard, the buttons would be hiding behind it. Luckily, Android has an option to handle this scenario automatically without writing much code.

To enable a layout to adjust itself while the keyboard is shown, you need to configure an attribute for its host activity through AndroidManifest.xml file. Here’s how to do it:

<activity android:name="TestActivity" android:windowSoftInputMode="adjustResize" android:screenOrientation="portrait">

By setting android:windowSoftinputMode of this activity to adjustResize you are telling it to resize itself while the on-screen keyboard is shown. This will let the activity to shorten it’s layout in order to show everything that’s present over it. For example, if you have some buttons at the bottom of the screen, this setting will show them just above the keyboard helping the user to interact with them without closing the keyboard.

There’s one important catch in this however, this configuration DOES NOT work if the application is bound to run in full-screen. This is normally done by setting it’s android:theme attribute to @android:style/Theme.NoTitleBar.FullScreen in AndroidManifest.xml file.

This is one simple and neat technique to make your layout more flexible and user-friendly.

Checkers Redux is out now!

The wait is finally over, we have just unleashed our new checkers game on Android, GetJar and LGWorld marketplaces. Here’s the game’s description:

“Here comes the rebirth of one of the most played and entertaining board games on earth; The Checkers!

Play in Single player mode with your phone or in Multiplayer mode with your friends. Track your past performances against your phone and become a Checkers/Draught Master!

Play on Beach, on Leaves, on Paper and with Smileys (all selectable themes, more to come in future versions)

Choose from 4 difficulty levels. From Beginners to Advance level players, this game is for all. Challenge your inner Checkers/Draughts player to beat the phone in the best possible ways!

Intuitive touch controls make it easy to play checkers on your phone, just tap a piece and then tap where you want it to go. If you accidentally hit the wrong spot, the undo buttons let you take back your move and try again.”

Checkout the video after the break!

Here are the Android Market Links:

Paid:
https://market.android.com/details?id=excelarz.games.checkersRedux.paid

Free:
https://market.android.com/details?id=excelarz.games.checkersRedux.Free

Checkers Redux is out now!

The wait is finally over, we have just unleashed our new checkers game on Android, GetJar and LGWorld marketplaces. Here’s the game’s description:

“Here comes the rebirth of one of the most played and entertaining board games on earth; The Checkers!

Play in Single player mode with your phone or in Multiplayer mode with your friends. Track your past performances against your phone and become a Checkers/Draught Master!

Play on Beach, on Leaves, on Paper and with Smileys (all selectable themes, more to come in future versions)

Choose from 4 difficulty levels. From Beginners to Advance level players, this game is for all. Challenge your inner Checkers/Draughts player to beat the phone in the best possible ways!

Intuitive touch controls make it easy to play checkers on your phone, just tap a piece and then tap where you want it to go. If you accidentally hit the wrong spot, the undo buttons let you take back your move and try again.”

Checkout the video after the break!

Looking similar, aren’t they??

WP7-Metro-UI

WP7’s Metro UI

new_android_market

New Android Market’s Main Page

The soccer edition of Sports Eye has been reviewed recently by Paul Wilks on AndroidTapp.com. Here’s some extract from his review:

Sports Eye – Soccer is a sports news aggregator that specialises on soccer (football in the UK). Users can specify sources, choosing to select players of interest, blogs and news sources. There is also fixture lists, past scores and league tables. The app itself is nicely developed and navigation is effortless and relatively fast.”

Hit the link after the break to read the full review:


http://www.androidtapp.com/sports-eye-soccer/

The review overall has been encouraging and we’ll start improving the application to overcome the shortcomings that were mentioned. The next release will include:

  • More News, Blogs, Scores, Schedules and Ranking Sources
  • More Players
  • In-app viewer instead of opening the browser
  • Users shall be able to suggest a news, blog and other sources (as well as players). They’ll be incorporated inside the app in the form of subsequent minor releases.

Recently, we at excelarz Interactive made a series of Sports Apps that enables user to follow their choice of sports in an intuitive and flexible manner. The set of applications offers its user to view news, live scores, blogs, players, schedule, draws, twitter feeds according to his choice. What we needed was to build the apps in a way as to enhance the usabilty by letting the user customize the application in a way that he choses.

For implementing the switching between selected information types (news, blogs, scores, players, twitter, schedule etc), we first looked into the native tab control of Android. After digging enough, we concluded that the tab control would not help us accomplish this variable nature that we required from it due to its rigid set of options and properties.

We then came up with the idea of using the Gallery view for achieving this functionality. What we do is we make some images for each of the tab that we require to have in our application. Then a simple adapter is created (which is required to populate the gallery dynamically) and pass on the list of selected tabs to the adapter. The adapter then creates the view as per the selection made by the user. This way we managed to acheive a sliding choice bar for selection of different info type.

See the tab bar in action the the following video.

This approach may definity not the ideal one in this scenario but we did achieve what we wanted to do. Any suggestion on improvements and alternative is more than welcome.

Early this morning while i was going through the download stats of my apps, I noticed a new ‘Statistics’ link against each application info. This is shown in the screenshot below:

Upon clicking the link, you are presented with pretty useful information in graphical format. The information include Accumulated installs trend, OS breakup, Device breakup,  Country and Language statistics in the form of pie-chart. The stats shows both the overall market statistics as well as those specific to your application.

This new feature seems quite useful in a sense that you can now find out your niche in terms of countries and devices. Also you can find out and improve your application based on the version of Android it is being used mostly.

 

Follow

Get every new post delivered to your Inbox.