package com.example.a2021_194;

import androidx.appcompat.app.AppCompatActivity;
import androidx.cardview.widget.CardView;

import android.content.Intent;
import android.os.Bundle;
import android.service.notification.NotificationListenerService;
import android.view.View;

public class MainActivity extends AppCompatActivity implements View.OnClickListener {

    public CardView ratings;
    public CardView rankings;

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

        rankings = (CardView) findViewById(R.id.rankings);
        ratings = (CardView) findViewById(R.id.ratings);

        ratings.setOnClickListener(this);
        rankings.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {

        Intent i ;

        switch (v.getId()){
            case R.id.rankings:
                i = new Intent(this,TopSellingInsurance.class);
                startActivity(i);
                break;

            case R.id.ratings:
                i = new Intent(this, TopRatingInsurance.class);
                startActivity(i);
                break;

        }

    }
}