package in.techware.carrefour.activity.elie;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;

import in.techware.carrefour.R;
import in.techware.carrefour.util.AppConstants;

public class ExpiryCaptureActivity extends AppCompatActivity {

    EditText mChangeLocEditText;
    EditText mQtyEditText;
    EditText mBarcodeEditText;
    EditText mLocEditText;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_expiry_capture);
        mChangeLocEditText = findViewById(R.id.etxt_loc_type);
        mQtyEditText = findViewById(R.id.etxt_waste_quantity);
        mBarcodeEditText = findViewById(R.id.etxt_barcode);
        mLocEditText = findViewById(R.id.etxt_location);

        handleKeyboard();
    }

    private void handleKeyboard() {
        if (getSharedPreferences(AppConstants.PREF_FILE, 0).getBoolean(AppConstants.KEYBOARD_STATUS, false)){
            mLocEditText.setFocusableInTouchMode(true);
            mChangeLocEditText.setFocusableInTouchMode(true);
            mBarcodeEditText.setFocusableInTouchMode(true);
            mQtyEditText.setFocusableInTouchMode(true);
        }
    }

    public void clickBack(View v){
        finish();
    }
    public void clickModifyButton(View v){

    }
    public void clickChangeButton(View v){
        mChangeLocEditText.setEnabled(true);
    }
}
