erased main activity
This commit is contained in:
parent
78145f1cba
commit
b46f007305
@ -17,13 +17,15 @@ public class MainActivity extends AppCompatActivity {
|
||||
|
||||
/** Called when the user taps the Send button */
|
||||
public void sendMessage(View view) {
|
||||
EditText editText1 = (EditText) findViewById(R.id.ipAddress);
|
||||
// String ipAddress = editText1.getText().toString();
|
||||
String ipAddress = "172.16.202.14";
|
||||
//EditText editText1 = (EditText) findViewById(R.id.ipAddress);
|
||||
//String ipAddress = editText1.getText().toString();
|
||||
//String ipAddress = "172.16.202.14";
|
||||
|
||||
String ipAddress = "10.0.0.60";
|
||||
int port = 502;
|
||||
|
||||
EditText editText2 = (EditText) findViewById(R.id.port);
|
||||
// int port = Integer.parseInt(editText2.getText().toString());
|
||||
//EditText editText2 = (EditText) findViewById(R.id.port);
|
||||
//int port = Integer.parseInt(editText2.getText().toString());
|
||||
|
||||
GlobalState state = (GlobalState) getApplicationContext();
|
||||
state.setIpAddress(ipAddress);
|
||||
|
@ -6,69 +6,17 @@
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".MainActivity">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/ipAddress"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:ems="10"
|
||||
android:inputType="textPersonName"
|
||||
app:layout_constraintEnd_toEndOf="@+id/count"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="@string/ip_address" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/button"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_width="91dp"
|
||||
android:layout_height="51dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:onClick="sendMessage"
|
||||
android:text="@string/button_send"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toEndOf="@+id/ipAddress"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/port"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:ems="10"
|
||||
android:inputType="textPersonName"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/ipAddress"
|
||||
tools:text="@string/ip_port" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/ref"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:ems="10"
|
||||
android:inputType="textPersonName"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/port"
|
||||
tools:text="@string/ip_ref" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/count"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:ems="10"
|
||||
android:inputType="textPersonName"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/ref"
|
||||
tools:text="@string/ip_count" />
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
Loading…
Reference in New Issue
Block a user