Skip to content

Instantly share code, notes, and snippets.

@ahmedfgad
Created July 31, 2019 14:58
Show Gist options
  • Save ahmedfgad/dfe3207cf2404da1a55912efd31330e4 to your computer and use it in GitHub Desktop.
Save ahmedfgad/dfe3207cf2404da1a55912efd31330e4 to your computer and use it in GitHub Desktop.
<?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:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_weight="1"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="IPv4 Address" />
<EditText
android:layout_weight="4"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:id="@+id/IPAddress"
android:text="192.168.1.8" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_weight="1"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="Port Number" />
<EditText
android:layout_weight="4"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:id="@+id/portNumber"
android:text="5000"/>
</LinearLayout>
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Connect to Server"
android:onClick="connectServer"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Message from the Server ..."
android:id="@+id/responseText" />
</LinearLayout>
@ahmedfgad
Copy link
Author

Hi, may I know where should I run this code? Android studio?

Hi @nurulazealia,

This file is part of an Android Studio project which is available here: https://github.com/ahmedfgad/AndroidFlask

Please let me know if you have a problem running it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment