Skip to content

Commit

Permalink
Removed test elements from client activities
Browse files Browse the repository at this point in the history
  • Loading branch information
wmamos committed Dec 3, 2022
1 parent 3575790 commit ecd9ee9
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@


public class DeviceActivity extends AppCompatActivity {
public Button connect;
public Button temp;
//public Button connect;
//public Button temp;
public ConnectionManager cm;


Expand Down Expand Up @@ -45,7 +45,7 @@ public void onClick(View v) {
}
});

connect = (Button) findViewById(R.id.connec);
/*connect = (Button) findViewById(R.id.connec);
connect.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Expand All @@ -59,7 +59,7 @@ public void onClick(View view) {
public void onClick(View view) {
}
});
});*/
}

@Override
Expand Down
30 changes: 17 additions & 13 deletions Client/Android/app/src/main/java/com/neptune/app/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,34 +36,34 @@ public class MainActivity extends AppCompatActivity implements RenameDialog.Rena
private Button add;
private AlertDialog addDialog;
private LinearLayout addLine;
private Button notifListTest;
//private Button notifListTest;
private ImageView delete;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

devName = (TextView) findViewById(R.id.name);
editName = (ImageView) findViewById(R.id.editDevName);
//devName = (TextView) findViewById(R.id.name);
//editName = (ImageView) findViewById(R.id.editDevName);
add = (Button) findViewById(R.id.addDev);
addLine = findViewById(R.id.container);
notifListTest = findViewById(R.id.notifTest);
//notifListTest = findViewById(R.id.notifTest);
buildAddDialog();

devName.setOnClickListener(new TextView.OnClickListener(){
/*devName.setOnClickListener(new TextView.OnClickListener(){
@Override
public void onClick(View v) {
startActivity(new Intent(MainActivity.this, DeviceActivity.class));
}
});
});*/

editName.setOnClickListener(new ImageView.OnClickListener(){
/*editName.setOnClickListener(new ImageView.OnClickListener(){
@Override
public void onClick(View v) {
openDialog();
}
});
});*/

add.setOnClickListener(new View.OnClickListener() {
@Override
Expand All @@ -73,7 +73,7 @@ public void onClick(View view) {
});

//Part of the Notification Button
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
/*if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
NotificationChannel channel = new NotificationChannel("My notification", "My notification", NotificationManager.IMPORTANCE_DEFAULT);
NotificationManager manager = getSystemService(NotificationManager.class);
manager.createNotificationChannel(channel);
Expand All @@ -94,7 +94,7 @@ public void onClick(View view) {
notificationManagerCompat.notify(1,buidler.build());
}
});
});*/
}

private void buildAddDialog() {
Expand Down Expand Up @@ -156,9 +156,13 @@ public void onClick(View v) {
delete.setOnClickListener(new ImageView.OnClickListener() {
@Override
public void onClick(View v) {
server = serverManager.getServer(devName.getText().toString());
serverManager.removeServer(server);
server.unpair();
/*try{
server = serverManager.getServer(devName.getText().toString());
serverManager.removeServer(server);
} catch (Exception e) {
}
server.unpair();*/
addLine.removeView(view);
}
});
Expand Down
4 changes: 2 additions & 2 deletions Client/Android/app/src/main/res/layout/activity_device.xml
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@
tools:ignore="ExtraText,OnClick,TouchTargetSizeCheck" />
</RadioGroup>

<Button
<!--<Button
android:id="@+id/connec"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Expand All @@ -273,7 +273,7 @@
android:layout_marginEnd="60dp"
android:text="Nothing For Now"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintTop_toTopOf="parent" />-->


</androidx.constraintlayout.widget.ConstraintLayout>
19 changes: 9 additions & 10 deletions Client/Android/app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<ImageView
<!--<ImageView
android:id="@+id/imageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Expand All @@ -80,9 +80,9 @@
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.104"
app:srcCompat="@drawable/desktop_connection_logo"
tools:ignore="ImageContrastCheck" />
tools:ignore="ImageContrastCheck" />-->

<ImageView
<!--<ImageView
android:id="@+id/editDevName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Expand All @@ -97,9 +97,9 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/change_name_pencil_logo"
tools:ignore="TouchTargetSizeCheck,SpeakableTextPresentCheck" />
tools:ignore="TouchTargetSizeCheck,SpeakableTextPresentCheck" />-->

<TextView
<!--<TextView
android:id="@+id/name"
android:layout_width="244dp"
android:layout_height="24dp"
Expand All @@ -112,15 +112,14 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.104"
tools:ignore="TouchTargetSizeCheck" />
tools:ignore="TouchTargetSizeCheck" />-->

<ScrollView
android:layout_width="417dp"
android:layout_height="621dp"
android:layout_marginTop="5dp"
android:scrollbars="none"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/editDevName"
app:layout_constraintTop_toBottomOf="@+id/addDev"
tools:ignore="SpeakableTextPresentCheck">

<LinearLayout
Expand All @@ -132,14 +131,14 @@
</LinearLayout>
</ScrollView>

<Button
<!--<Button
android:id="@+id/notifTest"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:layout_marginEnd="100dp"
android:text="Button"
app:layout_constraintEnd_toStartOf="@+id/editDevName"
app:layout_constraintTop_toBottomOf="@+id/addDev" />
app:layout_constraintTop_toBottomOf="@+id/addDev" />-->

</androidx.constraintlayout.widget.ConstraintLayout>

0 comments on commit ecd9ee9

Please sign in to comment.