当前位置: 首页>>代码示例>>Java>>正文


Java CameraConfiguration.MediaAction方法代码示例

本文整理汇总了Java中com.sandrios.sandriosCamera.internal.configuration.CameraConfiguration.MediaAction方法的典型用法代码示例。如果您正苦于以下问题:Java CameraConfiguration.MediaAction方法的具体用法?Java CameraConfiguration.MediaAction怎么用?Java CameraConfiguration.MediaAction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.sandrios.sandriosCamera.internal.configuration.CameraConfiguration的用法示例。


在下文中一共展示了CameraConfiguration.MediaAction方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getOutputMediaFile

import com.sandrios.sandriosCamera.internal.configuration.CameraConfiguration; //导入方法依赖的package包/类
public static File getOutputMediaFile(Context context, @CameraConfiguration.MediaAction int mediaAction) {
    File mediaStorageDir = context.getFilesDir();

    if (!mediaStorageDir.exists()) {
        if (!mediaStorageDir.mkdirs()) {
            Log.d(TAG, "Failed to create directory.");
            return null;
        }
    }

    String timeStamp = new SimpleDateFormat("yyyy_MM_dd_HH_mm_ss", Locale.ENGLISH)
            .format(new Date());
    File mediaFile;
    if (mediaAction == CameraConfiguration.MEDIA_ACTION_PHOTO) {
        mediaFile = new File(mediaStorageDir.getPath() + File.separator +
                "IMG_" + timeStamp + ".jpg");
    } else if (mediaAction == CameraConfiguration.MEDIA_ACTION_VIDEO) {
        mediaFile = new File(mediaStorageDir.getPath() + File.separator +
                "VID_" + timeStamp + ".mp4");
    } else {
        return null;
    }

    return mediaFile;
}
 
开发者ID:sandrios,项目名称:sandriosCamera,代码行数:26,代码来源:CameraHelper.java

示例2: setMediaAction

import com.sandrios.sandriosCamera.internal.configuration.CameraConfiguration; //导入方法依赖的package包/类
public void setMediaAction(@CameraConfiguration.MediaAction int mediaAction) {
    this.mediaAction = mediaAction;
    if (CameraConfiguration.MEDIA_ACTION_PHOTO == mediaAction)
        currentState = TAKE_PHOTO_STATE;
    else currentState = READY_FOR_RECORD_STATE;
    setRecordState(currentState);
    setIcon();
}
 
开发者ID:MartinRGB,项目名称:android_camera_experiment,代码行数:9,代码来源:RecordButton.java

示例3: newIntent

import com.sandrios.sandriosCamera.internal.configuration.CameraConfiguration; //导入方法依赖的package包/类
public static Intent newIntent(Context context,
                               @CameraConfiguration.MediaAction int mediaAction,
                               String filePath, boolean showImageCrop) {

    return new Intent(context, PreviewActivity.class)
            .putExtra(MEDIA_ACTION_ARG, mediaAction)
            .putExtra(SHOW_CROP, showImageCrop)
            .putExtra(FILE_PATH_ARG, filePath);
}
 
开发者ID:MartinRGB,项目名称:android_camera_experiment,代码行数:10,代码来源:PreviewActivity.java

示例4: setup

import com.sandrios.sandriosCamera.internal.configuration.CameraConfiguration; //导入方法依赖的package包/类
public void setup(@CameraConfiguration.MediaAction int mediaAction, @NonNull RecordButtonListener listener) {
        setMediaAction(mediaAction);
        this.listener = listener;

//        setBackground(ContextCompat.getDrawable(context, R.drawable.circle_frame_background_dark));
        if (Build.VERSION.SDK_INT > 15)
            setBackground(ContextCompat.getDrawable(context, R.drawable.circle_frame_background));
        else
            setBackgroundDrawable(ContextCompat.getDrawable(context, R.drawable.circle_frame_background));

        setIcon();
        setOnClickListener(new RecordClickListener());
        setSoundEffectsEnabled(false);
        setIconPadding(iconPadding);
    }
 
开发者ID:sandrios,项目名称:sandriosCamera,代码行数:16,代码来源:RecordButton.java

示例5: getMediaAction

import com.sandrios.sandriosCamera.internal.configuration.CameraConfiguration; //导入方法依赖的package包/类
@CameraConfiguration.MediaAction
int getMediaAction();
 
开发者ID:MartinRGB,项目名称:android_camera_experiment,代码行数:3,代码来源:CameraController.java

示例6: updateUiForMediaAction

import com.sandrios.sandriosCamera.internal.configuration.CameraConfiguration; //导入方法依赖的package包/类
@Override
public void updateUiForMediaAction(@CameraConfiguration.MediaAction int mediaAction) {

}
 
开发者ID:MartinRGB,项目名称:android_camera_experiment,代码行数:5,代码来源:BaseSandriosActivity.java

示例7: updateUiForMediaAction

import com.sandrios.sandriosCamera.internal.configuration.CameraConfiguration; //导入方法依赖的package包/类
void updateUiForMediaAction(@CameraConfiguration.MediaAction int mediaAction); 
开发者ID:MartinRGB,项目名称:android_camera_experiment,代码行数:2,代码来源:CameraView.java


注:本文中的com.sandrios.sandriosCamera.internal.configuration.CameraConfiguration.MediaAction方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。