Anpassung an neue Kommunikation
This commit is contained in:
parent
bec40cb402
commit
2ddfcf94dd
4
APED/.idea/gradle.xml
generated
4
APED/.idea/gradle.xml
generated
@ -10,8 +10,8 @@
|
||||
<option name="gradleJvm" value="1.8" />
|
||||
<option name="modules">
|
||||
<set>
|
||||
<option value="$USER_HOME$/Storage/Programs/TH/MO_Mobile_Systeme/aped_app/APED" />
|
||||
<option value="$USER_HOME$/Storage/Programs/TH/MO_Mobile_Systeme/aped_app/APED/app" />
|
||||
<option value="$PROJECT_DIR$" />
|
||||
<option value="$PROJECT_DIR$/app" />
|
||||
</set>
|
||||
</option>
|
||||
<option name="resolveModulePerSourceSet" value="false" />
|
||||
|
@ -60,7 +60,7 @@ public class MainActivity extends AppCompatActivity {
|
||||
//checks that the permission to read and write the xml is granted
|
||||
ensurePermissions();
|
||||
setXML();
|
||||
uebergabe = new Communicator("",8080,this);
|
||||
uebergabe = new Communicator("192.168.1.220",8080,this);
|
||||
setContentView(R.layout.activity_main);
|
||||
Toolbar toolbar = findViewById(R.id.toolbar);
|
||||
setSupportActionBar(toolbar);
|
||||
|
@ -21,9 +21,12 @@ import androidx.fragment.app.Fragment;
|
||||
import androidx.lifecycle.Observer;
|
||||
import androidx.lifecycle.ViewModelProvider;
|
||||
|
||||
import com.android.volley.Response;
|
||||
import com.example.aped.MainActivity;
|
||||
import com.example.aped.R;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class AllIOsFragment extends Fragment {
|
||||
@ -121,6 +124,12 @@ public class AllIOsFragment extends Fragment {
|
||||
imageView.setImageResource(image);
|
||||
TextView_Name.setText(mainActivity.xml.getDeviceNames().get(i));
|
||||
//TextView_State.setText(mainActivity.uebergabe.read(mainActivity.xml.getDeviceNames().get(i)));
|
||||
mainActivity.uebergabe.read(mainActivity.xml.getDeviceNames().get(i), new Response.Listener<JSONObject>() {
|
||||
@Override
|
||||
public void onResponse(JSONObject response) {
|
||||
TextView_State.setText(response.toString());
|
||||
}
|
||||
});
|
||||
ButtonView_Favoriten.setImageResource(favorite_image);
|
||||
return view;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user