mirror of
https://github.com/ClaytonWWilson/Listify.git
synced 2025-12-16 10:48:46 +00:00
commit
d117bfd05f
@ -2,6 +2,7 @@ package com.example.listify;
|
|||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
|
import android.content.Intent;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.text.Editable;
|
import android.text.Editable;
|
||||||
@ -220,6 +221,17 @@ public class ListPage extends AppCompatActivity implements Requestor.Receiver, R
|
|||||||
exportItem.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
|
exportItem.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onMenuItemClick(MenuItem item) {
|
public boolean onMenuItemClick(MenuItem item) {
|
||||||
|
String listContent = "";
|
||||||
|
|
||||||
|
|
||||||
|
Intent sendIntent = new Intent();
|
||||||
|
sendIntent.setAction(Intent.ACTION_SEND);
|
||||||
|
sendIntent.putExtra(Intent.EXTRA_TEXT, "this is my text test");
|
||||||
|
sendIntent.setType("text/plain");
|
||||||
|
|
||||||
|
Intent shareIntent = Intent.createChooser(sendIntent, null);
|
||||||
|
startActivity(shareIntent);
|
||||||
|
|
||||||
Toast.makeText(ListPage.this, "Export List", Toast.LENGTH_SHORT).show();
|
Toast.makeText(ListPage.this, "Export List", Toast.LENGTH_SHORT).show();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -231,22 +243,16 @@ public class ListPage extends AppCompatActivity implements Requestor.Receiver, R
|
|||||||
@Override
|
@Override
|
||||||
public void acceptDelivery(Object delivered) {
|
public void acceptDelivery(Object delivered) {
|
||||||
// Clear out old values
|
// Clear out old values
|
||||||
runOnUiThread(new Runnable() {
|
pNames.clear();
|
||||||
@Override
|
pStores.clear();
|
||||||
public void run() {
|
pPrices.clear();
|
||||||
pNames.clear();
|
pQuantity.clear();
|
||||||
pStores.clear();
|
pImages.clear();
|
||||||
pPrices.clear();
|
totalPriceByStore.clear();
|
||||||
pQuantity.clear();
|
storeID2Name.clear();
|
||||||
pImages.clear();
|
storeHeaderIndex.clear();
|
||||||
totalPriceByStore.clear();
|
pListItemPair.clear();
|
||||||
storeID2Name.clear();
|
totalPrice = 0;
|
||||||
storeHeaderIndex.clear();
|
|
||||||
pListItemPair.clear();
|
|
||||||
totalPrice = 0;
|
|
||||||
tvTotalPrice.setText(String.format("$%.2f", totalPrice));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
List list = (List) delivered;
|
List list = (List) delivered;
|
||||||
|
|
||||||
@ -344,6 +350,13 @@ public class ListPage extends AppCompatActivity implements Requestor.Receiver, R
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
runOnUiThread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
tvTotalPrice.setText(String.format("$%.2f", totalPrice));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
refreshList.setRefreshing(false);
|
refreshList.setRefreshing(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user