Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as Java by abcderf ( 5 years ago )
package com.android.restoranayambakarpalembang;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import com.bumptech.glide.Glide;
import com.google.android.material.floatingactionbutton.FloatingActionButton;

import java.util.Locale;

public class DetailActivity extends AppCompatActivity {

    private TextView tvRestoranTitleDetail;
    private TextView tvRestoranSubtitleDetail;
    private ImageView ivRestoranDetail;
    public static final String EXTRA_RESTORAN = "extra_restoran";
    private FloatingActionButton fabLokasi;

    @Override

    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_detail);

        tvRestoranTitleDetail = findViewById(R.id.tv_title_detail);
        ivRestoranDetail = findViewById(R.id.iv_restoran_detail);
        tvRestoranSubtitleDetail = findViewById(R.id.tv_subtitle_detail);

        Restoran restoran = getIntent().getParcelableExtra(EXTRA_RESTORAN);
        tvRestoranTitleDetail.setText(restoran.getTitle());
        tvRestoranSubtitleDetail.setText(restoran.getDetailRestoran());
        Glide.with(this).load(restoran.getImageResource()).into(ivRestoranDetail);
        fabLokasi = findViewById(R.id.fab_lokasi);

        fabLokasi.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

            }
        });
    };
};

 

Revise this Paste

Your Name: Code Language: