• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java EasyImage类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中pl.aprilapps.easyphotopicker.EasyImage的典型用法代码示例。如果您正苦于以下问题:Java EasyImage类的具体用法?Java EasyImage怎么用?Java EasyImage使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



EasyImage类属于pl.aprilapps.easyphotopicker包,在下文中一共展示了EasyImage类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: selectImage

import pl.aprilapps.easyphotopicker.EasyImage; //导入依赖的package包/类
@DebugLog
@OnClick(R.id.backdrop)
void selectImage() {

    int permissionCheck = ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE);
    if (permissionCheck != PackageManager.PERMISSION_GRANTED) {
        Nammu.askForPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE, new PermissionCallback() {

            @DebugLog
            @Override
            public void permissionGranted() {
                EasyImage.openGallery(NameActivity.this, 0);
                //Nothing, this sample saves to Public gallery so it needs permission
            }

            @DebugLog
            @Override
            public void permissionRefused() {
               // finish();
            }
        });
    }
    else {
        EasyImage.openGallery(NameActivity.this, 0);
    }
}
 
开发者ID:BackPackerDz,项目名称:PotRoom,代码行数:27,代码来源:NameActivity.java


示例2: initializeDrawer

import pl.aprilapps.easyphotopicker.EasyImage; //导入依赖的package包/类
private void initializeDrawer() {
    // Set 'group' checked & select
    navigationView.getMenu().getItem(0).setChecked(true);
    MenuItem firstMenuItem = navigationView.getMenu().getItem(0);
    selectMenuItem(firstMenuItem);

    navigationView.setNavigationItemSelectedListener(this);

    userImage.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            PhotoFixer.context = getApplicationContext();
            EasyImage.openChooserWithGallery(MainActivity.this, "Foto kiezen", 0);
        }
    });
}
 
开发者ID:a-deda,项目名称:share-location,代码行数:17,代码来源:MainActivity.java


示例3: onCreate

import pl.aprilapps.easyphotopicker.EasyImage; //导入依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();
    CustomActivityOnCrash.install(this);
    EventBus.getDefault().register(this);
    EasyImage.configuration(this)
            .saveInRootPicturesDirectory()
            .setImagesFolderName(getString(R.string.app_name));
    Nammu.init(this);
    Paper.init(this);
    Typekit.getInstance()
            .addNormal(Typekit.createFromAsset(this, "fonts/LatoLatin-Regular.ttf"))
            .addBold(Typekit.createFromAsset(this, "fonts/LatoLatin-Bold.ttf"))
            .addItalic(Typekit.createFromAsset(this, "fonts/LatoLatin-Italic.ttf"))
            .addBoldItalic(Typekit.createFromAsset(this, "fonts/LatoLatin-BoldItalic.ttf"))
            .addCustom1(Typekit.createFromAsset(this, "fonts/Geomanist-Regular.otf"))
            .addCustom2(Typekit.createFromAsset(this, "fonts/Handlee-Regular.ttf"));

    initFabric();
    initParse();
}
 
开发者ID:adrielcafe,项目名称:NMSAlphabetAndroidApp,代码行数:22,代码来源:App.java


示例4: openFullScreen

import pl.aprilapps.easyphotopicker.EasyImage; //导入依赖的package包/类
@OnClick(R.id.imageViewIngredients)
public void openFullScreen(View v) {
    if (mUrlImage != null) {
        Intent intent = new Intent(v.getContext(), FullScreenImage.class);
        Bundle bundle = new Bundle();
        bundle.putString("imageurl", mUrlImage);
        intent.putExtras(bundle);
        startActivity(intent);
    } else {
        // take a picture
        if (ContextCompat.checkSelfPermission(getActivity(), CAMERA) != PERMISSION_GRANTED) {
            ActivityCompat.requestPermissions(getActivity(), new String[]{CAMERA}, MY_PERMISSIONS_REQUEST_CAMERA);
        } else {
            EasyImage.openCamera(this, 0);
        }
    }
}
 
开发者ID:openfoodfacts,项目名称:openfoodfacts-androidapp,代码行数:18,代码来源:IngredientsProductFragment.java


示例5: onRequestPermissionsResult

import pl.aprilapps.easyphotopicker.EasyImage; //导入依赖的package包/类
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String permissions[], @NonNull int[] grantResults) {
    switch (requestCode) {
        case MY_PERMISSIONS_REQUEST_CAMERA: {
            if (grantResults.length <= 0 || grantResults[0] != PERMISSION_GRANTED) {
                new MaterialDialog.Builder(getActivity())
                        .title(R.string.permission_title)
                        .content(R.string.permission_denied)
                        .negativeText(R.string.txtNo)
                        .positiveText(R.string.txtYes)
                        .onPositive((dialog, which) -> {
                            Intent intent = new Intent();
                            intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
                            Uri uri = Uri.fromParts("package", getActivity().getPackageName(), null);
                            intent.setData(uri);
                            startActivity(intent);
                        })
                        .show();
            } else {
                EasyImage.openCamera(this, 0);
            }
        }
    }
}
 
开发者ID:openfoodfacts,项目名称:openfoodfacts-androidapp,代码行数:25,代码来源:IngredientsProductFragment.java


示例6: takeMorePicture

import pl.aprilapps.easyphotopicker.EasyImage; //导入依赖的package包/类
@OnClick(R.id.buttonMorePictures)
public void takeMorePicture() {
    if (ContextCompat.checkSelfPermission(getActivity(), CAMERA) != PERMISSION_GRANTED) {
        ActivityCompat.requestPermissions(getActivity(), new String[]{CAMERA}, MY_PERMISSIONS_REQUEST_CAMERA);
    } else {
        sendOther = true;
        EasyImage.openCamera(this, 0);
    }

    if (ContextCompat.checkSelfPermission(this.getContext(), READ_EXTERNAL_STORAGE) != PERMISSION_GRANTED
            && ContextCompat.checkSelfPermission(this.getContext(), WRITE_EXTERNAL_STORAGE) != PERMISSION_GRANTED) {
        if (ActivityCompat.shouldShowRequestPermissionRationale(this.getActivity(), READ_EXTERNAL_STORAGE)
                || ActivityCompat.shouldShowRequestPermissionRationale(this.getActivity(), WRITE_EXTERNAL_STORAGE)) {
            new MaterialDialog.Builder(this.getContext())
                    .title(R.string.action_about)
                    .content(R.string.permission_storage)
                    .neutralText(R.string.txtOk)
                    .onNeutral((dialog, which) -> ActivityCompat.requestPermissions(this.getActivity(), new String[]{READ_EXTERNAL_STORAGE, WRITE_EXTERNAL_STORAGE}, Utils.MY_PERMISSIONS_REQUEST_STORAGE))
                    .show();
        } else {
            ActivityCompat.requestPermissions(this.getActivity(), new String[]{READ_EXTERNAL_STORAGE, WRITE_EXTERNAL_STORAGE}, Utils.MY_PERMISSIONS_REQUEST_STORAGE);
        }
    }
}
 
开发者ID:openfoodfacts,项目名称:openfoodfacts-androidapp,代码行数:25,代码来源:SummaryProductFragment.java


示例7: openFullScreen

import pl.aprilapps.easyphotopicker.EasyImage; //导入依赖的package包/类
@OnClick(R.id.imageViewFront)
public void openFullScreen(View v) {
    if (mUrlImage != null) {
        Intent intent = new Intent(v.getContext(), FullScreenImage.class);
        Bundle bundle = new Bundle();
        bundle.putString("imageurl", mUrlImage);
        intent.putExtras(bundle);
        startActivity(intent);
    } else {
        // take a picture
        if (ContextCompat.checkSelfPermission(getActivity(), CAMERA) != PERMISSION_GRANTED) {
            ActivityCompat.requestPermissions(getActivity(), new String[]{CAMERA}, MY_PERMISSIONS_REQUEST_CAMERA);
        } else {
            sendOther = false;
            EasyImage.openCamera(this, 0);
        }
    }
}
 
开发者ID:openfoodfacts,项目名称:openfoodfacts-androidapp,代码行数:19,代码来源:SummaryProductFragment.java


示例8: onRequestPermissionsResult

import pl.aprilapps.easyphotopicker.EasyImage; //导入依赖的package包/类
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String permissions[], @NonNull int[] grantResults) {
    switch (requestCode) {
        case MY_PERMISSIONS_REQUEST_CAMERA: {
            if (grantResults.length <= 0 || grantResults[0] != PERMISSION_GRANTED) {
                new MaterialDialog.Builder(getActivity())
                        .title(R.string.permission_title)
                        .content(R.string.permission_denied)
                        .negativeText(R.string.txtNo)
                        .positiveText(R.string.txtYes)
                        .onPositive((dialog, which) -> {
                            Intent intent = new Intent();
                            intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
                            Uri uri = Uri.fromParts("package", getActivity().getPackageName(), null);
                            intent.setData(uri);
                            startActivity(intent);
                        })
                        .show();
            } else {
                sendOther = false;
                EasyImage.openCamera(this, 0);
            }
        }
    }
}
 
开发者ID:openfoodfacts,项目名称:openfoodfacts-androidapp,代码行数:26,代码来源:SummaryProductFragment.java


示例9: openFullScreen

import pl.aprilapps.easyphotopicker.EasyImage; //导入依赖的package包/类
@OnClick(R.id.imageViewNutrition)
public void openFullScreen(View v) {
    if (mUrlImage != null) {
        Intent intent = new Intent(v.getContext(), FullScreenImage.class);
        Bundle bundle = new Bundle();
        bundle.putString("imageurl", mUrlImage);
        intent.putExtras(bundle);
        startActivity(intent);
    } else {
        // take a picture
        if (ContextCompat.checkSelfPermission(getActivity(), CAMERA) != PERMISSION_GRANTED) {
            ActivityCompat.requestPermissions(getActivity(), new String[]{CAMERA}, MY_PERMISSIONS_REQUEST_CAMERA);
        } else {
            EasyImage.openCamera(this, 0);
        }
    }
}
 
开发者ID:openfoodfacts,项目名称:openfoodfacts-androidapp,代码行数:18,代码来源:NutritionInfoProductFragment.java


示例10: onActivityResult

import pl.aprilapps.easyphotopicker.EasyImage; //导入依赖的package包/类
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);

    EasyImage.handleActivityResult(requestCode, resultCode, data, this, new DefaultCallback() {
        @Override
        public void onImagesPicked(@NonNull List<File> imageFiles, EasyImage.ImageSource source, int type) {
            File userPhoto = imageFiles.get(0);

            String userId = FirebaseAuth.getInstance().getCurrentUser().getUid();
            FirebaseHelper.pushProfilePhoto(userId, userPhoto);
            userImage.setImageBitmap(BitmapFactory.decodeFile(userPhoto.getPath()));
        }
    });
}
 
开发者ID:a-deda,项目名称:share-location,代码行数:16,代码来源:MainActivity.java


示例11: startImageSelectionActivity

import pl.aprilapps.easyphotopicker.EasyImage; //导入依赖的package包/类
private void startImageSelectionActivity(ImageFieldEditor editor) {
    int editorIndex = editingFragment.getEditors().indexOf(editor);
    if (editorIndex > 255) {
        throw new PendingFeatureException("Image editor in a position greater than 255");
    }

    EasyImage.openChooserWithGallery(EntityEditingPerspective.this, null, editorIndex);
}
 
开发者ID:ZalemSoftware,项目名称:Ymir,代码行数:9,代码来源:EntityEditingPerspective.java


示例12: pickPicture

import pl.aprilapps.easyphotopicker.EasyImage; //导入依赖的package包/类
@OnClick(R.id.fab)
public void pickPicture(){
    if(Util.isConnected(getContext(), true)) {
        Util.askForPermissions(getActivity(), new PermissionCallback() {
            @Override
            public void permissionGranted() {
                EasyImage.openChooserWithGallery(TranslateFragment.this, getString(R.string.select_an_image), REQUEST_PICK_PICTURE);
            }
            @Override
            public void permissionRefused() {
            }
        });
    }
}
 
开发者ID:adrielcafe,项目名称:NMSAlphabetAndroidApp,代码行数:15,代码来源:TranslateFragment.java


示例13: onCreate

import pl.aprilapps.easyphotopicker.EasyImage; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	setContentView(R.layout.activity_make_art);

	imgContent = (ImageView) findViewById(R.id.imgContent);
	imgStyle = (ImageView) findViewById(R.id.imgStyle);
	toggleTransferStyle = (Switch) findViewById(R.id.toggleTransferStyle);

	txtNumIter = (EditText) findViewById(R.id.txtNumIter);
	sbarNumIter = (SeekBar) findViewById(R.id.sbarNumIters);

	txtNumIter.addTextChangedListener(new TextChangeWatcher() {
		@Override
		public void onTextChanged(CharSequence s, int start, int before, int count) {
			if (validInteger(s.toString())) {
				int lastPosition = txtNumIter.getSelectionStart();
				sbarNumIter.setProgress(Integer.parseInt(s.toString()));
				txtNumIter.setSelection(lastPosition);
			}
		}
	});

	setTextNumIter(1);

	sbarNumIter.setOnSeekBarChangeListener(new SeekBarProgressChangeListener() {
		@Override
		public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
			setTextNumIter(progress);
		}
	});

	btnSendCommand = (Button) findViewById(R.id.btnSendCommand);
	btnSendCommand.setVisibility(View.INVISIBLE);

	EasyImage.configuration(this).setImagesFolderName("NACameraCache").saveInRootPicturesDirectory();
}
 
开发者ID:tejashah88,项目名称:Neural-Art-Client,代码行数:38,代码来源:MakeArtActivity.java


示例14: launchMainActivity

import pl.aprilapps.easyphotopicker.EasyImage; //导入依赖的package包/类
private void launchMainActivity() {
    EasyImage.configuration(this)
            .setImagesFolderName("OFF_Images")
            .saveInAppExternalFilesDir()
            .setCopyExistingPicturesToPublicLocation(true);
    Intent mainIntent = new Intent(SplashActivity.this, MainActivity.class);
    startActivity(mainIntent);
    finish();
}
 
开发者ID:openfoodfacts,项目名称:openfoodfacts-androidapp,代码行数:10,代码来源:SplashActivity.java


示例15: onTakePhotoFrontClicked

import pl.aprilapps.easyphotopicker.EasyImage; //导入依赖的package包/类
@OnClick(R.id.buttonTakePictureFront)
protected void onTakePhotoFrontClicked() {
    if (ContextCompat.checkSelfPermission(this, CAMERA) != PERMISSION_GRANTED) {
        ActivityCompat.requestPermissions(this, new String[]{CAMERA}, MY_PERMISSIONS_REQUEST_CAMERA);
    } else {
        imageTaken = "front";
        EasyImage.openCamera(this, 0);
    }
}
 
开发者ID:openfoodfacts,项目名称:openfoodfacts-androidapp,代码行数:10,代码来源:SaveProductOfflineActivity.java


示例16: onTakePhotoIngredientsClicked

import pl.aprilapps.easyphotopicker.EasyImage; //导入依赖的package包/类
@OnClick(R.id.buttonTakePictureIngredients)
protected void onTakePhotoIngredientsClicked() {
    if (ContextCompat.checkSelfPermission(this, CAMERA) != PERMISSION_GRANTED) {
        ActivityCompat.requestPermissions(this, new String[]{CAMERA}, MY_PERMISSIONS_REQUEST_CAMERA);
    } else {
        imageTaken = "ingredients";
        EasyImage.openCamera(this, 0);
    }
}
 
开发者ID:openfoodfacts,项目名称:openfoodfacts-androidapp,代码行数:10,代码来源:SaveProductOfflineActivity.java


示例17: onTakePhotoNutritionClicked

import pl.aprilapps.easyphotopicker.EasyImage; //导入依赖的package包/类
@OnClick(R.id.buttonTakePictureNutrition)
protected void onTakePhotoNutritionClicked() {
    if (ContextCompat.checkSelfPermission(this, CAMERA) != PERMISSION_GRANTED) {
        ActivityCompat.requestPermissions(this, new String[]{CAMERA}, MY_PERMISSIONS_REQUEST_CAMERA);
    } else {
        imageTaken = "nutrition";
        EasyImage.openCamera(this, 0);
    }
}
 
开发者ID:openfoodfacts,项目名称:openfoodfacts-androidapp,代码行数:10,代码来源:SaveProductOfflineActivity.java


示例18: onImagePicked

import pl.aprilapps.easyphotopicker.EasyImage; //导入依赖的package包/类
@Override
    public void onImagePicked(File imageFile, EasyImage.ImageSource source, int type) {
        String path = imageFile.getAbsolutePath();
        Bitmap bitmap = BitmapFactory.decodeFile(path);

        this.ivCamera.setImageBitmap(bitmap);
        this.tvLatitude.setText(path);

//        File destFile = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES + File.separator + "New");
//        if (!destFile.exists()) {
//            int b = 5;
//        }
//        try {
//            moveFile(imageFile, destFile);
//        } catch (IOException e) {
//            e.printStackTrace();
//        }

        File outDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS);


        try {
            moveFile(imageFile, outDir);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
 
开发者ID:TelerikAcademy,项目名称:Mobile-Applications-for-Android,代码行数:28,代码来源:MainActivity.java


示例19: onDestroy

import pl.aprilapps.easyphotopicker.EasyImage; //导入依赖的package包/类
@Override
protected void onDestroy() {
    EasyImage.clearConfiguration(this);
    super.onDestroy();
}
 
开发者ID:BackPackerDz,项目名称:PotRoom,代码行数:6,代码来源:NameActivity.java


示例20: launchCamera

import pl.aprilapps.easyphotopicker.EasyImage; //导入依赖的package包/类
public void launchCamera() {
	EasyImage.openCamera(MakeArtActivity.this, 88);
}
 
开发者ID:tejashah88,项目名称:Neural-Art-Client,代码行数:4,代码来源:MakeArtActivity.java



注:本文中的pl.aprilapps.easyphotopicker.EasyImage类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java SaveOptions类代码示例发布时间:2022-05-22
下一篇:
Java SecondaryIndexBuilder类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap