|
|
@@ -8,6 +8,7 @@ import android.widget.AdapterView;
|
|
|
import android.widget.ArrayAdapter;
|
|
|
import android.widget.Spinner;
|
|
|
|
|
|
+import com.example.david.libretasker.InputSelector.Contact;
|
|
|
import com.example.david.libretasker.InputSelector.MultiStateInRows;
|
|
|
|
|
|
import java.util.Arrays;
|
|
|
@@ -20,7 +21,7 @@ public class NewEventActivity extends AppCompatActivity {
|
|
|
super.onCreate(savedInstanceState);
|
|
|
setContentView(R.layout.activity_new_event);
|
|
|
Spinner spinner = (Spinner) findViewById(R.id.spinner);
|
|
|
- List<String> l = Arrays.asList("Screen", "Time", "Network", "Phone");
|
|
|
+ List<String> l = Arrays.asList("Screen", "Time", "Network", "Phone", "SMS");
|
|
|
final ArrayAdapter<CharSequence> adapter = new ArrayAdapter(this, android.R.layout.simple_spinner_item, l);
|
|
|
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
|
|
// Apply the adapter to the spinner
|
|
|
@@ -64,8 +65,11 @@ public class NewEventActivity extends AppCompatActivity {
|
|
|
|
|
|
|
|
|
ft.commit();
|
|
|
- } else {
|
|
|
- return;
|
|
|
+ } else if ( adapter.getItem(pos).equals("SMS") ) {
|
|
|
+ ft.replace(R.id.your_placeholder, Contact.newInstance());
|
|
|
+ ft.commit();
|
|
|
+ } else if ( adapter.getItem(pos).equals("Phone") ) {
|
|
|
+ } else if ( adapter.getItem(pos).equals("Network") ) {
|
|
|
}
|
|
|
// or ft.add(R.id.your_placeholder, new FooFragment());
|
|
|
|