Skip to content

Commit

Permalink
Update Image Color like primary.
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
vickyKDV committed Sep 20, 2020
1 parent b6b0f84 commit 97fff96
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 6 deletions.
6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions EasyImagePicker/src/main/res/drawable/imgeasycamera.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:width="55dp"
android:height="55dp"
android:width="80dp"
android:height="80dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal"
android:tint="@color/colorPrimary"
tools:ignore="VectorRaster">
<path
android:fillColor="@color/colorPrimary"
Expand Down
6 changes: 3 additions & 3 deletions EasyImagePicker/src/main/res/drawable/imgeasyimage.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:width="55dp"
android:height="55dp"
android:width="80dp"
android:height="80dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal"
android:tint="@color/colorPrimary"
tools:ignore="VectorRaster">
<path
android:fillColor="@color/colorPrimary"
Expand Down
37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,40 @@
...
implementation 'com.github.vickyKDV:EasyImagePicker:0.1'
}


How To Use

public class MainActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);



findViewById(R.id.button).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
ImagePickerActivity.showImagePickerOptions(MainActivity.this,2000,800,800);
}
});
}

@Override
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if(resultCode == RESULT_OK){
if(requestCode == 2000){
ImageView imageView = findViewById(R.id.imageView);
Uri uri = data.getParcelableExtra("path");
Log.d("RESULT", "onActivityResult: "+uri);
File fileImgProduk = new File(uri.getPath());
Bitmap bitmap = BitmapFactory.decodeFile(fileImgProduk.getAbsolutePath());

imageView.setImageBitmap(bitmap);
}
}
}
}

0 comments on commit 97fff96

Please # to comment.