-4

i'm very biginner so bare me please

I have two activity in my project

first is text1.xml

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context=".Text1" >

    <Button
        android:id="@+id/button1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:layout_centerHorizontal="true"
        android:layout_marginTop="36dp"
        android:text="Button1" />

    <Button
        android:id="@+id/button3"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignLeft="@+id/button2"
        android:layout_below="@+id/button2"
        android:layout_marginTop="82dp"
        android:text="Button3" />

    <Button
        android:id="@+id/button2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignLeft="@+id/button1"
        android:layout_below="@+id/button1"
        android:layout_marginTop="70dp"
        android:text="Button2" />

</RelativeLayout>

and second is text2.xml :

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >

    <TextView
        android:id="@+id/textView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_alignParentTop="true"
        android:layout_marginRight="20dp"
        android:layout_marginTop="28dp"
        android:text="TextView" />

</RelativeLayout>

I want put 3 notepad in my project that when user press first button in text1.xml first notepad shown in textview in text2.xml and when user press second button in text1.xml second notepad shown in textview in text2.xml and 3rd notepad like 1st and 2nd too ..... how can i add text from notepad to textview ,,,, what is code ?? where should i add my notepads in my project ? in assets ???

user3410344
  • 41
  • 13

1 Answers1

0

you could place all notepad over each other using framelayout/relativelayout and toggle the visibility of particular layout using buttons.

Vaibhav Ajay Gupta
  • 463
  • 2
  • 4
  • 18