修改高通Camera的拍照默认模式.
修改的效果位置为下图红色框框:
具体的相关代码为:
/src/com/android/camera/CaptureUI.java:
public CaptureUI(CameraActivity activity, final CaptureModule module, View parent) {
...
mFlashButton = (FlashToggleButton) mRootView.findViewById(R.id.flash_button);
mModeSelectLayout = (RecyclerView) mRootView.findViewById(R.id.mode_select_layout);
mModeSelectLayout.setLayoutManager(new LinearLayoutManager(mActivity,
LinearLayoutManager.HORIZONTAL, false));
mCameraModeAdapter = new Camera2ModeAdapter(mModule.getCameraModeList());
mCameraModeAdapter.setOnItemClickListener(mModule.getModeItemClickListener());
mModeSelectLayout.setAdapter(mCameraModeAdapter);
mSettingsIcon = (ImageView) mRootView.findViewById(R.id.settings);
mSettingsIcon.setImageResource(R.drawable.settings);
mSettingsIcon.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
openSettingsMenu();
}
});
...
}
/src/com/android/camera/data/Camera2ModeAdapter.java
public class Camera2ModeAdapter extends RecyclerView.Adapter<Camera2ModeAdapter.ViewHolder> {
private List<String> mModeList;
- private int mSelectedPos = 2;
+ private int mSelectedPos = 1;
private OnItemClickListener mOnItemClickListener;
public Camera2ModeAdapter(List<String> list) {
}