How to implement a dynamic list in a fragment?
up vote
0
down vote
favorite
I have a fragment where I would like to implement a dynamic list such that there is a button that you can press to add fields in the list.
I found some code to do just this (also shown below)
Dynamically add elements to a listView Android
I am trying to implement this inside my fragment but have been unsuccessful. A solution would be highly appreciated.
THE CODE I FOUND TO MAKE A DYNAMIC LIST
import java.util.ArrayList;
import java.util.List;
import android.app.ListActivity;
import android.widget.ArrayAdapter;
import android.os.Bundle;
import android.view.View;
public class OrdersDynamicList extends ListActivity {
//LIST OF ARRAY STRINGS WHICH WILL SERVE AS LIST ITEMS
ArrayList<String> listItems=new ArrayList<String>();
//DEFINING A STRING ADAPTER WHICH WILL HANDLE THE DATA OF THE LISTVIEW
ArrayAdapter<String> adapter;
//RECORDING HOW MANY TIMES THE BUTTON HAS BEEN CLICKED
int clickCounter=0;
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.activity_server);
adapter=new ArrayAdapter<String>(this,
android.R.layout.simple_list_item_1,
listItems);
setListAdapter(adapter);
}
//METHOD WHICH WILL HANDLE DYNAMIC INSERTION
public void addItems(View v) {
listItems.add("Clicked : "+clickCounter++);
adapter.notifyDataSetChanged();
}
}
MY FRAGMENT
import android.content.Context;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
public class FragmentNewTable extends Fragment {
private FragmentNewTableListener listener;
private OrdersDynamicList ordersDynamicList;
public interface FragmentNewTableListener {
void onInputFragmentNewTableSent(CharSequence input);
}
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View v = inflater.inflate(R.layout.fragment_new_table, container, false);
return v;
}
public void updateEditText(CharSequence newText) {
//editText.setText(newText);
}
@Override
public void onAttach(Context context) {
super.onAttach(context);
if (context instanceof FragmentNewTableListener) {
listener = (FragmentNewTableListener) context;
} else {
throw new RuntimeException(context.toString()
+ " must implement FragmentAListener");
}
}
@Override
public void onDetach() {
super.onDetach();
listener = null;
}
FRAGMENT XML
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<Button
android:id="@+id/addBtn"
android:text="Add New Order"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:onClick="addItems"/>
<ListView
android:id="@android:id/list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:drawSelectorOnTop="false"
/>
</LinearLayout>
java
add a comment |
up vote
0
down vote
favorite
I have a fragment where I would like to implement a dynamic list such that there is a button that you can press to add fields in the list.
I found some code to do just this (also shown below)
Dynamically add elements to a listView Android
I am trying to implement this inside my fragment but have been unsuccessful. A solution would be highly appreciated.
THE CODE I FOUND TO MAKE A DYNAMIC LIST
import java.util.ArrayList;
import java.util.List;
import android.app.ListActivity;
import android.widget.ArrayAdapter;
import android.os.Bundle;
import android.view.View;
public class OrdersDynamicList extends ListActivity {
//LIST OF ARRAY STRINGS WHICH WILL SERVE AS LIST ITEMS
ArrayList<String> listItems=new ArrayList<String>();
//DEFINING A STRING ADAPTER WHICH WILL HANDLE THE DATA OF THE LISTVIEW
ArrayAdapter<String> adapter;
//RECORDING HOW MANY TIMES THE BUTTON HAS BEEN CLICKED
int clickCounter=0;
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.activity_server);
adapter=new ArrayAdapter<String>(this,
android.R.layout.simple_list_item_1,
listItems);
setListAdapter(adapter);
}
//METHOD WHICH WILL HANDLE DYNAMIC INSERTION
public void addItems(View v) {
listItems.add("Clicked : "+clickCounter++);
adapter.notifyDataSetChanged();
}
}
MY FRAGMENT
import android.content.Context;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
public class FragmentNewTable extends Fragment {
private FragmentNewTableListener listener;
private OrdersDynamicList ordersDynamicList;
public interface FragmentNewTableListener {
void onInputFragmentNewTableSent(CharSequence input);
}
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View v = inflater.inflate(R.layout.fragment_new_table, container, false);
return v;
}
public void updateEditText(CharSequence newText) {
//editText.setText(newText);
}
@Override
public void onAttach(Context context) {
super.onAttach(context);
if (context instanceof FragmentNewTableListener) {
listener = (FragmentNewTableListener) context;
} else {
throw new RuntimeException(context.toString()
+ " must implement FragmentAListener");
}
}
@Override
public void onDetach() {
super.onDetach();
listener = null;
}
FRAGMENT XML
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<Button
android:id="@+id/addBtn"
android:text="Add New Order"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:onClick="addItems"/>
<ListView
android:id="@android:id/list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:drawSelectorOnTop="false"
/>
</LinearLayout>
java
1
Technically you have 2ListViews. One in the activity [ListActivityactivity_server] and the other one in the fragment. You are setting, updating and notifying the adapter which attached to Activity. Have simple activityAppCompatActivityand move theaddItemtoFragmentclass.
– I Don't Exist
2 days ago
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have a fragment where I would like to implement a dynamic list such that there is a button that you can press to add fields in the list.
I found some code to do just this (also shown below)
Dynamically add elements to a listView Android
I am trying to implement this inside my fragment but have been unsuccessful. A solution would be highly appreciated.
THE CODE I FOUND TO MAKE A DYNAMIC LIST
import java.util.ArrayList;
import java.util.List;
import android.app.ListActivity;
import android.widget.ArrayAdapter;
import android.os.Bundle;
import android.view.View;
public class OrdersDynamicList extends ListActivity {
//LIST OF ARRAY STRINGS WHICH WILL SERVE AS LIST ITEMS
ArrayList<String> listItems=new ArrayList<String>();
//DEFINING A STRING ADAPTER WHICH WILL HANDLE THE DATA OF THE LISTVIEW
ArrayAdapter<String> adapter;
//RECORDING HOW MANY TIMES THE BUTTON HAS BEEN CLICKED
int clickCounter=0;
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.activity_server);
adapter=new ArrayAdapter<String>(this,
android.R.layout.simple_list_item_1,
listItems);
setListAdapter(adapter);
}
//METHOD WHICH WILL HANDLE DYNAMIC INSERTION
public void addItems(View v) {
listItems.add("Clicked : "+clickCounter++);
adapter.notifyDataSetChanged();
}
}
MY FRAGMENT
import android.content.Context;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
public class FragmentNewTable extends Fragment {
private FragmentNewTableListener listener;
private OrdersDynamicList ordersDynamicList;
public interface FragmentNewTableListener {
void onInputFragmentNewTableSent(CharSequence input);
}
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View v = inflater.inflate(R.layout.fragment_new_table, container, false);
return v;
}
public void updateEditText(CharSequence newText) {
//editText.setText(newText);
}
@Override
public void onAttach(Context context) {
super.onAttach(context);
if (context instanceof FragmentNewTableListener) {
listener = (FragmentNewTableListener) context;
} else {
throw new RuntimeException(context.toString()
+ " must implement FragmentAListener");
}
}
@Override
public void onDetach() {
super.onDetach();
listener = null;
}
FRAGMENT XML
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<Button
android:id="@+id/addBtn"
android:text="Add New Order"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:onClick="addItems"/>
<ListView
android:id="@android:id/list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:drawSelectorOnTop="false"
/>
</LinearLayout>
java
I have a fragment where I would like to implement a dynamic list such that there is a button that you can press to add fields in the list.
I found some code to do just this (also shown below)
Dynamically add elements to a listView Android
I am trying to implement this inside my fragment but have been unsuccessful. A solution would be highly appreciated.
THE CODE I FOUND TO MAKE A DYNAMIC LIST
import java.util.ArrayList;
import java.util.List;
import android.app.ListActivity;
import android.widget.ArrayAdapter;
import android.os.Bundle;
import android.view.View;
public class OrdersDynamicList extends ListActivity {
//LIST OF ARRAY STRINGS WHICH WILL SERVE AS LIST ITEMS
ArrayList<String> listItems=new ArrayList<String>();
//DEFINING A STRING ADAPTER WHICH WILL HANDLE THE DATA OF THE LISTVIEW
ArrayAdapter<String> adapter;
//RECORDING HOW MANY TIMES THE BUTTON HAS BEEN CLICKED
int clickCounter=0;
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.activity_server);
adapter=new ArrayAdapter<String>(this,
android.R.layout.simple_list_item_1,
listItems);
setListAdapter(adapter);
}
//METHOD WHICH WILL HANDLE DYNAMIC INSERTION
public void addItems(View v) {
listItems.add("Clicked : "+clickCounter++);
adapter.notifyDataSetChanged();
}
}
MY FRAGMENT
import android.content.Context;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
public class FragmentNewTable extends Fragment {
private FragmentNewTableListener listener;
private OrdersDynamicList ordersDynamicList;
public interface FragmentNewTableListener {
void onInputFragmentNewTableSent(CharSequence input);
}
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View v = inflater.inflate(R.layout.fragment_new_table, container, false);
return v;
}
public void updateEditText(CharSequence newText) {
//editText.setText(newText);
}
@Override
public void onAttach(Context context) {
super.onAttach(context);
if (context instanceof FragmentNewTableListener) {
listener = (FragmentNewTableListener) context;
} else {
throw new RuntimeException(context.toString()
+ " must implement FragmentAListener");
}
}
@Override
public void onDetach() {
super.onDetach();
listener = null;
}
FRAGMENT XML
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<Button
android:id="@+id/addBtn"
android:text="Add New Order"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:onClick="addItems"/>
<ListView
android:id="@android:id/list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:drawSelectorOnTop="false"
/>
</LinearLayout>
java
java
asked 2 days ago
Oamar Kanji
16328
16328
1
Technically you have 2ListViews. One in the activity [ListActivityactivity_server] and the other one in the fragment. You are setting, updating and notifying the adapter which attached to Activity. Have simple activityAppCompatActivityand move theaddItemtoFragmentclass.
– I Don't Exist
2 days ago
add a comment |
1
Technically you have 2ListViews. One in the activity [ListActivityactivity_server] and the other one in the fragment. You are setting, updating and notifying the adapter which attached to Activity. Have simple activityAppCompatActivityand move theaddItemtoFragmentclass.
– I Don't Exist
2 days ago
1
1
Technically you have 2
ListViews. One in the activity [ListActivity activity_server] and the other one in the fragment. You are setting, updating and notifying the adapter which attached to Activity. Have simple activity AppCompatActivity and move the addItem to Fragment class.– I Don't Exist
2 days ago
Technically you have 2
ListViews. One in the activity [ListActivity activity_server] and the other one in the fragment. You are setting, updating and notifying the adapter which attached to Activity. Have simple activity AppCompatActivity and move the addItem to Fragment class.– I Don't Exist
2 days ago
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
import android.content.Context;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ListView;
import java.util.ArrayList;
public class FragmentNewTable extends Fragment {
private FragmentNewTableListener listener;
private Button addToList;
private ArrayList<String> listItems;
private ArrayAdapter<String> listViewAdapter;
public interface FragmentNewTableListener {
void onInputFragmentNewTableSent(CharSequence input);
}
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View v = inflater.inflate(R.layout.fragment_new_table, container, false);
this.listItems = new ArrayList<String>();
this.listViewAdapter = new ArrayAdapter<String>(
getActivity(),
android.R.layout.simple_list_item_1,
this.listItems
);
ListView listView = (ListView) v.findViewById(R.id.list);
listView.setAdapter(listViewAdapter);
this.addToList = v.findViewById(R.id.addBtn);
this.addToList.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
listItems.add("hi");
listViewAdapter.notifyDataSetChanged();
}
});
return v;
}
public void updateEditText(CharSequence newText) {
//editText.setText(newText);
}
@Override
public void onAttach(Context context) {
super.onAttach(context);
if (context instanceof FragmentNewTableListener) {
listener = (FragmentNewTableListener) context;
} else {
throw new RuntimeException(context.toString()
+ " must implement FragmentAListener");
}
}
@Override
public void onDetach() {
super.onDetach();
listener = null;
}
}
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
import android.content.Context;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ListView;
import java.util.ArrayList;
public class FragmentNewTable extends Fragment {
private FragmentNewTableListener listener;
private Button addToList;
private ArrayList<String> listItems;
private ArrayAdapter<String> listViewAdapter;
public interface FragmentNewTableListener {
void onInputFragmentNewTableSent(CharSequence input);
}
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View v = inflater.inflate(R.layout.fragment_new_table, container, false);
this.listItems = new ArrayList<String>();
this.listViewAdapter = new ArrayAdapter<String>(
getActivity(),
android.R.layout.simple_list_item_1,
this.listItems
);
ListView listView = (ListView) v.findViewById(R.id.list);
listView.setAdapter(listViewAdapter);
this.addToList = v.findViewById(R.id.addBtn);
this.addToList.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
listItems.add("hi");
listViewAdapter.notifyDataSetChanged();
}
});
return v;
}
public void updateEditText(CharSequence newText) {
//editText.setText(newText);
}
@Override
public void onAttach(Context context) {
super.onAttach(context);
if (context instanceof FragmentNewTableListener) {
listener = (FragmentNewTableListener) context;
} else {
throw new RuntimeException(context.toString()
+ " must implement FragmentAListener");
}
}
@Override
public void onDetach() {
super.onDetach();
listener = null;
}
}
add a comment |
up vote
0
down vote
import android.content.Context;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ListView;
import java.util.ArrayList;
public class FragmentNewTable extends Fragment {
private FragmentNewTableListener listener;
private Button addToList;
private ArrayList<String> listItems;
private ArrayAdapter<String> listViewAdapter;
public interface FragmentNewTableListener {
void onInputFragmentNewTableSent(CharSequence input);
}
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View v = inflater.inflate(R.layout.fragment_new_table, container, false);
this.listItems = new ArrayList<String>();
this.listViewAdapter = new ArrayAdapter<String>(
getActivity(),
android.R.layout.simple_list_item_1,
this.listItems
);
ListView listView = (ListView) v.findViewById(R.id.list);
listView.setAdapter(listViewAdapter);
this.addToList = v.findViewById(R.id.addBtn);
this.addToList.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
listItems.add("hi");
listViewAdapter.notifyDataSetChanged();
}
});
return v;
}
public void updateEditText(CharSequence newText) {
//editText.setText(newText);
}
@Override
public void onAttach(Context context) {
super.onAttach(context);
if (context instanceof FragmentNewTableListener) {
listener = (FragmentNewTableListener) context;
} else {
throw new RuntimeException(context.toString()
+ " must implement FragmentAListener");
}
}
@Override
public void onDetach() {
super.onDetach();
listener = null;
}
}
add a comment |
up vote
0
down vote
up vote
0
down vote
import android.content.Context;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ListView;
import java.util.ArrayList;
public class FragmentNewTable extends Fragment {
private FragmentNewTableListener listener;
private Button addToList;
private ArrayList<String> listItems;
private ArrayAdapter<String> listViewAdapter;
public interface FragmentNewTableListener {
void onInputFragmentNewTableSent(CharSequence input);
}
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View v = inflater.inflate(R.layout.fragment_new_table, container, false);
this.listItems = new ArrayList<String>();
this.listViewAdapter = new ArrayAdapter<String>(
getActivity(),
android.R.layout.simple_list_item_1,
this.listItems
);
ListView listView = (ListView) v.findViewById(R.id.list);
listView.setAdapter(listViewAdapter);
this.addToList = v.findViewById(R.id.addBtn);
this.addToList.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
listItems.add("hi");
listViewAdapter.notifyDataSetChanged();
}
});
return v;
}
public void updateEditText(CharSequence newText) {
//editText.setText(newText);
}
@Override
public void onAttach(Context context) {
super.onAttach(context);
if (context instanceof FragmentNewTableListener) {
listener = (FragmentNewTableListener) context;
} else {
throw new RuntimeException(context.toString()
+ " must implement FragmentAListener");
}
}
@Override
public void onDetach() {
super.onDetach();
listener = null;
}
}
import android.content.Context;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ListView;
import java.util.ArrayList;
public class FragmentNewTable extends Fragment {
private FragmentNewTableListener listener;
private Button addToList;
private ArrayList<String> listItems;
private ArrayAdapter<String> listViewAdapter;
public interface FragmentNewTableListener {
void onInputFragmentNewTableSent(CharSequence input);
}
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View v = inflater.inflate(R.layout.fragment_new_table, container, false);
this.listItems = new ArrayList<String>();
this.listViewAdapter = new ArrayAdapter<String>(
getActivity(),
android.R.layout.simple_list_item_1,
this.listItems
);
ListView listView = (ListView) v.findViewById(R.id.list);
listView.setAdapter(listViewAdapter);
this.addToList = v.findViewById(R.id.addBtn);
this.addToList.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
listItems.add("hi");
listViewAdapter.notifyDataSetChanged();
}
});
return v;
}
public void updateEditText(CharSequence newText) {
//editText.setText(newText);
}
@Override
public void onAttach(Context context) {
super.onAttach(context);
if (context instanceof FragmentNewTableListener) {
listener = (FragmentNewTableListener) context;
} else {
throw new RuntimeException(context.toString()
+ " must implement FragmentAListener");
}
}
@Override
public void onDetach() {
super.onDetach();
listener = null;
}
}
answered 2 days ago
Oamar Kanji
16328
16328
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53400724%2fhow-to-implement-a-dynamic-list-in-a-fragment%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Technically you have 2
ListViews. One in the activity [ListActivityactivity_server] and the other one in the fragment. You are setting, updating and notifying the adapter which attached to Activity. Have simple activityAppCompatActivityand move theaddItemtoFragmentclass.– I Don't Exist
2 days ago