5/20/12

How to make screen (or window) in Adndroid

In android programming, screen or window object named Activity.
Here is example code that display list of items from simple strings array :
public class NisuiActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        ListView lv= (ListView)findViewById(R.id.listview);

        

        // create the grid item mapping

        String[] from = new String[] {"rowid"};
        int[] to = new int[] { R.id.item1 };

 

        // prepare the list of all records

        List<hashmap<string, string>> fillMaps = new ArrayList<hashmap<string, string>>();

        for(int i = 0; i < 10; i++){

            HashMap<string, string> map = new HashMap<string, string>();
            map.put("rowid", "" + i);

            fillMaps.add(map);

        }

 

        // fill in the grid_item layout
        SimpleAdapter adapter = new SimpleAdapter(this, fillMaps, R.layout.grid_item, from, to);
        lv.setAdapter(adapter);        
        
        
    }

}

When you run the code you got something like this:

5/17/12

Planing Design

Now i'm trying to plan the views.
I think the application will consist from two views:
1.  all the lists (for managing all lists)
2.  items of current list (for managing items)
I'm not good designer at all, as you can see from my design.
But here is all list screen:
And here is Items screen - where user will be able to check , delete and edit items:


5/16/12

Open repository at Github

In purpose to do things in a professional way (like many other decent developers) - i decided to open my own repository at github. In github the source will be accessible to everyone who want to see it
Today i created my first repository , and you can see the source here, or download it by press ZIP button





Getting started with docker

It is very simple to get started usig docker. All you need to do-is download the docker desktop for your system Once you get docker syste...