Which Android control to use?

后端 未结 4 990
北荒
北荒 2020-12-29 00:19

I\'m taking my first steps in Android programming.

My application is to create entries in a database. For this task I have created a new Activity. All is fine - but

4条回答
  •  灰色年华
    2020-12-29 00:57

    One way to figure out what an existing activity does is to use hierarchyviewer and examine the activity's contents.

    Another way to figure out what a native Android activity does is to look at the source code. In this case, it would appear that the buttons are inside of a horizontal LinearLayout with style="@android:style/ButtonBar" to give the silver sheen. That style, in turn, uses @android:drawable/bottom_bar as its background. That image can be found in your SDK installation -- go to the platform directory of your choice, then data/res/drawable-hdpi and data/res/drawable-mdpi for the two versions.

提交回复
热议问题