Skip to content

Commit

Permalink
Added ui for custom task adding
Browse files Browse the repository at this point in the history
  • Loading branch information
km2442 committed Jun 18, 2019
1 parent 9a915d5 commit 3ad932e
Show file tree
Hide file tree
Showing 7 changed files with 492 additions and 1 deletion.
Binary file modified Android/.idea/caches/build_file_checksums.ser
Binary file not shown.
Binary file modified Android/.idea/caches/gradle_models.ser
Binary file not shown.
3 changes: 2 additions & 1 deletion Android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".CommunicatorUI"></activity>
<activity android:name=".AddCustomTask"></activity>
<activity android:name=".CommunicatorUI" />
<activity android:name=".ConnectWait" />
<activity
android:name=".Settings"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package dev.kamilklecha.autoswitchmobile;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class AddCustomTask extends AppCompatActivity {

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

Button btnCancel = (Button) findViewById(R.id.addCustom_Cancel);

btnCancel.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
finish();
}
});
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package dev.kamilklecha.autoswitchmobile;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
Expand All @@ -25,6 +26,8 @@ protected void onCreate(Bundle savedInstanceState) {
TextView tv = (TextView) findViewById(R.id.commUI_Addr);
tv.setText(addr);

Button btnCustom = (Button) findViewById(R.id.commUI_CustomAction);

Button btnShutdown = (Button) findViewById(R.id.commUI_Shutdown);
Button btnReboot = (Button) findViewById(R.id.commUI_Reboot);
Button btnSleep = (Button) findViewById(R.id.commUI_Sleep);
Expand All @@ -35,6 +38,14 @@ protected void onCreate(Bundle savedInstanceState) {
Button btnSettings = (Button) findViewById(R.id.commUI_Settings);
Button btnDisconnect = (Button) findViewById(R.id.commUI_Disconnect);

btnCustom.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent i = new Intent(CommunicatorUI.this, AddCustomTask.class);
startActivity(i);
}
});

btnShutdown.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Expand Down
Loading

0 comments on commit 3ad932e

Please sign in to comment.