The story is that, because the company is currently a mobile signs detection products need to network. Department has only one mobile development guy, others are C # developers. Customer is ye Ah! When I was no one to use, helpless, this guy unexpectedly called me this Android novice to move bricks for him. No way, my old man has to bite the bullet. The boy took me this kids! All the way, write a little of his own project cognition
1, add image name in Android Studio can not have uppercase characters, or compile error
2. When writing tablayout in XML, the code is as follows. Where attention is needed such as
<tabhost android:id= "@+id/main_tabhost" android:layout_width= "match_parent" android:layout_height= "Ma Tch_parent "> <linearlayout android:layout_width=" fill_parent "android:layout_height=" Fill_ The id attribute of the parent "android:orientation=" Vertical > <!--tabwidget must be @android: Id/tabs-- <tabwidget android:id= "@android: Id/tabs" android:layout_width= "Match_parent" android:layout_height= "wrap_content" android:layout_weight= "0" android:orientation= "Horizonta L "/> <!--framelayout id attribute must be @android: id/tabcontent---<framelayout Andro Id:id= "@android: Id/tabcontent" android:layout_width= "match_parent" android:layout_height= "MATC H_parent "android:layout_weight=" 0 "> <imageview android:id=" @+id/tab1 " Android:layout_wIdth= "Fill_parent" android:layout_height= "wrap_content" android:src= "@drawable/sample" /> <imageview android:id= "@+id/tab2" android:layout_width= "wrap_content "Android:layout_height=" fill_parent "android:src=" @drawable/new_patient "/> <imageview android:id= "@+id/tab3" android:layout_width= "Wrap_content" android:layout_height= "Fill_parent" android:src= "@drawable/cases"/> <image View android:id= "@+id/tab4" android:layout_width= "Wrap_content" Android:layout_h eight= "Fill_parent" android:src= "@drawable/config1"/> </FrameLayout> </LinearLayout> </TabHost>
To continue .....
Android Learning Notes