Merge branch 'niels-profile' into 'master'
Niels profile See merge request !21
This commit was merged in pull request #21.
This commit is contained in:
@@ -16,12 +16,13 @@ import android.view.View;
|
||||
import com.google.firebase.auth.FirebaseAuth;
|
||||
|
||||
import nl.myhyvesbookplus.tagram.controller.DownloadClass;
|
||||
import nl.myhyvesbookplus.tagram.controller.PostUploader;
|
||||
import nl.myhyvesbookplus.tagram.controller.ProfilePictureUploader;
|
||||
|
||||
public class MainActivity extends AppCompatActivity implements
|
||||
CameraFragment.OnFragmentInteractionListener,
|
||||
ProfilePictureUploader.ProfilePictureUpdatedListener,
|
||||
DownloadClass.PostDownloadListener {
|
||||
DownloadClass.PostDownloadListener, PostUploader.PostUploadListener {
|
||||
final static private String TAG = "MainScreen";
|
||||
|
||||
FirebaseAuth mAuth;
|
||||
@@ -126,4 +127,9 @@ public class MainActivity extends AppCompatActivity implements
|
||||
((TimelineFragment) frag).startList();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void PostUploadComplete(Boolean success) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ public class PicturePreview extends SurfaceView implements SurfaceHolder.Callbac
|
||||
|
||||
public PicturePreview(Context context, Bitmap bmp) {
|
||||
super(context);
|
||||
picture = Bitmap.createScaledBitmap(bmp, 1920, 1440, false);
|
||||
picture = Bitmap.createScaledBitmap(bmp, bmp.getWidth() / 2, bmp.getHeight() / 2, false);
|
||||
// picture = Bitmap.createBitmap(bmp);
|
||||
setWillNotDraw(false);
|
||||
}
|
||||
@@ -52,8 +52,8 @@ public class PicturePreview extends SurfaceView implements SurfaceHolder.Callbac
|
||||
break;
|
||||
case FILTER_BW:
|
||||
Canvas bw = new Canvas();
|
||||
filterPicture = Bitmap.createBitmap(1920, 1440, null);
|
||||
// filterPicture = Bitmap.createBitmap(picture.getWidth(), picture.getHeight(), null);
|
||||
// filterPicture = Bitmap.createBitmap(1920, 1440, null);
|
||||
filterPicture = Bitmap.createBitmap(picture.getWidth() / 2, picture.getHeight() / 2, Bitmap.Config.ARGB_8888);
|
||||
cm.setSaturation(0);
|
||||
filter = new ColorMatrixColorFilter(cm);
|
||||
paint.setColorFilter(filter);
|
||||
|
||||
@@ -75,8 +75,10 @@ public class ProfilePictureUploader extends UploadClass {
|
||||
public void onComplete(@NonNull Task<Void> task) {
|
||||
Log.d(TAG, "onComplete: Updated profile picture");
|
||||
mListener.ProfilePictureUpdated(true);
|
||||
if (oldPicture != null) {
|
||||
removeOldPicture();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -29,6 +29,6 @@
|
||||
<string name="upload">Uploaden</string>
|
||||
<string name="image_save_error">Foto opslaan mislukt. Zorg a.u.b. dat er genoeg ruimte op uw telefoon beschikbaar is.</string>
|
||||
<string name="update_profile_pic_error">Het updaten van de profielfoto is mislukt. Controleer uw internetverbinding.</string>
|
||||
<string name="upload_profile_pic">Profielfoto aan het uploaden...</string>
|
||||
<string name="upload_profile_pic">Profielfoto aan het uploaden…</string>
|
||||
<string name="niet_slecht">\"Niet slecht.\"s</string>
|
||||
</resources>
|
||||
@@ -23,7 +23,6 @@
|
||||
<string name="change_psw_button">Change Password</string>
|
||||
<string name="please_wait">Please Wait</string>
|
||||
<string name="niet_slecht">\"Niet slecht.\"s</string>
|
||||
|
||||
<string name="upload">Upload</string>
|
||||
<string name="save">Save</string>
|
||||
<string name="mail_successful">An e-mail was sent. Please follow its instructions.</string>
|
||||
|
||||
Reference in New Issue
Block a user