feedback implemented regarding rating
parent
136115a617
commit
9322bcea4d
|
@ -44,7 +44,7 @@ public class SummaryActivity extends AppCompatActivity {
|
||||||
txtChecking.setText(String.format("%s %%", qualitySaveResponse.getChecking()));
|
txtChecking.setText(String.format("%s %%", qualitySaveResponse.getChecking()));
|
||||||
txtPacking.setText(String.format("%s %%", qualitySaveResponse.getPacking()));
|
txtPacking.setText(String.format("%s %%", qualitySaveResponse.getPacking()));
|
||||||
txtSubStore.setText(String.format("%s %%", qualitySaveResponse.getSub_Store()));
|
txtSubStore.setText(String.format("%s %%", qualitySaveResponse.getSub_Store()));
|
||||||
txtReportId.setText(String.format("Report ID: %s", qualitySaveResponse.getReportId()));
|
txtReportId.setText(String.format("Code: %s", qualitySaveResponse.getReportId()));
|
||||||
|
|
||||||
img_back.setOnClickListener(new View.OnClickListener() {
|
img_back.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -55,12 +55,17 @@ public class ItemStepsAdapter extends RecyclerView.Adapter<ItemStepsAdapter.Item
|
||||||
this.items = items;
|
this.items = items;
|
||||||
this.imageSelectionListener = listener;
|
this.imageSelectionListener = listener;
|
||||||
|
|
||||||
dropdownOptions.add("0");
|
dropdownOptions.add("0.0");
|
||||||
dropdownOptions.add("1");
|
dropdownOptions.add("0.5");
|
||||||
dropdownOptions.add("2");
|
dropdownOptions.add("1.0");
|
||||||
dropdownOptions.add("3");
|
dropdownOptions.add("1.5");
|
||||||
dropdownOptions.add("4");
|
dropdownOptions.add("2.0");
|
||||||
dropdownOptions.add("5");
|
dropdownOptions.add("2.5");
|
||||||
|
dropdownOptions.add("3.0");
|
||||||
|
dropdownOptions.add("3.5");
|
||||||
|
dropdownOptions.add("4.0");
|
||||||
|
dropdownOptions.add("4.5");
|
||||||
|
dropdownOptions.add("5.0");
|
||||||
}
|
}
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
|
@ -170,7 +175,7 @@ public class ItemStepsAdapter extends RecyclerView.Adapter<ItemStepsAdapter.Item
|
||||||
public void onItemClick(AdapterView<?> parent, View view, int sub_position, long id) {
|
public void onItemClick(AdapterView<?> parent, View view, int sub_position, long id) {
|
||||||
|
|
||||||
currentItem.setSelectedOption(sub_position);
|
currentItem.setSelectedOption(sub_position);
|
||||||
currentItem.setRating(Integer.parseInt(parent.getItemAtPosition(sub_position).toString()));
|
currentItem.setRating(Double.parseDouble(parent.getItemAtPosition(sub_position).toString()));
|
||||||
|
|
||||||
selectedValue = Double.parseDouble(parent.getItemAtPosition(sub_position).toString());
|
selectedValue = Double.parseDouble(parent.getItemAtPosition(sub_position).toString());
|
||||||
percentage = (selectedValue / 5) * 100;
|
percentage = (selectedValue / 5) * 100;
|
||||||
|
|
|
@ -674,7 +674,7 @@ public class SubStoreFragment extends Fragment implements EasyPermissions.Permis
|
||||||
|
|
||||||
QualityControl qualityControl = new QualityControl(generatedBy, siteID, unitId, departId, floorId, tempList);
|
QualityControl qualityControl = new QualityControl(generatedBy, siteID, unitId, departId, floorId, tempList);
|
||||||
|
|
||||||
Log.e("---final Item: ------", "-----------------");
|
//Log.e("---final Item: ------", "-----------------");
|
||||||
|
|
||||||
for (ItemModel item : tempList) {
|
for (ItemModel item : tempList) {
|
||||||
Log.e("Final-Items: ", "ProcessId: " + item.getProcessId() +
|
Log.e("Final-Items: ", "ProcessId: " + item.getProcessId() +
|
||||||
|
|
|
@ -40,7 +40,7 @@ public class QualitySaveResponse implements Serializable {
|
||||||
@Expose
|
@Expose
|
||||||
private String Sub_Store;
|
private String Sub_Store;
|
||||||
|
|
||||||
@SerializedName("reportId")
|
@SerializedName("code")
|
||||||
@Expose
|
@Expose
|
||||||
private String ReportId;
|
private String ReportId;
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ public class ItemModel {
|
||||||
|
|
||||||
private int processId;
|
private int processId;
|
||||||
private int stepId;
|
private int stepId;
|
||||||
private int rating;
|
private double rating;
|
||||||
private String percentage;
|
private String percentage;
|
||||||
private String remarks;
|
private String remarks;
|
||||||
private int selectedOption;
|
private int selectedOption;
|
||||||
|
@ -19,7 +19,7 @@ public class ItemModel {
|
||||||
public ItemModel() {
|
public ItemModel() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public ItemModel(int processId, int stepId, int rating, String percentage, String remarks, int selectedOption, byte[] imageByteArray, List<byte[]> imageArrayList) {
|
public ItemModel(int processId, int stepId, double rating, String percentage, String remarks, int selectedOption, byte[] imageByteArray, List<byte[]> imageArrayList) {
|
||||||
this.processId = processId;
|
this.processId = processId;
|
||||||
this.stepId = stepId;
|
this.stepId = stepId;
|
||||||
this.rating = rating;
|
this.rating = rating;
|
||||||
|
@ -70,11 +70,11 @@ public class ItemModel {
|
||||||
this.selectedOption = selectedOption;
|
this.selectedOption = selectedOption;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getRating() {
|
public double getRating() {
|
||||||
return rating;
|
return rating;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setRating(int rating) {
|
public void setRating(double rating) {
|
||||||
this.rating = rating;
|
this.rating = rating;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -52,6 +52,10 @@
|
||||||
android:id="@+id/score_textview"
|
android:id="@+id/score_textview"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:dropDownHeight="300dp"
|
||||||
|
android:scrollbars="vertical"
|
||||||
|
android:scrollbarFadeDuration="0"
|
||||||
|
android:fadeScrollbars="false"
|
||||||
android:layout_gravity="start|left"
|
android:layout_gravity="start|left"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:inputType="none"
|
android:inputType="none"
|
||||||
|
|
Loading…
Reference in New Issue