Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
briar
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
briar
briar
Commits
419f2d96
Verified
Commit
419f2d96
authored
6 years ago
by
Torsten Grote
Browse files
Options
Downloads
Patches
Plain Diff
[android] Show a toast when an image could not be attached
parent
d6c18db9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1004
Implement UX for sending image attachments
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
briar-android/src/main/java/org/briarproject/briar/android/view/TextAttachmentController.java
+5
-0
5 additions, 0 deletions
...rproject/briar/android/view/TextAttachmentController.java
briar-android/src/main/res/values/strings.xml
+1
-0
1 addition, 0 deletions
briar-android/src/main/res/values/strings.xml
with
6 additions
and
0 deletions
briar-android/src/main/java/org/briarproject/briar/android/view/TextAttachmentController.java
+
5
−
0
View file @
419f2d96
...
...
@@ -18,6 +18,7 @@ import android.view.ViewGroup;
import
android.view.ViewGroup.LayoutParams
;
import
android.view.WindowManager
;
import
android.widget.ImageView
;
import
android.widget.Toast
;
import
com.bumptech.glide.load.DataSource
;
import
com.bumptech.glide.load.engine.GlideException
;
...
...
@@ -44,6 +45,7 @@ import static android.support.v7.app.AppCompatDelegate.getDefaultNightMode;
import
static
android
.
view
.
View
.
GONE
;
import
static
android
.
view
.
View
.
INVISIBLE
;
import
static
android
.
view
.
View
.
VISIBLE
;
import
static
android
.
widget
.
Toast
.
LENGTH_LONG
;
import
static
com
.
bumptech
.
glide
.
load
.
engine
.
DiskCacheStrategy
.
NONE
;
import
static
com
.
bumptech
.
glide
.
load
.
resource
.
bitmap
.
DownsampleStrategy
.
FIT_CENTER
;
import
static
java
.
util
.
Collections
.
emptyList
;
...
...
@@ -153,6 +155,9 @@ class TextAttachmentController extends TextSendController {
Object
model
,
Target
<
Bitmap
>
target
,
boolean
isFirstResource
)
{
reset
();
Toast
.
makeText
(
imageView
.
getContext
(),
R
.
string
.
image_attach_error
,
LENGTH_LONG
)
.
show
();
return
false
;
}
...
...
This diff is collapsed.
Click to expand it.
briar-android/src/main/res/values/strings.xml
+
1
−
0
View file @
419f2d96
...
...
@@ -129,6 +129,7 @@
<string
name=
"message_hint"
>
Type message
</string>
<string
name=
"image_caption_hint"
>
Add a caption (optional)
</string>
<string
name=
"image_attach"
>
Attach image
</string>
<string
name=
"image_attach_error"
>
Could not attach image
</string>
<string
name=
"set_contact_alias"
>
Change contact name
</string>
<string
name=
"set_contact_alias_hint"
>
Contact name
</string>
<string
name=
"set_alias_button"
>
Change
</string>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment