Commit fa3f87aa authored by james.clarke2's avatar james.clarke2

Delete UpdateRefreshments.java

parent 46e5131c
package com.example.carrentals;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.Spinner;
import android.widget.TextView;
import android.widget.Toast;
import static android.widget.Toast.*;
public class UpdateRefreshments extends AppCompatActivity implements AdapterView.OnItemSelectedListener {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_update_refreshments);
Spinner aSpinner = findViewById(R.id.aSpinner);
aSpinner.setOnItemSelectedListener(this);
Spinner sweetSpinner = findViewById(R.id.sweetSpinner);
ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(
this,
R.array.Spinner_items,
android.R.layout.simple_spinner_item
);
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
sweetSpinner.setAdapter(adapter);
sweetSpinner.setOnItemSelectedListener(this);
}
@Override
public void onItemSelected(AdapterView<?> adapterView, View view, int position, long id) {
makeText(this, adapterView.getSelectedItem().toString(), Toast.LENGTH_SHORT).show();
}
@Override
public void onNothingSelected(AdapterView<?> parent) {
}
public void DiscountPercent(View v) {
Intent intent = new Intent(this, DiscountPercent.class);
startActivity(intent);
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment