Android app Draw Shapes

My first Android App Draw Shapes, which is actually my first assignment of android programming class, is now on Google Play. The code is shared at GitHub.

ActionBar

I want to show the user what they are drawing on the action bar. So I put a DrawingShapeView in action_bar layout, and set it up in my MainActivity class.

MainActivity.setupActionBar()link
1
2
3
4
5
6
7
8
View actionBarView = LayoutInflater.from(this).inflate(R.layout.action_bar, null);
((DrawingShapeView) actionBarView.findViewById(R.id.drawingShape)).setup(model, painter);
//...
ActionBar actionBar = getActionBar();
actionBar.setCustomView(actionBarView);
actionBar.setDisplayShowHomeEnabled(false);
actionBar.setDisplayShowTitleEnabled(false);
actionBar.setDisplayShowCustomEnabled(true);

Read More