import android.widget.Gallery; //导入方法依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View layout = inflater.inflate(R.layout.payment_zone, container, false);
mPaymentModes = (Gallery) layout.findViewById(R.id.payment_modes);
List modes = Data.PaymentMode.paymentModes(mContext);
mPaymentModes.setAdapter(new PaymentModesAdapter(modes));
mPaymentModes.setOnItemSelectedListener(new PaymentModeItemSelectedListener());
mPaymentModes.setSelection(0, false);
mCurrentMode = modes.get(0);
mInput = (EditText) layout.findViewById(R.id.input);
mInput.setInputType(InputType.TYPE_NULL); // Should be TextView.
mNumberPad = (NumKeyboard) layout.findViewById(R.id.numkeyboard);
mNumberPad.setKeyHandler(new Handler(this));
mPaymentsList = (ListView) layout.findViewById(R.id.payments_list);
mPaymentsList.setAdapter(new PaymentsAdapter(mPaymentsListContent, this));
mRemaining = (TextView) layout.findViewById(R.id.ticket_remaining);
mGiveBack = (TextView) layout.findViewById(R.id.give_back);
mCusInfo = (LinearLayout) layout.findViewById(R.id.user_characteristic);
mCusPrepaid = (TextView) layout.findViewById(R.id.custPrepaidAmount);
mCusDebt = (TextView) layout.findViewById(R.id.currentDebt);
mCusDebtMax = (TextView) layout.findViewById(R.id.mountMax);
LinearLayout customerList = (LinearLayout) layout.findViewById(R.id.customers_list);
customerList.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mListener.onPfCustomerListClick();
}
});
updateView();
return layout;
}