Picasso Revisted.

Slides:



Advertisements
Similar presentations
Android Development (Basics)
Advertisements

Android Application Development Tutorial. Topics Lecture 5 Overview Overview of Networking Programming Tutorial 2: Downloading from the Internet.
Package org.androidtown.database.query; import android.app.Activity; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase;
1/29/ Android Programming: FrameLayout By Dr. Ramji M. Makwana Professor and Head, Computer Engineering Department A.D. Patel.
Android Programming-Activity Lecture 4. Activity Inside java folder Public class MainActivity extends ActionBarActivity(Ctrl + Click will give you the.
Android - Broadcast Receivers
로봇 모니터링 1/2 UNIT 20 로봇 SW 콘텐츠 교육원 조용수. 학습 목표 Message Queue Handler 2.
Android Boot Camp Demo Application – Part 1. Development Environment Set Up Download and install Java Development Kit (JDK) Download and unzip Android.
Handling View Events. Open the *MainActivity.java* which is the Activity that hosts the layout in "activity_main.xml". The setContentView method inside.
Android and s Ken Nguyen Clayton state University 2012.
TCS Internal Maps. 2 TCS Internal Objective Objective :  MAPS o Integration of Maps.
創造工学設計 I 電子情報工学科4年(前期) 9 回目 ( 18/6/2015) 担当 古山彰一
User Interface Layout Interaction. EventsEvent Handlers/Listeners Interacting with a user.
Android Alert Dialog. Alert Dialog Place Button to open the dialog. public class MainActivity extends ActionBarActivity { private static Button button_sbm;
Cosc 5/4735 YouTube API. YouTube The YouTube Android Player API enables you to incorporate video playback functionality into your Android applications.
Contents Searches related to Android RatingBar Basics Android ratingbar example Android custom ratingbar.
Google map v2.
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
CHAPTER 1 Part 2 Android Programming. Chapter objectives: Understand how to create a simple Android project Understand how to create a manifest file Understand.
Lab7 – Appendix.
Lab7 – Advanced.
UNIT 11 로봇 전화번호부 3/4 로봇 SW 콘텐츠 교육원 조용수.
GUI Programming Fundamentals
Android – Event Handling
Android dan database 2 M. Taufiq, M. Kom.
Android Dr. Vaishali D. Khairnar IT Department
S.RENUKADEVI/AP/SCD/ANDROID - Notifications
Android Widgets 1 7 August 2018
Android – Read/Write to External Storage
CIS 470 Mobile App Development
Android Programming Lecture 4
CIS 470 Mobile App Development
CIS 470 Mobile App Development
CIS 470 Mobile App Development
CIS 470 Mobile App Development
CIS 470 Mobile App Development
CIS 470 Mobile App Development
CIS 470 Mobile App Development
Android Sensor Programming
CIS 470 Mobile App Development
CMPE419 Mobile Application Development
CMPE419 Mobile Application Development
UNIT 08 그림책 만들기 2/2 로봇 SW 콘텐츠 교육원 조용수.
BMI Android Application will take weight and height from the users to calculate Body Mass Index (BMI) with the information, whether user is underweight,
CMPE419 Mobile Application Development
Activities and Intents
CIS 470 Mobile App Development
滑動 建國科技大學 資管系 饒瑞佶.
CIS 470 Mobile App Development
CIS 470 Mobile App Development
CIS 470 Mobile App Development
CIS 470 Mobile App Development
CIS 470 Mobile App Development
ארועים ומאזינים android.
CIS 470 Mobile App Development
Adding Components to Activity
CMPE419 Mobile Application Development
BLP 4216 MOBİL UYGULAMA GELİŞTİRME-2
CMPE419 Mobile Application Development
Activities, Fragments, and Intents
CIS 470 Mobile App Development
Android Sensor Programming
Android Sensor Programming
CIS 694/EEC 693 Android Sensor Programming
CIS 694/EEC 693 Android Sensor Programming
Android Sensor Programming
CIS 470 Mobile App Development
CIS 694/EEC 693 Android Sensor Programming
Presentation transcript:

Picasso Revisted

Updated Android wants gradle line to be “implementation” rather than previous “compile” Change in gradle wants to be sync’ed again

Choose to Sync

Picasso site/documentation

Add Internet permission to manifest

main_activity.xml <Button android:id="@+id/btnGetImage" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginLeft="18dp" android:layout_marginTop="15dp" android:text="Get image from URL" /> <ImageView android:id="@+id/ivFromURL" android:layout_height="match_parent" android:adjustViewBounds="false" android:scaleType="fitXY" android:src="@mipmap/ic_launcher" />

MainActivity.java package com.example.blum.myapplication; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.ImageView; import com.squareup.picasso.Picasso; public class MainActivity extends AppCompatActivity { ImageView imgFromURL; String url= "http://www.rewildthyself.com/wp-content/uploads/2015/03/poop.jpeg"; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); imgFromURL = (ImageView) findViewById(R.id.ivFromURL); Button btnGetImage = (Button) findViewById(R.id.btnGetImage); btnGetImage.setOnClickListener(new View.OnClickListener(){ @Override public void onClick(View v) { loadImageFromUrl(url); } //end onClick }); //end setOnClickListener } //end onCreate private void loadImageFromUrl(String url){ // http://square.github.io/picasso/ Picasso.get().load(url).into(imgFromURL); } }//end MainActivity

Before and after clicking button