Palette of Drag-and-Drop Elements for Designing Interface(Layout,widgets,etc) Hto word-Cltempandraid studio ile Edit yew Navigate Code Analyze Refactot Buld Run Tools VCS dow Help a activity-mainlx ¥TGpp 6 □Layouts 圆R国s日OQ.,里Device Screen 事es 画Textview零stng/hello.world 来drawablc LinearLayout (Verti 白yout Hello world 已TableLayout attvy间.main. h柱llo wote边 立menu ◆aPs 国RelativeLayout Widgets ?57 Mediun Text Small Text layoutheight match_parent Small Button Rad oButton alpha CherkBox background ImapeButton ImapeView contentDescription ogre(No Design Text 11
11
Parameters of Drag-and-Drop Elements for Designing Interface (e.g.colors,dimensions of widgets,etc) 回3 e4Ando p吧 口a0 白Layouts ■目DQ Device Screen Frametayout HIKelativel awut 位1e LinearLay0AHot记 象Helloorld activity.mainxml TabieRow GricLeyout ©Gradle Scripts 色Main Textview Large Text 75 Medium Text Small Text lButton style Smrall Button h CheckBox background nSwitch backgoundTint Imageview contentDescnption ProgressBar (Large eievetion Design Text N5A36 mEo时tooF罩G/adle Consoe Muemon Monitar 12
12
Importing Existing Codes Following the training material on Android Developer site to learn how to import external codes into Android studio https://developer.android.com/sdk/installing/migrate.html You can explore rich sample codes in Github and Android developer site 13
Importing Existing Codes • Following the training material on Android Developer site to learn how to import external codes into Android studio https://developer.android.com/sdk/installing/migrate.html • You can explore rich sample codes in Github and Android developer site 13
Android Studio File Structure Android project files can be 了apP categorized into three groups: ☐manifests AndroidManifest.xml ▣java com.example.toml.myapplication Resources (layout and com.example.toml.myapplication (androidTest) v□res resource) ▣drawable p▣layout P▣menu 。Java codes p▣mipmap p▣values Gradle Scripts Connections between layout and Java codes 14
Android Studio File Structure Android project files can be categorized into three groups: • Resources (layout and resource) • Java codes • Connections between layout and Java codes 14
File Structure ·Java files MyApplicationapp□src/□main□java▣com回example▣toml回myapplication)MainActivity 花Android, MainActivity java x activity_mainxml x AndroidManifest.xml x setContentVie (R.layout.netivity_main): y☐manifests AndroidManifest.xml 20verrida com.example.toml.myapplication MainActivity /∥Inflate the0中u,ths4d1 tems to the年ction bar1 f it is pre5at com.example.toml.myapplication(androidTest) get调enuTnflater0.inf且ate很nenu.menn_msi画nw: return trae ▣drawable □layout eOverride ▣menu mipmap publie booleam onOptionsItomSelected (MennItom iton){ values Gradle Scripts /sutomstically handIa clicks on the Home/Up button se long build.gradle (Project MyApplication) imt id=item.getItenIdO build.gradle(Module app) proguard-rules-pro (ProGuard Rules for app) gradle.properties (Project Properties) if (id =R.id.netion settings){ settings.gradle (Project Settings) retura trae: localproperties (SDK Location) 15
File Structure • Java files 15