open-source

Rss feed of the tag

A developer tool : taming the logcat with pidcat

Written by Xavier Gouchet - 11 september 2013 - no comments

LogCat is a great logging feature which is part of the core Android Developper Experience™. Most of us using an IDE use the DDMS tool to view the LogCat outputs. Some might also use directly the console with adb logcat -v long, with maybe some grep or awk to enhance the result.

Well Jake Wharton (you know, the guy behind ActionBarSherlock) developped PidCat, a Python script to print the LogCat output in the console in a usefull way. Here's how it looks like.

PidCat Screenshot

After a couple of day, I find it better than DDMS LogCat view. And what's great is that it's Open Source, so I'll probably add some features in it myself. You can download it or fork it from PidCat Github Repository.

Axel v2.3 : quick actions and clipboard support

Written by Xavier Gouchet - 15 february 2013 - no comments

Today, the latest version of Axel was launched, bringing many new features to make XML edition simpler.

New version

First of all, I added an implementation of the Done / Discard UI pattern. This make a much clearer interface when editing a node.

Then I added many ways to interact differently with nodes. A friend of mine once taught me that a user must be able to perform a single action in many different way, and better, should be able to change the way an action must be performed.

Quick Actions

So from now on, Axel lets you choose what happens when you tap, double tap or long press a node. By default, actions are edit on tap, add a child on double tap and bring the context menu on long press.

Axel : quick node actions

Speaking of quick action, I used the NewQuickAction library to add a better looking quick action. The same actions are available, with new ones.

Cut, Copy, Paste

A brand new feature is that Axel now support the integration with the Android clipboard, with the famous cut, copy and paste operations. Cut and copy will put the xml node (and hierarchy) as xml text in the clipboard, and psat will parse the clipboard content and insert it inside the selected node's hierarchy.

And as always, if you have any trouble with one of my app or one of my repo on github, please let me know.

Android app on Google Play Fork me on GitHub

A developer tool : AndroidXRef

Written by Xavier Gouchet - 06 february 2013 - no comments

The Android source code is full of information, and I never spend a week without having to find a piece of code in there. The problem with it is that I had to download the git repo, and to use my OS's search to find the relevant piece of code.

Not anymore, thanks to AndroidXRef, a search engine for the Android Open Source Project. Although it's still in beta, it is very usefull to find information on how things are implemented in Android.

Axel v2.1 and two new libraries on Git Hub

Written by Xavier Gouchet - 14 january 2013 - no comments

Axel v2.1 has been released today, and with it a few new things to enhance the user experience. It also went further with non XML files. As I said earlier, Axel can open compressed XML files from Android APK archives. It can now also open binary PList files (mainly used by Apple tools).

This was the occasion to update the sources on GitHub, and create two new independant libraries :

Axel
the full source code for Axel in its version 2.1 is now up to date;
AXML
this (Android) java library implements a parser for binary Android XML files;
PList
another Android library, meant to parse binary PList files;

And as always, if you have any trouble with one of my app or one of my repo on github, please let me know.

Android app on Google Play Fork me on GitHub

Ted Update : now with fonts

Written by Xavier Gouchet - 12 november 2012 - no comments

I just released a new version of my text editor for Android : Ted.

This version, among other things, now lets you set a custom font to display your text. You can now select any TrueType font available on your External / Internal storage.

Ted with custom fonts

Android app on Google Play Fork me on GitHub

If you don't find Views by id, Views will find you

Written by Xavier Gouchet - 11 july 2012 - no comments

One of the first thing an Android developer has to learn, it's to match Views declared in an XML layout to fields in the Activity class. Something that looks like this, repeated for all the views you need to manipulate from your activity.


class MyActivity extends Activity {

    private Button myButton; 

    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_sample_views);
        myButton = (Button) findViewById(R.id.myButtonId);
    }
}

Now this can be quite troublesome, and could be automatized. So here it is, a class to help you fill in your fields. You can download it or fork it directly from GitHub.

The use can be pretty simple, and is just two lines, whatever the number of views you may have :


class MyActivity extends Activity {

    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.my_layout);

        ViewFieldMatcher matcher = new ViewFieldMatcher(R.id.class);
        matcher.matchViews(findViewById(android.R.id.content), this);
    }

This code will automatically match any view to the corresponding field, matching the id name to the field's name.