Answer the question
In order to leave comments, you need to log in
How to write text to a text file and twist from the wrong one?
In general, you need to make a menu item favorites:
I want the text to be taken from TextView1, TextView2, ImageView1 at the click of a button and written to a text file, creating a new line, of course.
in the second class ( favorites ) it will take the text from this file
here are the code parts
1)Button (handler)
listView.setOnMenuItemClickListener(new SwipeMenuListView.OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(int position, SwipeMenu menu, int index) {
String value = adapter.getItem(position).title;
switch(index) {
case 0:
Intent izb = new Intent(Main.this, Kaka.class);
izb.putExtra("name", ((TextView) findViewById(R.id.textView1)).getText().toString());
2) adapter template
3) how
List catalog = new ArrayList<>();
catalog.add(new ListData("1", 199, R.drawable.saiman));
4) so that instead of catalog.add... the text from the text file would be expanded
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question