
화면처럼 2개의 리니어레이아웃에 텍스트뷰를 집어넣은 상태입니다.
(텍스트뷰 내용은 제목,날짜,내용 등 입니다)
버튼을 생성하지 않고 각 레이아웃에 clickable나 onclick 등을 이용해서
클릭(터치)하면 해당 레이아웃(폼)에 있는 텍스트뷰를 아래쪽 빈곳에 출력되게 하고싶은데...
메인액티비티 파일에서 안풀려서 질문드립니다.
메인액티비티 소스는 이렇습니다.
public void displayPoem(View v) {
int id;
Resources res = getResources();
id = v.getId();
LinearLayout layout = (LinearLayout)v.findViewById(id);
String tag = (String)layout.getTag();
int id_title = res.getIdentifier("title" + tag, "string", getPackageName());
String title = res.getString(id_title);
int id_author = res.getIdentifier("author" + tag, "string", getPackageName());
String author = res.getString(id_author);
int id_body = res.getIdentifier("body" + tag, "string", getPackageName());
String body = res.getString(id_body);
Toast toast = Toast.makeText(this, title + " / " + author + "\n\n" + body, Toast.LENGTH_LONG);
toast.show();
토스트 부분을 텍스트뷰로 대체해보고 싶은데... 도저히 풀리지가 않습니다..