Skip to content
Snippets Groups Projects
Commit b11a4740 authored by Christian Dresen's avatar Christian Dresen
Browse files

OrderList neu gestaltet

parent a7868b07
No related branches found
No related tags found
No related merge requests found
...@@ -44,9 +44,9 @@ public class MainManager { ...@@ -44,9 +44,9 @@ public class MainManager {
private RestService createRestService() { private RestService createRestService() {
Retrofit retrofit = new Retrofit.Builder() Retrofit retrofit = new Retrofit.Builder()
.baseUrl("http://10.0.1.134:8000/api/") //.baseUrl("http://10.0.1.134:8000/api/")
//.baseUrl("https://infra-test.warpzone.ms/api/") //.baseUrl("https://infra-test.warpzone.ms/api/")
// .baseUrl("http://10.0.2.92:8000/api/") .baseUrl("http://192.168.0.194:8000/api/")
.addConverterFactory(GsonConverterFactory.create()) .addConverterFactory(GsonConverterFactory.create())
.build(); .build();
return retrofit.create(RestService.class); return retrofit.create(RestService.class);
......
...@@ -6,6 +6,7 @@ import android.view.LayoutInflater; ...@@ -6,6 +6,7 @@ import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.ArrayAdapter; import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.ImageButton; import android.widget.ImageButton;
import android.widget.TextView; import android.widget.TextView;
...@@ -36,7 +37,7 @@ public class ListViewAdapter extends ArrayAdapter<Order> { ...@@ -36,7 +37,7 @@ public class ListViewAdapter extends ArrayAdapter<Order> {
holder = new OrderHolder(); holder = new OrderHolder();
holder.order = items.get(position); holder.order = items.get(position);
holder.btnRemoveOrder = (ImageButton) row.findViewById(R.id.btnRemoveOrder); holder.btnRemoveOrder = (Button) row.findViewById(R.id.btnRemoveOrder);
holder.btnRemoveOrder.setTag(holder.order); holder.btnRemoveOrder.setTag(holder.order);
holder.value = (TextView)row.findViewById(R.id.txtOrderValue); holder.value = (TextView)row.findViewById(R.id.txtOrderValue);
...@@ -57,6 +58,6 @@ public class ListViewAdapter extends ArrayAdapter<Order> { ...@@ -57,6 +58,6 @@ public class ListViewAdapter extends ArrayAdapter<Order> {
Order order; Order order;
TextView name; TextView name;
TextView value; TextView value;
ImageButton btnRemoveOrder; Button btnRemoveOrder;
} }
} }
\ No newline at end of file
package ms.itsecteam.warpdrink.orderList; package ms.itsecteam.warpdrink.orderList;
import android.widget.Button;
import android.widget.ImageButton; import android.widget.ImageButton;
import java.io.Serializable; import java.io.Serializable;
...@@ -12,13 +13,13 @@ public class Order implements Serializable { ...@@ -12,13 +13,13 @@ public class Order implements Serializable {
private Product product; private Product product;
private double position=0; private double position=0;
private ImageButton btn; private Button btn;
public ImageButton getBtn() { public Button getBtn() {
return btn; return btn;
} }
public void setBtn(ImageButton btn) { public void setBtn(Button btn) {
this.btn = btn; this.btn = btn;
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:layout_height="fill_parent"
android:orientation="horizontal" > android:orientation="horizontal">
<LinearLayout <LinearLayout
android:orientation="vertical" android:orientation="vertical"
...@@ -26,14 +26,14 @@ ...@@ -26,14 +26,14 @@
</LinearLayout> </LinearLayout>
<ImageButton <Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/btnDelete"
android:id="@+id/btnRemoveOrder" android:id="@+id/btnRemoveOrder"
android:layout_width="123dp"
android:layout_height="50dp"
android:layout_gravity="right"
android:background="@color/flatui_red"
android:contentDescription="@string/app_name"
android:onClick="removeOrderOnClickHandler" android:onClick="removeOrderOnClickHandler"
android:src="@android:drawable/ic_menu_delete" /> android:background="@color/flatui_red"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp" />
</LinearLayout> </LinearLayout>
\ No newline at end of file
...@@ -32,6 +32,6 @@ ...@@ -32,6 +32,6 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="63dp" android:layout_height="63dp"
android:onClick="removeOrderOnClickHandler" android:onClick="removeOrderOnClickHandler"
app:srcCompat="@android:color/holo_red_dark" /> />
</LinearLayout> </LinearLayout>
\ No newline at end of file
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
<string name="save">Speichern</string> <string name="save">Speichern</string>
<string name="abort">Abbrechen</string> <string name="abort">Abbrechen</string>
<string name="lernCardId">Learn Card ID</string> <string name="lernCardId">Learn Card ID</string>
<string name="btnDelete">Löschen</string>
<style name="ButtonText"> <style name="ButtonText">
<item name="android:layout_width">fill_parent</item> <item name="android:layout_width">fill_parent</item>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment