Import import android.graphics.Bitmap; import android.widget.ImageView;

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.
The Android GUI Framework Android experience day December 2008 Markus Pilz Peter Wlodarczak.
Android Application Development with Java UPenn CS4HS 2011 Chris Murphy
Layout and Control in UI The user interface (UI) is the graphical interface user can see and interact with your app comprising UI controls like textbox,
@2011 Mihail L. Sichitiu1 Android Introduction Hello World.
Android Application Development Tutorial. Topics Lecture 5 Overview Overview of Networking Programming Tutorial 2: Downloading from the Internet.
1 Mobile Software Development Framework: Android Activity, View/ViewGroup, External Resources, Listener 10/9/2012 Y. Richard Yang.
Introduction to Android Programming Content Basic environmental structure Building a simple app Debugging.
Android development the first app. Andoid vs iOS which is better? Short answer: neither Proponents on both sides For an iOS side, see this article on.
Android Tutorial Team 3 Jerry Yu Mayank Mandava Mu Du Will Wangles.
Package org.androidtown.database.query; import android.app.Activity; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase;
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.
1/29/ Android Programming: FrameLayout By Dr. Ramji M. Makwana Professor and Head, Computer Engineering Department A.D. Patel.
Android Dialog Boxes AlertDialog - Toast
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
로봇 모션 편집기 4/4 UNIT 25 로봇 SW 콘텐츠 교육원 조용수. 학습 목표 에디트 텍스트를 사용할 수 있다. 아이템을 삭제할 수 있다. 아이템을 편집할 수 있다. 2.
Copyright© Jeffrey Jongko, Ateneo de Manila University Basic Views and Layouts.
로봇 모니터링 1/2 UNIT 20 로봇 SW 콘텐츠 교육원 조용수. 학습 목표 Message Queue Handler 2.
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.
Mobile Device Development Camera and Sensors Dr.YingLiang Ma.
Android Using Menus Notes are based on: The Busy Coder's Guide to Android Development by Mark L. Murphy Copyright © CommonsWare, LLC. ISBN:
ANDROID – A FIRST PROGRAM L. Grewe Using AndroidStudio –basic Android  Lets do a “Hello World Project”  Start up AndroidStudio (assume you have installed.
HW#9 Clues CSCI 571 Fall, HW#9 Prototype
Copyright© Jeffrey Jongko, Ateneo de Manila University Deconstructing HelloWorld.
로봇을 조종하자 4/4 UNIT 18 로봇 SW 콘텐츠 교육원 조용수. 학습 목표 Intent Activity 호출 2.
Android and s Ken Nguyen Clayton state University 2012.
아주대학교 LifecareScienceLAB Android Seminar 3 rd class Android Software Development 2011/05/04 – p.m. 06:00 – 팔달관 409 호 아주대학교.
Mobile Computing Lecture#12 Graphics & Animation.
User Interface Layout Interaction. EventsEvent Handlers/Listeners Interacting with a user.
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
Cosc 5/4730 Support design library. Support Design library Adds (API 9+) back support to a number of 5.0 lollipop widgets and material design pieces –
Lecture 3 Zablon Ochomo Android Layouts Lecture 3 Zablon Ochomo
Android Introduction Hello World
CS499 – Mobile Application Development
Android N Amanquah.
GUI Programming Fundamentals
Android – Event Handling
Android Introduction Hello World.
Android Widgets 1 7 August 2018
Android Introduction Hello Views Part 1.
ITEC535 – Mobile Programming
android architecture components with mvvm
Android Dialog Boxes AlertDialog - Toast
Picasso Revisted.
Android Introduction Hello Views Part 2.
CIS 470 Mobile App Development
CIS 470 Mobile App Development
CIS 470 Mobile App 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,
Programski jezici za mobilne aplikacije
CIS 470 Mobile App Development
CIS 470 Mobile App Development
Android Notifications
ארועים ומאזינים android.
Adding Components to Activity
Korea Software HRD Center
CMPE419 Mobile Application Development
ITEC535 – Mobile Programming
Lasalle-App Tecnología Móvil.
Android Sensor Programming
Android Sensor Programming
Android Sensor Programming
User Interface Development
Presentation transcript:

Import import android.graphics.Bitmap; import android.widget.ImageView;

Implement Activity View screen; => Reference to Linear layout UI btnCaptureScreen.setOnClickListener(new public void onClick(View arg0) { screen.setDrawingCacheEnabled(false); screen.setDrawingCacheEnabled(true); bmScreen = screen.getDrawingCache(); showDialog(ID_SCREENDIALOG); }});

@Override protected Dialog onCreateDialog(int id) { // TODO Auto-generated method stub screenDialog = null; switch(id){ case (ID_SCREENDIALOG): screenDialog = new Dialog(this); screenDialog.setContentView(R.layout.dialog);

bmImage = (ImageView)screenDialog.findViewById(R.id.image); TextOut = (TextView)screenDialog.findViewById(R.id.textout); btnScreenDialog_OK = (Button)screenDialog.findViewById(R.id.okdialogbutt on); btnScreenDialog_OK.setOnClickListener(btnScreen Dialog_OKOnClickListener); } return screenDialog; }

@Override protected void onPrepareDialog(int id, Dialog dialog) { // TODO Auto-generated method stub switch(id){ case (ID_SCREENDIALOG): dialog.setTitle(“Captured Screen”); TextOut.setText(EditTextIn.getText().toString()); bmImage.setImageBitmap(bmScreen); break; }

private Button.OnClickListener btnScreenDialog_OKOnClickListener = new public void onClick(View arg0) { // TODO Auto-generated method stub screenDialog.dismiss(); }};

Layout <LinearLayout xmlns:android=" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <Button android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Capture Screen" />

<TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Enter some text here which you will see on captured screen" /> <EditText android:layout_width="fill_parent" android:layout_height="wrap_content" />