order note text changed
This commit is contained in:
@@ -15,6 +15,7 @@ import butterknife.OnClick;
|
||||
import ch.pizzaleu.android.R;
|
||||
import ch.pizzaleu.android.activity.BaseActivity;
|
||||
import ch.pizzaleu.android.activity.CreateOrderActivity;
|
||||
import ch.pizzaleu.android.api.ApiConstants;
|
||||
import ch.pizzaleu.android.helper.SharedPrefsHelper;
|
||||
import ch.pizzaleu.android.model.cart.CartProductModel;
|
||||
import ch.pizzaleu.android.view.AppEditText;
|
||||
@@ -102,6 +103,12 @@ public class CreateOrderNoteFragment extends CreateOrderBaseFragment {
|
||||
}
|
||||
}
|
||||
*/
|
||||
int hintResId = R.string.order_note_title_for_free_shipping;
|
||||
if(createOrderActivity.getSelectedShippingMethod().getCode().equals(ApiConstants.SHIPPING_METHOD_CODE_PICK_UP_FROM_STORE)){
|
||||
hintResId = R.string.order_note_title_for_self_pickup;
|
||||
}
|
||||
orderNoteAppEditText.setHint(hintResId);
|
||||
|
||||
if(createOrderActivity.getOrderNote() != null){
|
||||
orderNoteAppEditText.setText(createOrderActivity.getOrderNote());
|
||||
}
|
||||
|
||||
@@ -156,6 +156,10 @@ public class AppEditText extends LinearLayout implements View.OnClickListener {
|
||||
inputMethodManager.toggleSoftInput(InputMethodManager.SHOW_FORCED,0);
|
||||
}
|
||||
|
||||
public void setHint(int hintResId){
|
||||
hintTextView.setText(hintResId);
|
||||
}
|
||||
|
||||
private void goNextLineWhenEndOfLine(){
|
||||
editText.addTextChangedListener(new TextWatcher() {
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user