Commit b26227e7 authored by Muhammad Suryono's avatar Muhammad Suryono

Update

parent a847797c
......@@ -188,7 +188,8 @@ public class FormProductActivity extends AppCompatActivity {
HashSet<String> set = new HashSet<>();
List<String> str = new ArrayList<>();
categoryModels = new ArrayList<>();
if (productModelsIntent == null){
Log.i("GET_CATEGORY", "setSpinner: "+utils.convertGson(productModelsIntent));
if (productModelsIntent.getCategoryProduct() == 0){
str.add("SELECT CATEGORY");
}else{
str.add(getCategoryById(productModelsIntent.getIdProduct()));
......@@ -337,11 +338,11 @@ public class FormProductActivity extends AppCompatActivity {
}
private String getCategoryById(int s) {
CategoryServise categoryServise = client.Client(CategoryServise.class);
categoryServise.getCategoryId(s).enqueue(new Callback<DataResponse<CategoryModels>>() {
@Override
public void onResponse(Call<DataResponse<CategoryModels>> call, Response<DataResponse<CategoryModels>> response) {
Log.i("ER", "onResponse: "+utils.convertGson(response.body()));
categoryName = response.body().getData().getNameCategory();
}
......
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