Skip to content

bugfix/uploads #3012

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
4e1cbba
merged with master
ashishkumar468 Jun 9, 2019
aa86057
BugFix IllegalStateException
ashishkumar468 Jun 9, 2019
b7685d5
BugFix, clear selected categoris for previous upload session
ashishkumar468 Jun 9, 2019
c8985bd
Code Formatting in app/src/main/java/fr/free/nrw/commons/upload/Uploa…
ashishkumar468 Jun 9, 2019
bce2b78
Added class level JavaDoc UploadRemoteDataSource
ashishkumar468 Jun 9, 2019
1eb2bc6
Added class level JavaDoc for UploadRepository
ashishkumar468 Jun 9, 2019
196c27c
Added JavaDocs for ThumbnailsAdapter
ashishkumar468 Jun 9, 2019
f239425
Added JavaDocs for MediaLicensePresenter, CategoriesPresenter
ashishkumar468 Jun 9, 2019
2e33ef7
Removed null check on category query
ashishkumar468 Jun 9, 2019
9cde838
Attached image scale listener to upload media image
ashishkumar468 Jun 2, 2019
185b0e4
Bug fix, reduced the add description edit text clickable bound
ashishkumar468 May 29, 2019
27d768b
Added tooltip in Title in UploadMediaFragment
ashishkumar468 Jun 9, 2019
1c2eb07
BugFix recent categories
ashishkumar468 Jun 9, 2019
7d717ea
Updated test methods
ashishkumar468 Jun 9, 2019
28ed254
resolved merge conflictas
ashishkumar468 Jun 9, 2019
59e7c3a
Avoid memory leak, free the adpater in MediaLicenseFragment.onDestroy…
ashishkumar468 Jun 11, 2019
858d71d
Merge branch 'refactor_uploads' into bugfix/uploads
ashishkumar468 Jun 11, 2019
910cf86
BugFix Illegal State Exception in ViewpPagerAdapter
ashishkumar468 Jun 12, 2019
44b177e
Remove irrelevant comment
ashishkumar468 Jun 12, 2019
473cce5
Merge branch 'refactor_uploads' into bugfix/uploads
ashishkumar468 Jun 12, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added tooltip in Title in UploadMediaFragment
  • Loading branch information
ashishkumar468 committed Jun 9, 2019
commit 27d768bfa859cecd577ff90aea9fed553fc5595a
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
package fr.free.nrw.commons.upload.mediaDetails;

import android.content.Context;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.DisplayMetrics;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.EditText;
Expand Down Expand Up @@ -159,6 +162,33 @@ private void init() {
}

attachImageViewScaleChangeListener();

addEtTitleTouchListener();
}

/**
* Handles the drawable click listener for Edit Text
*/
private void addEtTitleTouchListener() {
etTitle.setOnTouchListener((v, event) -> {
//2 is for drawable right
float twelveDpInPixels = convertDpToPixel(12, getContext());
if (event.getAction() == MotionEvent.ACTION_UP && etTitle.getCompoundDrawables()[2].getBounds().contains((int)(etTitle.getWidth()-(event.getX()+twelveDpInPixels)),(int)(event.getY()-twelveDpInPixels))){
showInfoAlert(R.string.media_detail_title,R.string.title_info);
return true;
}
return false;
});
}

/**
* converts dp to pixel
* @param dp
* @param context
* @return
*/
private float convertDpToPixel(float dp, Context context) {
return dp * ((float) context.getResources().getDisplayMetrics().densityDpi / DisplayMetrics.DENSITY_DEFAULT);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
android:layout_height="wrap_content"
android:hint="@string/share_title_hint"
android:imeOptions="actionNext"
android:drawableEnd="@drawable/mapbox_info_icon_default"
android:inputType="text"
android:maxLines="1" />
</com.google.android.material.textfield.TextInputLayout>
Expand Down