question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to implemention PhotoEditor?

See original GitHub issue

Image of Yaktocat

I have some difficulty understanding, why does not show me anything? What have I missed?

I add gradle implementation 'ja.burhanrashid52:photoeditor:0.3.3'

layout.xml

<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/black"
tools:context=".MainActivity">

<ja.burhanrashid52.photoeditor.PhotoEditorView
    android:id="@+id/photoEditorView"
    android:layout_width="wrap_content"
    android:layout_height="384dp"
    app:photo_src="@drawable/ic_stat_name" />

</android.support.constraint.ConstraintLayout>

MainActivity.java:

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

        PhotoEditorView mPhotoEditorView = findViewById(R.id.photoEditorView);
        mPhotoEditorView.getSource().setImageResource(R.drawable.ic_stat_name);

        Typeface mTextRobotoTf = ResourcesCompat.getFont(this, R.font.roboto_medium);
        Typeface mEmojiTypeFace = Typeface.createFromAsset(getAssets(), "fonts/emojione-android.ttf");
        PhotoEditor mPhotoEditor = new PhotoEditor.Builder(this, mPhotoEditorView)
                .setPinchTextScalable(true)
                .setDefaultTextTypeface(mTextRobotoTf)
                .setDefaultEmojiTypeface(mEmojiTypeFace)
                .build();
    }

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
kkmcommented, Nov 13, 2018

Do I have to do everything XML or just one by one?

1reaction
kateilecommented, Nov 11, 2018

I have not figured out how to make it work till now. Lets assume I want similar Layout of the editor like the one with Ned Stark. So how my xml need to look like? Like this or this. Is there any sample app?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Photo Editor Project Implementation (Helpful suggestions)
Photo Editor Project Implementation (Helpful suggestions) · Calculate its position in the original image using an appropriate scale and offset. · Use the...
Read more >
Full Guide on How to Make a Photo Editing App - Cleveroad
How to Make a Photo Editing App · Step 1. Research the marker and look through your competitors' solutions. · Step 2. Hire...
Read more >
Photo Editing App Development [Main steps] - Yellow Systems
How to make your own photo editing app? ... Creating a new photo editor isn't an easy task to complete. It consists of...
Read more >
How to Make Your Own Photo Editing App like PicsArt
‍ Photo Editing Block · # 1: Upload a photo · # 2: Basic photo editing · # 3: Crop, resize, rotate ✂️...
Read more >
Photo Editor - Code Samples - Microsoft Learn
Photo Editor shows you how to retrieve photos from the Pictures library, and then edit the selected image with assorted photo effects. In...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found