Created
April 29, 2017 02:44
-
-
Save luiseduardogfranca/bb414910888d62ec6b17ce028cf57a2b to your computer and use it in GitHub Desktop.
XML for application Android witch Socket
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<LinearLayout 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="vertical" | |
tools:context="com.example.luis.usingsocket.MainActivity"> | |
<TextView | |
android:layout_width="wrap_content" | |
android:layout_height="0dp" | |
android:layout_weight="3" | |
android:text="Conexão com Socket" | |
android:textSize="25sp" | |
android:textStyle="bold" | |
android:layout_gravity="center_horizontal" | |
android:layout_marginTop="30dp"/> | |
<LinearLayout | |
android:layout_width="match_parent" | |
android:layout_height="0dp" | |
android:layout_gravity="center_horizontal" | |
android:layout_weight="4" | |
android:paddingLeft="20dp" | |
android:paddingRight="20dp" | |
android:orientation="vertical"> | |
<EditText | |
android:id="@+id/field_ip" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:textStyle="bold" | |
android:hint="Enderço IP" | |
android:textSize="15sp" | |
android:inputType="number|text"/> | |
<EditText | |
android:id="@+id/field_port" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:textStyle="bold" | |
android:hint="Porta do servidor " | |
android:textSize="15sp" | |
android:inputType="number"/> | |
<TextView | |
android:id="@+id/text" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:layout_gravity="center_horizontal" | |
android:layout_marginTop="10dp" | |
android:textColor="#329e3b" | |
android:textSize="15sp" | |
android:textStyle="bold"/> | |
</LinearLayout> | |
<LinearLayout | |
android:layout_width="match_parent" | |
android:layout_height="0dp" | |
android:layout_weight="1" | |
android:orientation="vertical"> | |
<Button | |
android:onClick="buttonConnect" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:layout_marginLeft="10dp" | |
android:layout_marginRight="10dp" | |
android:background="@color/colorPrimary" | |
android:textColor="#FFFFFF" | |
android:text="Conectar" | |
android:textAllCaps="false"/> | |
</LinearLayout> | |
</LinearLayout> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment