Advertisement
euis_kusesa

MainActivityDetail.java

Dec 24th, 2018
411
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.94 KB | None | 0 0
  1. package com.example.asusx441n.examplelistviewdinamis;
  2.  
  3. import android.content.Intent;
  4. import android.support.v7.app.ActionBar;
  5. import android.support.v7.app.AppCompatActivity;
  6. import android.os.Bundle;
  7. import android.view.View;
  8. import android.widget.ImageView;
  9. import android.widget.LinearLayout;
  10. import android.widget.TextView;
  11.  
  12. import com.bumptech.glide.Glide;
  13. import com.bumptech.glide.load.engine.DiskCacheStrategy;
  14.  
  15. public class MainActivityDetail extends AppCompatActivity {
  16.  
  17.     Global global = new Global();
  18.  
  19.     @Override
  20.     protected void onCreate(Bundle savedInstanceState) {
  21.         super.onCreate(savedInstanceState);
  22.         setContentView(R.layout.activity_main_detail);
  23.  
  24.         ActionBar menu = getSupportActionBar();
  25.         menu.setDisplayShowHomeEnabled(true);
  26.         menu.setDisplayHomeAsUpEnabled(true);
  27.  
  28.         TextView amd_tv_title = (TextView) findViewById(R.id.amd_tv_title);
  29.         TextView amd_tv_provinsi = (TextView) findViewById(R.id.amd_tv_provinsi);
  30.         TextView amd_tv_content = (TextView) findViewById((R.id.amd_tv_content));
  31.         TextView sdd_tv_autor = (TextView) findViewById(R.id.sdd_tv_autor);
  32.         TextView sdld_tv_descriptionend = (TextView) findViewById(R.id.sdld_tv_descriptionend);
  33.  
  34.         ImageView amd_iv_ceritarakyat = (ImageView) findViewById(R.id.amd_iv_ceritarakyat);
  35.  
  36.         amd_tv_title.setText(getIntent().getStringExtra(global.DATA_TITLE));
  37.         amd_tv_provinsi.setText(getIntent().getStringExtra(global.DATA_PROVINSI));
  38.         amd_tv_content.setText(getIntent().getStringExtra(global.DATA_CONTENT));
  39.         sdd_tv_autor.setText(getIntent().getStringExtra(global.DATA_AUTHOR));
  40.         sdld_tv_descriptionend.setText(getIntent().getStringExtra(global.DATA_OUTCOME));
  41.  
  42.  
  43.         Glide.with(MainActivityDetail.this).load(getIntent().getStringExtra(global.DATA_IMAGE2)).thumbnail(0.5f).crossFade().diskCacheStrategy(DiskCacheStrategy.ALL).into(amd_iv_ceritarakyat);
  44.     }
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement