Android Open Source - sdl_tester_android Delete Interaction Dialog

From Project

Back to project page sdl_tester_android.


The source code is released under:

Copyright (c) 2014, Ford Motor Company All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are m...

If you think the Android project sdl_tester_android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.livio.sdltester.dialogs;
//from   w w w.jav  a  2s  .co m
import java.util.List;

import android.content.Context;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ArrayAdapter;
import android.widget.ListView;

import com.livio.sdl.R;
import com.livio.sdl.SdlRequestFactory;
import com.livio.sdl.dialogs.BaseSingleListViewDialog;
import com.livio.sdl.enums.SdlCommand;
import com.smartdevicelink.proxy.RPCRequest;

public class DeleteInteractionDialog extends BaseSingleListViewDialog<MenuItem> {

  private static final SdlCommand SYNC_COMMAND = SdlCommand.DELETE_INTERACTION_CHOICE_SET;
  private static final String DIALOG_TITLE = SYNC_COMMAND.toString();
  public DeleteInteractionDialog(Context context, List<MenuItem> items) {
    super(context, DIALOG_TITLE, items);

  protected void findViews(View parent) {
    listView = (ListView) parent.findViewById(;
    listView.setOnItemClickListener(new OnItemClickListener() {
      public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
        selectedItem = ((ArrayAdapter<MenuItem>) parent.getAdapter()).getItem(position);
        RPCRequest result = SdlRequestFactory.deleteInteractionChoiceSet(selectedItem.getId());

Java Source Code List