Using webview with entered string values - android

I just want to ask you how can i use webview with an entered strings from edittext?
For example, i created 2 fragment one of these shows webview and another one gets 2 edittext from users. I just want to get entered edittext values from 2. fragment to 1. fragment. Because i want create a URL like this : webView.loadUrl("http://www.truebilisim.com/myiphone/index.php?id=" + ID + "&sifre=" + Password);
This is my first fragment.
<FrameLayout 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"
tools:context=".Tab1">
<WebView
android:id="#+id/webView1"
android:layout_width="match_parent"
android:layout_height="match_parent" />
And this is the second one.
<FrameLayout 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"
tools:context=".Tab2">
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:paddingTop="80dp"
android:paddingRight="30dp"
android:paddingLeft="30dp"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".Tab2">
<ImageView
android:src="#drawable/logo_small"
android:id="#+id/logo"
android:layout_marginBottom="30dp"
android:layout_width="match_parent"
android:layout_height="100dp" />
<android.support.design.widget.TextInputLayout
android:id="#+id/layout_id"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#id/logo">
<EditText
android:hint="ID"
android:textColor="#color/colorPrimary"
android:id="#+id/idx"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:id="#+id/layout_pass"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#id/layout_id"
>
<EditText
android:inputType="textPassword"
android:hint="Şifre"
android:textColor="#color/colorPrimary"
android:id="#+id/password"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</android.support.design.widget.TextInputLayout>
<Button
android:id="#+id/btn_login"
android:layout_below="#id/layout_pass"
android:backgroundTint="#color/colorPrimaryDark"
android:text="KAYDET"
android:layout_marginTop="30dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
</RelativeLayout>

Your question is too big to answer here. And its not specific. I'm just going to mention the steps. You'll find code for specific parts if you search properly.
Initialize your EditTexts. You you'll send the values from the EditText's when the user clicks the login button.
Set onClickListener on the login button. Inside the listener, check if your EditTexts have value or not. If they have value, goto the other fragment.
Send the values of EditText to the other fragment, you can do this in multiple ways. One is, just get an instance to the destination fragment object, and send the value.

I get these strings like this but cant find a way to use at first fragment. Can u show me ?
public class Tab2 extends Fragment {
public Tab2() {
// Required empty public constructor
}
EditText ed1,ed2;
private Button b1;
#Nullable
#Override
public View onCreateView(LayoutInflater inflater, #Nullable ViewGroup container,
#Nullable Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_tab2, container, false);
b1 = view.findViewById(R.id.btn_login);
ed1 = view.findViewById(R.id.idx);
ed2 = view.findViewById(R.id.password);
b1.setOnClickListener(new View.OnClickListener() {
#Override
public void onClick(View view) {
String n = ed1.getText().toString();
String p = ed2.getText().toString();
}
});
return view;
}
}

Related

How to set id for each item in a view dynamically?

I am new in android and tried to learn how to make an add button which add Views in a certain view dynamically when clicked. But i meet the problem that not sure how to set id for each item in the layout which i want to insert into another view.
Here is the main_view:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
tools:context=".MainActivity">
<LinearLayout
android:id="#+id/container_layout"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
<Button
android:id="#+id/add_button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#id/container_layout"
android:text="add"
/>
</RelativeLayout>
Here is my code:
public class MainActivity extends AppCompatActivity {
public int index_num;
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Button add_button = findViewById(R.id.add_button);
final LayoutInflater layoutInflater = getLayoutInflater();
final ViewGroup insertPoint = findViewById(R.id.container_layout);
index_num = 0;
add_button.setOnClickListener(new View.OnClickListener() {
#Override
public void onClick(View view) {
View new_view = layoutInflater.inflate(R.layout.new_layout,insertPoint, false);
insertPoint.addView(new_view);
index_num++;
}
});
}
}
And here is the layout which i want to insert the main view which includes 3 Edittext:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal" android:layout_width="match_parent"
android:layout_height="match_parent">
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:inputType="number"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:inputType="number"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:inputType="number"/>
</LinearLayout>
Can someone teach me how to set different id for the three edittext when i pressed the add button?
As #Rasoul Miri said, you can use View.generateViewId() to set id for newly inserted views, and you should use a list to record them. And also you should set the id for those three items.
like these:
for the inserted view
<EditText
android:id="#+id/one_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:inputType="number"/>
<EditText
android:id="#+id/two_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:inputType="number"/>
<EditText
android:id="#+id/three_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:inputType="number"/>
for the MainActivity
public ArrayList<InsertedView> list;
public void addView() {
View new_view = layoutInflater.inflate(R.layout.new_layout,insertPoint, false);
insertPoint.addView(new_view);
index_num++;
InsertedView insertedView = new InsertedView(View.generateViewId(), View.generateViewId(), View.generateViewId());
new_view.findViewById(R.id.one_view).setId(insertedView.firstId);
new_view.findViewById(R.id.two_view).setId(insertedView.secondId);
new_view.findViewById(R.id.three_view).setId(insertedView.thirdId);
list.add(insertedView);
}
class InsertedView {
public int firstId;
public int secondId;
public int thirdId;
public InsertedView(int one, int two, int three) {
firstId = one;
secondId = two;
thirdId = three;
}
}
you can use these ways
use View
view.setId(View.generateViewId());
use ViewCompat
ViewCompat.generateViewId()
use ConstraintLayout
ConstraintLayout.generateViewId()

Android ProgressBar NPE Within Fragment

I want to display a Progressbar in my LoginFragment for testing purposes however after I connect my view variables in the OnCreateView Callback in my LoginFragment, my app shuts down and its due to:
Attempt to invoke virtual method 'void android.widget.ProgressBar.setVisibility(int)' on a null object reference
But what's driving me nuts is that this is the only View that throws a NPE, all my other views I am able to manipulate and reference without a problem. I also tried to use a Progressbar in the LoginActivity that hosts the LoginFragment and the Progressbar worked as expected, but why not in the fragment ??
I attached the code xml and fragment code corresponding to the LoginFragment
public class LoginFragment extends Fragment {
private AutoCompleteTextView name;
private EditText password;
private ProgressBar progressBar;
//......... Skipped For Brevity .........
#Override
public View onCreateView(#NonNull LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
final View v = inflater.inflate(R.layout.login_fragment, container, false);
v.setBackgroundResource(R.drawable.album_jazz_blues);
name = v.findViewById(R.id.username);
password = v.findViewById(R.id.password);
progressBar = v.findViewById(R.id.progress_bar);
//progressBar.setVisibility(View.VISIBLE); <-------- THROWS NPE
return v;
}
}
XML:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout 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"
xmlns:app="http://schemas.android.com/apk/res-auto">
<android.support.constraint.ConstraintLayout
android:id="#+id/constraint_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="#+id/login_parent_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:padding="16dp"
android:orientation="vertical"
tools:layout_alignParentTop="true"
tools:layout_alignParentStart="true" >
<AutoCompleteTextView
android:id="#+id/username"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textEmailAddress"
android:hint="#string/email"
android:maxLines="1"
android:singleLine="true" />
<EditText
android:id="#+id/password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="#string/password"
android:inputType="textPassword"
android:maxLines="1"
android:singleLine="true"
tools:ignore="Autofill" />
</LinearLayout>
</android.support.constraint.ConstraintLayout>
<ProgressBar
style="#style/Widget.AppCompat.ProgressBar"
android:layout_gravity="center"
android:indeterminate="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/progress_bar">
</ProgressBar>
What Am I missing here ?
As Aaron in the comments pointed out, I had two different layout folders a normal folder and v-26 folder which did not necessarily mirror each other so what I did was assign the folders the exact same elements and attributes with their corresponding values with the exception of
EditTextandroid:importantForAutofill
autofill attribute, in v-26 android:importantForAutofill="no and in my regular layout folder tools:ignore="Autofill"

Need to add layout dynamically

This is my Layout , I have nested Linear layout inside another linear layout which is nested inside an Scroll view. Now i want to add an Linear layout dynamically (I may even add upto 10) inside android:id="#+id/formLayout" i.e beneth android:id="#+id/secondLayout"
Original Layout :
<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">
<ScrollView
android:layout_width="match_parent"
android:layout_height="420dp"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true">
<!-- LinearLayout Inside ScrollView -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="#+id/formLayout"
android:orientation="vertical">
<!-- Serial Layout -->
<LinearLayout
android:id="#+id/secondLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:orientation="horizontal"
android:weightSum="2">
<android.support.design.widget.TextInputLayout
android:id="#+id/serialno_label"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginStart="10dp"
android:paddingEnd="10dp"
android:paddingLeft="10dp"
android:paddingStart="10dp">
<AutoCompleteTextView
android:id="#+id/fieldSerial"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:hint="#string/txt_sno_text"
android:singleLine="true"
android:textIsSelectable="false"
android:textSize="15sp" />
</android.support.design.widget.TextInputLayout>
</LinearLayout>
</LinearLayout>
</ScrollView>
</RelativeLayout>
Dynamic Layout needs to be added :
<LinearLayout
android:id="#+id/sixthLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:orientation="horizontal"
android:weightSum="2">
<android.support.design.widget.TextInputLayout
android:id="#+id/attr2_label"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginStart="10dp"
android:paddingEnd="10dp"
android:paddingLeft="10dp"
android:paddingStart="10dp">
<EditText
android:id="#+id/fieldAttr2"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:hint="Attribute 2"
android:textSize="15sp" />
</android.support.design.widget.TextInputLayout>
</LinearLayout>
Can some one help me with this ?
Use the LayoutInflater to create a view based on your layout template, and then inject it into the view where you need it.
public static NavigableMap<Integer, String> navigableMap = new TreeMap<Integer, String>();
public static int count = 0; // to count no of views added
public static void add_new(final Activity activity)
{
final LinearLayout linearLayoutForm = (LinearLayout) activity.findViewById(R.id.formLayout);
final LinearLayout newView = (LinearLayout) activity.getLayoutInflater().inflate(R.layout.view_to_add, null);
newView.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
final EditText edit_new = (EditText) newView.findViewById(R.id.fieldAttr2);
edit_new.setId(id++); // It will assign a different id to edittext each time while adding new view.
Log.i("actv id",edit_new.getId()+""); // You can check the id assigned to it here.
// use a Hashmap or navigable map (helpful if want to navigate through map)
// to store the values inserted in edittext along with its ids.
edit_new.setOnFocusChangeListener(new View.OnFocusChangeListener() {
#Override
public void onFocusChange(View view, boolean b) {
navigableMap.put(edit_new.getId(), edit_new.getText().toString());
Log.i("navigablemap", navigableMap.toString());
}
});
// you can get values directly through map by referencing its ids.
// OR
EditText actv_uc = (EditText) linearLayoutForm.findViewById(navigableMap.lastKey());
// Provide the id of edittext you want to access
actv_uc.getText(); // to get value of EditText
actv_uc.setText("");
linearLayoutForm.addView(newView);
count++;
}
Call this function whenever you want to add new view. If you are calling this in Activity, then there is no need to pass Activity object as parameter. but if you are using this in fragment, then need to pass a Parent Activity object to function.
Very easy and helpful tutorial for adding views dynamically :-
http://android-er.blogspot.in/2013/05/add-and-remove-view-dynamically.html
Hope this will help you. Thank you
Try this:
LinearLayout myRoot = (LinearLayout) findViewById(R.id.formLayout);
LayoutInflater inf = LayoutInflater.from(yourContext);
View child;
for (int i = 0; i < 10; i++) {
child = inf.inflate(R.layout.your_added_layout, null);
child.setId("textView"+i);
// can set layoutparam if needed.
myRoot.addView(child);
}

One fragment for multiple activities

We always have heard using multiple fragments with one activity. Is opposite possible? I am curious about this. Can we use same fragment for multiple activities. Please give ONE EXAMPLE.
How to reuse one Fragment in multiple Activities
The green background with two buttons is a single fragment that is reused among multiple activities.
1. Make your fragment class and layout
MyFragment.java
import android.support.v4.app.Fragment;
public class MyFragment extends Fragment implements View.OnClickListener {
#Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View myLayout = inflater.inflate(R.layout.my_fragment_layout, container, false);
// add click listeners to the buttons in the fragment
Button buttonOne = myLayout.findViewById(R.id.button_1);
Button buttonTwo = myLayout.findViewById(R.id.button_2);
buttonOne.setOnClickListener(this);
buttonTwo.setOnClickListener(this);
return myLayout;
}
#Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.button_1:
Toast.makeText(getContext(), "Button One", Toast.LENGTH_SHORT).show();
break;
case R.id.button_2:
Toast.makeText(getContext(), "Button Two", Toast.LENGTH_SHORT).show();
break;
}
}
}
my_fragment_layout.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#android:color/holo_green_dark"
android:orientation="vertical">
<Button
android:id="#+id/button_1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Button 1"/>
<Button
android:id="#+id/button_2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Button 2"/>
</LinearLayout>
2. Add the fragment to your activities
activity_blue.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"
android:background="#android:color/holo_blue_dark"
android:orientation="vertical">
<Button
android:id="#+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="goToRedActivityButtonClick"
android:text="Go to red activity"/>
<!-- reused fragment -->
<fragment
android:id="#+id/my_fragment"
android:name="com.example.onefragmentmultipleactivities.MyFragment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"/>
</RelativeLayout>
activity_red.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"
android:background="#ff3636"
android:orientation="vertical">
<Button
android:id="#+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="goToYellowActivityButtonClick"
android:text="Go to yellow activity"/>
<!-- reused fragment -->
<fragment
android:id="#+id/my_fragment"
android:name="com.example.onefragmentmultipleactivities.MyFragment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"/>
</RelativeLayout>
activity_yellow.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"
android:background="#f9f478"
android:orientation="vertical">
<!-- reused fragment -->
<fragment
android:id="#+id/my_fragment"
android:name="com.example.onefragmentmultipleactivities.MyFragment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"/>
</RelativeLayout>
Notes
For simplicity we added the fragment directly to the xml. You can also load fragments dynamically in code. See the documentation for help with that.
Yes, it is possible to have one fragment with multiple activities.
But you will need to program the layout with java using LayoutParams and embed them in every fragment instance.
On every activity, you need to call this fragment
Create your UI Components in Java, add them to the layout dynamically from Java Class i.e. Your Activities.
I would suggest this approach will not be easy to maintain, if you are not super comfortable with Java exclusively. You will need to forget XML for this approach as nothing will be there in it at all, everything will be done with Java classes only.
generic_error_msg_fragment.xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#color/White" >
<TextView
android:id="#+id/error_message_textview"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:gravity="center"
android:textColor="#android:color/darker_gray"
android:textSize="#dimen/font_size_16sp" />
<Button
android:id="#+id/error_button_handler"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_gravity="left|center_vertical"
android:textSize="#dimen/font_size_16sp"
/>
</RelativeLayout>
GenericErrorFragment.Java
public class GenericErrorFragment extends Fragment{
#Override
public void onAttach(Activity activity) {
super.onAttach(activity);
}
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
#Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View genericView = inflater.inflate(R.layout.generic_error_msg_fragment, null);
TextView errorText = (TextView) genericView.findViewById(R.id.error_message_textview);
errorText.setText("error msg" );
Button errorbutton = (Button) genericView.findViewById(R.id.error_button_handler);
errorbutton.setOnClickListener(new OnClickListener() {
#Override
public void onClick(View v) {
// your logic launch some other activity
}
});
return genericView;
}
}
you can load this fragment in any activity and can define your custom text for error and button handler
I will not write whole code but I can give you exact example you are looking for
Think of an application in which a person can register either as admin or as user
Now while working on it you make 3 fragments in admin registration activity asking
1.) personal information
2.) academic information
3.) admin details
Now for user registration activity say you make 2 fragments to get the following information
1.) personal information
2.) user details
here you used personal information fragment 2 times for 2 activities
code for this is child's play main thing is the concept

Android Button Losing onClickListener When Keyboard Opens

I have a EditText field and a "Save" Button in my Android layout.
When the Fragment is created, I assign an onClickListener to the Button. The Button works correctly before the keyboard opens and after the keyboard closes, but seems to lose its onClickListener while I am editing the EditText.
Is there somewhere I need to reassign the onClickListener so it is available while the keyboard is open?
Here is the layout:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="top">
<Button android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#drawable/add_comment_details"
android:text="#string/done"
android:id="#+id/done_button"
android:textColor="#color/red_1"
android:layout_alignParentBottom="true"
android:textSize="#dimen/text_size_10"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="#+id/text_field2"
android:layout_above="#id/done_button"
android:hint="#string/enterText2"
android:gravity="start"
android:background="#drawable/add_comment_entertext"
android:padding="20dp"
/>
</RelativeLayout>
Here's the code, in a Fragment where I'm adding the onClickListener
#Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.app_addcommentfragment, null);
text = (EditText) view.findViewById(R.id.text_field2);
done = (Button) view.findViewById(R.id.done_button);
done.setOnClickListener(new View.OnClickListener() {
#Override
public void onClick(View view) {
Log.i("MyFragment","onClick");
doneListener.onClick(saveAndClose);
}
});
return view;
}
I am also using android:windowSoftInputMode="adjustResize" in the Manifest so the EditText and the Button both stay on the screen when the keyboard opens.
Some more weirdness, if I switch the layout to this, the button works, but the button takes up most of the screen:
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="#+id/text_field2"
android:hint="#string/enterText2"
android:gravity="start"
android:background="#drawable/add_comment_entertext"
android:padding="20dp"
/>
<Button android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#drawable/add_comment_details"
android:text="#string/done"
android:id="#+id/done_button"
android:textColor="#color/red_1"
android:layout_below="#id/text_field2"
android:layout_alignParentBottom="true"
android:textSize="#dimen/text_size_10"/>

Categories

Resources