智能售货机及其程序测试(4)
时间:2022-01-03 10:08 来源:毕业论文 作者:毕业论文 点击:次
<FrameLayout android:id="@+id/content" android:layout_width="400dp" android:layout_height="400dp" android:background="@drawable/bg_smallsure" android:padding="5dp" /> </LinearLayout> - <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:layout_weight="1" android:gravity="center_horizontal" android:orientation="vertical" android:paddingTop="50dp"> <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="30dp" android:src="@drawable/text_wayone" /> <include android:id="@+id/keywordLayout" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" layout="@layout/keyboard_smallthm_layout" /> 文献综述 </LinearLayout> <EditText android:id="@+id/searchEditView3" android:layout_width="0dp" android:layout_height="0dp" android:background="#00000000" android:cursorVisible="false" android:focusable="true" android:focusableInTouchMode="true" android:gravity="center_vertical" android:inputType="none" android:selectAllOnFocus="false" android:singleLine="true" android:textColor="#00000000" /> </LinearLayout> 2、输码页面的功能实现代码,主要是能在输入框中输入数字,并且对提货码的位数进行设置。 package com。windo。vms。newpudao。activity; import java。util。List; import android。annotation。SuppressLint; import android。app。Fragment; import android。app。FragmentManager; import android。app。FragmentTransaction; import android。content。Intent; import android。os。Bundle; import android。text。InputType; import android。view。KeyEvent; import android。view。View; import android。view。View。OnClickListener; import android。widget。TextView; import com。windo。service。api。TaskConstant; import com。windo。service。rspdata。TiHuoCodeData; import com。windo。view。Toast; import com。windo。vms。R; import com。windo。vms。framework。Driver; import com。windo。vms。framework。db。GoodsList; import com。windo。vms。framework。util。log。PalLog; import com。windo。vms。pudaomi。activity。BaseActivity; import com。windo。vms。pudaomi。activity。TihuoquedingActivity; import com。windo。vms。pudaomi。fragment。MediaPlayerFragment; /** * @ClassName: ScanCodeActivity * @Description: TODO(扫码提货) * @date * */ public class ScanCodeActivity extends BaseActivity implements OnClickListener{ private static final String TAG = ScanCodeActivity。class。getSimpleName(); /** 兑换码最大长度 */ private int MAXNUM = 11; public static String PROMOTION_ID = "PROMOTION_ID"; // private View v; private MediaPlayerFragment mMediaPlayerFragment = null; private TextView searchEditView; private TextView mHideSearchEditView = null; /** * 输入Buffer */ private StringBuffer buffer = new StringBuffer(); private StringBuffer showBuffer = new StringBuffer(); // (责任编辑:qin) |