Browse Source

Bug Fix: thumb is null

Bug Fix: Floating Button in upload Land
tags/release-v2
Schoumi 4 years ago
parent
commit
15564d1b49
2 changed files with 2 additions and 10 deletions
  1. +2
    -1
      app/src/main/java/fr/mobdev/goblim/NetworkManager.java
  2. +0
    -9
      app/src/main/res/layout-land/upload.xml

+ 2
- 1
app/src/main/java/fr/mobdev/goblim/NetworkManager.java View File

@@ -216,7 +216,8 @@ public class NetworkManager {
String token = msg.getString("token");
String thumb = msg.getString("thumb");
//get thumbnail and transform it to useful data
thumb = thumb.substring(thumb.indexOf(","));
if(thumb != null && thumb.contains(","))
thumb = thumb.substring(thumb.indexOf(","));
byte[] thumbData = Base64.decode(thumb, Base64.DEFAULT);
System.out.println("Data is not null? " + thumbData.length);
imgOutput = new Img(0, siteUrl, hashOutput, realHashOutput, Calendar.getInstance(), nbDays, thumbData,token);


+ 0
- 9
app/src/main/res/layout-land/upload.xml View File

@@ -110,13 +110,4 @@

</RelativeLayout>

<android.support.design.widget.FloatingActionButton
android:id="@+id/new_image_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="16dp"
android:src="@android:drawable/stat_sys_upload_done"
/>

</android.support.design.widget.CoordinatorLayout>

Loading…
Cancel
Save