Skip to main content

Posts

Showing posts from November, 2014

Indian Newspapers and magazines - new version released

I have published version 2.0 of my Indian Newspapers and magazines app for android phone to google play.

I have added many more papers in regional languages and many more magazines as well. But you don't have to worry about clutter of all those papers on screen. You can select and deselect only those papers you need.

As is the new tradition, the categories are displayed as action bar tabs. So you can swipe them. 

And the option to save the files for offline reading is present.

As some user had commented on advertisement filling lot of real estate on screen, I have tried reducing ad sizes on my part. But some papers publish their own huge ads which are not in my control. 

The version does not support android 2.2 as google play has some problems with that. I took that risk as most of the users are having newer versions of android.

And another omission has been ability to add news papers. I will certainly add that feature in the next bug fix release within a fortnight. 

So download app and…

Action bar menu items and Fragments

 How do we create menu items?
You can add menu items through code. But the easier method is writing an xml file in ../res/menu folder.

/res/menu/mymenu.xml

<menu xmlns:android="http://schemas.android.com/apk/res/android"

    >
    <item
        android:id="@+id/action_settings"
        android:icon="@android:drawable/some_icon"
        android:title="Customize"/>
     <item       
         android:id="@+id/action_settings"
        android:icon="@android:drawable/some_icon"
        android:title="Customize"/>
</menu>

Next  write the onCreateOptionsMenu() method of your fragment like this.

@Override
    public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
        MenuInflater mnuInflater = getActivity().getMenuInflater();
        mnuInflater.inflate(R.menu.mymenu, menu);
        super.onCreateOptionsMenu(menu, inflater);
    }

Can Fragments add their own action bar menu items?

Yes, They can. To the…