package com.example.aymen.webservices;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.ImageView;
import android.widget.TextView;

public class ArticleActivity extends AppCompatActivity {

    TextView title;
    TextView body;
    ImageView image;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_article);

        title= (TextView) findViewById(R.id.title);
        body= (TextView) findViewById(R.id.body);
        image= (ImageView) findViewById(R.id.image);

        Bundle bundle =  getIntent().getExtras();
        title.setText(bundle.getString("TITLE"));
        body.setText(bundle.getString("BODY"));

        String url = bundle.getString("IMAGE");

        ImageLoader imageLoader = new ImageLoader(getApplicationContext());
        imageLoader.DisplayImage(url, image);

    }
}
