N
N
nikita_chiru2016-05-18 13:33:45
Android
nikita_chiru, 2016-05-18 13:33:45

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

1 answer(s)
G
GavriKos, 2016-05-18
@GavriKos

1) All code - in the appropriate tags
2) What are the points? Especially template for adapter with no code at all
3) Where is the question itself?
In short, re-register the question, it is impossible to understand what you need.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question