ITEC535 – Mobile Programming

Slides:



Advertisements
Similar presentations
User Interface Classes.  Design Principles  Views & Layouts  Event Handling  Menus  Dialogs.
Advertisements

Application Fundamentals. See: developer.android.com/guide/developing/building/index.html.
Who Am I And Why Am I Here I’m professor Stephen Fickas in CIS – you can call me Steve. I have a research group that works with mobile devices (since 1995!)
User Interface Android Applications. Activities An activity presents a visual user interface. Each activity is given a default window to draw in. The.
Android Form Elements. Views Provide common UI functionality Form elements: text area, button, radio button, checkbox, dropdown list, etc. Date and time.
Client / Server Programming in Android Eclipse IDE Android Development Tools (ADT) Android SDK
The Android GUI Framework Android experience day December 2008 Markus Pilz Peter Wlodarczak.
Android Application Development with Java UPenn CS4HS 2011 Chris Murphy
@2011 Mihail L. Sichitiu1 Android Introduction Hello World.
Creating Android user interfaces using layouts 1Android user interfaces using layouts.
Introduction to Android Programming Content Basic environmental structure Building a simple app Debugging.
Chapter 9: Customize! Navigating with Tabs on a Tablet App.
1 Mobile Computing Monetizing An App Copyright 2014 by Janson Industries.
Android Layouts. Layouts Define the user interface for an activity Layouts are defined in.xml files – within /res/layout folder – different layout can.
ANDROID – INTERFACE AND LAYOUT L. Grewe. Interfaces: Two Alternatives Code or XML  You have two ways you can create the interface(s) of your Application.
1 Announcements Homework #2 due Feb 7 at 1:30pm Submit the entire Eclipse project in Blackboard Please fill out the when2meets when your Project Manager.
Frank Xu Gannon University.  Linear Layout  Relative Layout  Table Layout.
1/29/ Android Programming: FrameLayout By Dr. Ramji M. Makwana Professor and Head, Computer Engineering Department A.D. Patel.
Programming with Android: Layouts, Widgets and Events Luca Bedogni Marco Di Felice Dipartimento di Scienze dell’Informazione Università di Bologna.
Application Development for mobile Devices
Mobile Programming Lecture 5 Composite Views, Activities, Intents and Filters.
Import import android.graphics.Bitmap; import android.widget.ImageView;
Copyright© Jeffrey Jongko, Ateneo de Manila University Basic Views and Layouts.
UI Design and Development +Roman Nurik +Nick Butcher.
1 Introducing Activity and Intent. 2 Memory LinearLayout, weight=2 LinearLayout, weight=1 TextView ListView.
ANDROID – DRAWING IMAGES – SIMPLE EXAMPLE IN INTERFACE AND EVENT HANDLING L. Grewe.
Android App Basics Dr. David Janzen Except as otherwise noted, the content of this presentation is licensed under the Creative Commons Attribution 2.5.
MOBILE COMPUTING D10K-7D02 MC04: Layouts Dr. Setiawan Hadi, M.Sc.CS. Program Studi S-1 Teknik Informatika FMIPA Universitas Padjadjaran.
Android ImageView and Splash Screen 1. After copying an image file (Ctrl-c or right click copy), right click and paste it into one of the res/drawable.
HW#9 Clues CSCI 571 Fall, HW#9 Prototype
1 Android Development Lean and mean introduction Based on a presentation by Mihail L. Sichitiu.
Android and s Ken Nguyen Clayton state University 2012.
CS378 - Mobile Computing User Interface Basics. User Interface Elements View – Control – ViewGroup Layout Widget (Compound Control) Many pre built Views.
Mobile Computing Lecture#12 Graphics & Animation.
Android 基本 I/O. 基本 I/O 介面元件 在此節中主要介紹常見的 I/O 使用者介 面元件 – Button, TextView, 以及 EditText , 學習者可以學會: – Android 的視窗表單設計 res/layout/main.xml – Android SDK –
CMPE419 Mobile Application Development Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department Asst.Prof.Dr.Ahmet Ünveren
CMPE419 Mobile Application Development Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department Asst.Prof.Dr.Ahmet Ünveren
Lecture 3 Zablon Ochomo Android Layouts Lecture 3 Zablon Ochomo
Android Introduction Hello World
Android Layouts 8 May 2018 S.RENUKADEVI/AP/SCD/ANDROID LAYOUTS 1.
Android N Amanquah.
Adapting to Display Orientation
Android Date /Time – TabWidget - ActionBar
Mobile Software Development for Android - I397
Android Introduction Hello World.
Mobile Application Development Chapter 4 [Android Navigation and Interface Design] IT448-Fall 2017 IT448- Fall2017.
Android Introduction Hello Views Part 1.
ITEC535 – Mobile Programming
Politeknik Elektronika Negeri Surabaya
HNDIT2417 Mobile Application Development
CIS 470 Mobile App Development
CS323 Android Model-View-Controller Architecture
Android Layout Basics Topics
CIS 470 Mobile App Development
CMPE419 Mobile Application Development
BMI Android Application will take weight and height from the users to calculate Body Mass Index (BMI) with the information, whether user is underweight,
Note Q) How to format code in Enclipse? A) Ctrl + i
Android Developer Fundamentals V2
Programski jezici za mobilne aplikacije
CIS 470 Mobile App Development
CIS 470 Mobile App Development
CMPE419 Mobile Application Development
Korea Software HRD Center
CMPE419 Mobile Application Development
CMPE419 Mobile Application Development
Lasalle-App Tecnología Móvil.
Android Sensor Programming
Android Sensor Programming
Android Sensor Programming
Presentation transcript:

ITEC535 – Mobile Programming BTEP205 İşletim Sistemleri Eastern Mediterranean University School of Computing and Technology Master of Information Technology ITEC535 – Mobile Programming Anatomy of the Tabbed Applications Dr.Ahmet Rizaner

Introduction Sometimes, we want to wrap multiple views in a single window and navigate through them with a Tab Container. This can be done in Android using TabHost control. There are two ways to use a TabHost application in Android: Using the TabHost to navigate through multiple views within the same activity. Using the TabHost to navigate through Actual multiple Activities using intents. ITEC535 - Mobile Programming

Anatomy of the Tabbed Application An activity with a TabHost may look like this: The Activity consists of: A TabHost: The root element of the layout The TabHost wraps a TabWidget which represents the tab bar. The TabHost wraps a FrameLayout which wraps the contents of each tab. ITEC535 - Mobile Programming

Layout of the Tabbed Application … <TabHost xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/tabHost" android:layout_width="fill_parent" android:layout_height="fill_parent“ > <TabWidget android:layout_height="wrap_content" android:id="@android:id/tabs" /> <FrameLayout android:layout_height="fill_parent" android:id="@android:id/tabcontent" > (Content of the tabs should be defined here) </FrameLayout> </TabHost> ITEC535 - Mobile Programming

Layout of the Tabbed Application For example, a tab may contain a single TextView element with a LinearLayout. … <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/tab1" android:orientation="vertical"> <TextView android:text="This is tab1"/> </LinearLayout> ITEC535 - Mobile Programming

Layout of the Tabbed Application Another example with a RelativeLayout. … <RelativeLayout android:id="@+id/tab1" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical"> <TextView android:id="@+id/textView1" android:text="This is tab 1" /> <EditText android:id="@+id/editText1" android:layout_alignBottom="@+id/textView1" android:layout_toRightOf="@+id/textView1" android:inputType="text" /> </RelativeLayout> ITEC535 - Mobile Programming

Adding Tabs We create tabs using TabSpecs class. We set the title of each tab using TabSpecs.setIndicator() method. We set the content of each tab using TabSpecs.setContent() method. ITEC535 - Mobile Programming

Adding Tabs Example: … TabHost tabHost=(TabHost)findViewById(R.id.tabHost); tabHost.setup(); TabSpec spec1=tabHost.newTabSpec("Tab 1"); spec1.setContent(R.id.tab1); spec1.setIndicator("Tab 1"); TabSpec spec2=tabHost.newTabSpec("Tab 2"); spec2.setIndicator("Tab 2"); spec2.setContent(R.id.tab2); TabSpec spec3=tabHost.newTabSpec("Tab 3"); spec3.setIndicator("Tab 3"); spec3.setContent(R.id.tab3); tabHost.addTab(spec1); tabHost.addTab(spec2); tabHost.addTab(spec3); ITEC535 - Mobile Programming