mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 12:53:55 +01:00
- Information by upload fields
- Fixed conflicts
This commit is contained in:
parent
05bdfb588e
commit
b32320b344
2 changed files with 25 additions and 33 deletions
|
|
@ -12,7 +12,6 @@ import android.support.v4.app.Fragment;
|
|||
import android.support.v7.app.AlertDialog;
|
||||
import android.text.Editable;
|
||||
import android.text.TextWatcher;
|
||||
import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
|
|
@ -25,10 +24,8 @@ import android.widget.AdapterView;
|
|||
import android.widget.ArrayAdapter;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.Spinner;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
|
|
@ -207,42 +204,37 @@ public class SingleUploadFragment extends Fragment {
|
|||
|
||||
/**
|
||||
* Copied from https://stackoverflow.com/a/26269435/8065933
|
||||
* @param view
|
||||
* @param motionEvent
|
||||
* @return
|
||||
*/
|
||||
@OnTouch(R.id.titleEdit) boolean titleInfo(View view, MotionEvent motionEvent){
|
||||
@OnTouch
|
||||
(R.id.titleEdit) boolean titleInfo(View view, MotionEvent motionEvent) {
|
||||
//Should replace right with end to support different right-to-left languages as well
|
||||
final int value = titleEdit.getRight() - titleEdit.getCompoundDrawables()[2].getBounds().width();
|
||||
|
||||
final int DRAWABLE_RIGHT = 2;
|
||||
if (motionEvent.getAction() == motionEvent.ACTION_UP && motionEvent.getRawX() >= value) {
|
||||
|
||||
if(motionEvent.getAction() == MotionEvent.ACTION_UP) {
|
||||
if(motionEvent.getRawX() >= (titleEdit.getRight() - titleEdit.getCompoundDrawables()[DRAWABLE_RIGHT].getBounds().width())) {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(getContext());
|
||||
builder.setTitle(R.string.media_detail_title);
|
||||
builder.setMessage(R.string.title_info);
|
||||
builder.setCancelable(true);
|
||||
builder.setNeutralButton(android.R.string.ok,
|
||||
new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
dialog.cancel();
|
||||
}
|
||||
});
|
||||
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(getContext());
|
||||
builder.setTitle(R.string.media_detail_title);
|
||||
builder.setMessage(R.string.title_info);
|
||||
builder.setCancelable(true);
|
||||
builder.setNeutralButton(android.R.string.ok,
|
||||
new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
dialog.cancel();
|
||||
}
|
||||
});
|
||||
|
||||
AlertDialog alert = builder.create();
|
||||
alert.show();
|
||||
return true;
|
||||
}
|
||||
AlertDialog alert = builder.create();
|
||||
alert.show();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@OnTouch(R.id.descEdit) boolean descriptionInfo(View view, MotionEvent motionEvent){
|
||||
@OnTouch
|
||||
(R.id.descEdit) boolean descriptionInfo(View view, MotionEvent motionEvent) {
|
||||
final int value = descEdit.getRight() - descEdit.getCompoundDrawables()[2].getBounds().width();
|
||||
|
||||
final int DRAWABLE_RIGHT = 2;
|
||||
|
||||
if(motionEvent.getAction() == MotionEvent.ACTION_UP) {
|
||||
if(motionEvent.getRawX() >= (titleEdit.getRight() - titleEdit.getCompoundDrawables()[DRAWABLE_RIGHT].getBounds().width())) {
|
||||
if (motionEvent.getAction() == motionEvent.ACTION_UP && motionEvent.getRawX() >= value) {
|
||||
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(getContext());
|
||||
builder.setTitle(R.string.media_detail_description);
|
||||
|
|
@ -258,7 +250,7 @@ public class SingleUploadFragment extends Fragment {
|
|||
AlertDialog alert = builder.create();
|
||||
alert.show();
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -203,8 +203,8 @@ Tap this message (or hit back) to skip this step.</string>
|
|||
<string name="no_description_found">no description found</string>
|
||||
<string name="nearby_info_menu_commons_article">Commons file page</string>
|
||||
<string name="nearby_info_menu_wikidata_article">Wikidata item</string>
|
||||
<string name="error_while_cache">Error while caching pictures</string>
|
||||
<string name="title_info">A unique descriptive title for the file, which will serve as a filename. You may use plain language with spaces. Do not include the file extension</string>
|
||||
<string name="error_while_cache">Error while caching pictures</string>
|
||||
<string name="title_info">A unique descriptive title for the file, which will serve as a filename. You may use plain language with spaces. Do not include the file extension</string>
|
||||
<string name="description_info">Please describe the media as much as possible: Where was it taken? What does it show? What is the context? Please describe the objects or persons. Reveal information that can not be easily guessed, for instance the time of day if it is a landscape. If the media shows something unusual, please explain what makes it unusual.</string>
|
||||
|
||||
</resources>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue