Create an Android application that displays on a second screen the amount of sales on a purchase with the tax included.
On the initial screen (first screen) the user submits the purchase amount and selects the state where the purchase is being made from a ListView.
You are given a CSV with all the states' tax rate.
After the user clicks (taps) on a state from the list, the program displays on the second screen the final sales on the purchase with the tax added and confirms the state and the corresponding tax.
1. Ensure the user only enters numeric values for purchase amount
2. Ensure the user selects a state from the list of radio buttons
3. Store the taxes in a type double array.

Solution PreviewSolution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

* An activity representing a list of Items. This activity
* has different presentations for handset and tablet-size devices. On
* handsets, the activity presents a list of items, which when touched,
* lead to a {@link ItemDetailActivity} representing
* item details. On tablets, the activity presents the list of items and
* item details side-by-side using two vertical panes.
public class ItemListActivity extends AppCompatActivity {

    * Whether or not the activity is in two-pane mode, i.e. running on a tablet
    * device.
    private boolean mTwoPane;

    private EditText editText;

    SimpleItemRecyclerViewAdapter adapter;

    protected void onCreate(Bundle savedInstanceState) {

       Toolbar toolbar = (Toolbar) findViewById(;

       editText = (EditText) findViewById(;

       if (findViewById( != null) {
            // The detail container view will be present only in the
            // large-screen layouts (res/values-w900dp).
            // If this view is present, then the
            // activity should be in two-pane mode.
            mTwoPane = true;

       View recyclerView = findViewById(;
       assert recyclerView != null;
       setupRecyclerView((RecyclerView) recyclerView);

    private void setupRecyclerView(@NonNull RecyclerView recyclerView) {
       adapter = new SimpleItemRecyclerViewAdapter(this, DummyContent.ITEMS, mTwoPane);

    public class SimpleItemRecyclerViewAdapter
            extends RecyclerView.Adapter<SimpleItemRecyclerViewAdapter.ViewHolder> {

       private final ItemListActivity mParentActivity;
       private final List<DummyContent.DummyItem> mValues;
       private final boolean mTwoPane;
       private final View.OnClickListener mOnClickListener = new View.OnClickListener() {
            public void onClick(View view) {
                DummyContent.DummyItem item = (DummyContent.DummyItem) view.getTag();
                if (mTwoPane) {
                   Bundle arguments = new Bundle();
                   ItemDetailFragment fragment = new ItemDetailFragment();
                            .replace(, fragment)
                } else {
                   Context context = view.getContext();
                   Intent intent = new Intent(context, ItemDetailActivity.class);
                   intent.putExtra("amount", editText.getText().toString());


       SimpleItemRecyclerViewAdapter(ItemListActivity parent,
                                     List<DummyContent.DummyItem> items,
                                     boolean twoPane) {
            mValues = items;
            mParentActivity = parent;
            mTwoPane = twoPane...

By purchasing this solution you'll be able to access the following files:
Solution.docx and

for this solution

or FREE if you
register a new account!

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available App Development Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Upload a file
Continue without uploading

We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats