Commit b11a4740 authored by Christian Dresen's avatar Christian Dresen
Browse files

OrderList neu gestaltet

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