diff --git a/app/build.gradle b/app/build.gradle
index af1c121..62ba2aa 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -21,8 +21,8 @@ android {
applicationId "com.margsapp.messenger"
minSdkVersion 21
targetSdkVersion 30
- versionCode 16
- versionName "2.4"
+ versionCode 18
+ versionName "2.5"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
@@ -30,7 +30,8 @@ android {
buildTypes {
release {
- minifyEnabled false
+ shrinkResources true
+ minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
@@ -43,15 +44,16 @@ android {
dependencies {
- implementation 'androidx.appcompat:appcompat:1.2.0'
+ implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.android.material:material:1.3.0'
implementation 'com.google.firebase:firebase-auth:21.0.1'
implementation 'com.google.firebase:firebase-database:20.0.0'
implementation 'com.android.support:multidex:1.0.3'
- implementation 'com.gjiazhe:springrecyclerview:1.0'
- implementation 'jp.wasabeef:recyclerview-animators:4.0.2'
+
+ implementation 'com.google.firebase:firebase-appcheck-debug:16.0.0-beta01'
+ implementation 'com.google.firebase:firebase-appcheck-safetynet:16.0.0-beta01'
implementation 'com.github.castorflex.smoothprogressbar:library:1.1.0'
@@ -66,7 +68,6 @@ dependencies {
implementation 'com.github.bumptech.glide:glide:4.12.0'
implementation 'com.google.firebase:firebase-storage:20.0.0'
- implementation 'com.h6ah4i.android.widget.advrecyclerview:advrecyclerview:1.0.0'
implementation 'com.google.android.material:material:1.3.0'
@@ -87,6 +88,8 @@ dependencies {
implementation 'com.airbnb.android:lottie:3.6.1'
+
+
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
implementation 'com.google.firebase:firebase-messaging:21.1.0'
@@ -98,7 +101,6 @@ dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.preference:preference-ktx:1.1.1'
- implementation 'com.chauthai.swipereveallayout:swipe-reveal-layout:1.4.1'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
@@ -106,6 +108,8 @@ dependencies {
implementation 'com.factor:bouncy:1.8'
implementation 'com.willowtreeapps:signinwithapplebutton:0.3'
+ implementation 'com.r0adkll:slidableactivity:2.1.0'
+
}
\ No newline at end of file
diff --git a/app/release/app-release.apk b/app/release/app-release.apk
new file mode 100644
index 0000000..a5da966
Binary files /dev/null and b/app/release/app-release.apk differ
diff --git a/app/release/output-metadata.json b/app/release/output-metadata.json
new file mode 100644
index 0000000..ea7b007
--- /dev/null
+++ b/app/release/output-metadata.json
@@ -0,0 +1,18 @@
+{
+ "version": 2,
+ "artifactType": {
+ "type": "APK",
+ "kind": "Directory"
+ },
+ "applicationId": "com.margsapp.messenger",
+ "variantName": "release",
+ "elements": [
+ {
+ "type": "SINGLE",
+ "filters": [],
+ "versionCode": 18,
+ "versionName": "2.5",
+ "outputFile": "app-release.apk"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 1afd295..1e3d530 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -13,7 +13,7 @@
tools:ignore="ScopedStorage" />
-
@@ -61,11 +60,13 @@
-
+
+
-
+
{
- holder.itemView.setBackgroundColor(mContext.getResources().getColor(R.color.onAdapClick));
- return false;
+ holder.itemView.setOnTouchListener(new View.OnTouchListener() {
+ @Override
+ public boolean onTouch(View v, MotionEvent event) {
+
+ if(event.getAction() == MotionEvent.ACTION_DOWN) {
+ holder.itemView.setBackgroundColor(mContext.getResources().getColor(R.color.onAdapClick));
+
+
+ }else {
+ holder.itemView.setBackgroundColor(mContext.getResources().getColor(R.color.background));
+
+ }
+
+ return false;
+ }
});
holder.itemView.setOnClickListener(v -> {
- holder.itemView.setBackgroundColor(mContext.getResources().getColor(R.color.background));
launch(groupid);
});
@@ -159,3 +171,4 @@ public ViewHolder(View view){
}
+
diff --git a/app/src/main/java/com/margsapp/messenger/Adapter/GroupInfoAdapter.java b/app/src/main/java/com/margsapp/messenger/Adapter/GroupInfoAdapter.java
index 7c684c2..90ed112 100644
--- a/app/src/main/java/com/margsapp/messenger/Adapter/GroupInfoAdapter.java
+++ b/app/src/main/java/com/margsapp/messenger/Adapter/GroupInfoAdapter.java
@@ -109,7 +109,7 @@ public boolean onTouch(View v, MotionEvent event) {
if(event.getAction()== MotionEvent.ACTION_DOWN){
holder.itemView.setBackgroundColor(mContext.getResources().getColor(R.color.onAdapClick));
- }else if(event.getAction()==MotionEvent.ACTION_UP){
+ }else {
holder.itemView.setBackgroundColor(mContext.getResources().getColor(R.color.background));
}
return false;
@@ -150,4 +150,6 @@ public ViewHolder(@NonNull View itemView) {
}
}
+
+
}
\ No newline at end of file
diff --git a/app/src/main/java/com/margsapp/messenger/Adapter/MessageAdapter.java b/app/src/main/java/com/margsapp/messenger/Adapter/MessageAdapter.java
index e7a5c2b..8fb336d 100644
--- a/app/src/main/java/com/margsapp/messenger/Adapter/MessageAdapter.java
+++ b/app/src/main/java/com/margsapp/messenger/Adapter/MessageAdapter.java
@@ -209,4 +209,6 @@ public ViewHolder(View view){
}
+
+
}
diff --git a/app/src/main/java/com/margsapp/messenger/Adapter/UserAdapter.java b/app/src/main/java/com/margsapp/messenger/Adapter/UserAdapter.java
index 652e93f..580c342 100644
--- a/app/src/main/java/com/margsapp/messenger/Adapter/UserAdapter.java
+++ b/app/src/main/java/com/margsapp/messenger/Adapter/UserAdapter.java
@@ -2,11 +2,10 @@
import android.annotation.SuppressLint;
import android.app.Activity;
-import android.app.ActivityOptions;
import android.content.Context;
import android.content.Intent;
-import android.util.Pair;
import android.view.LayoutInflater;
+import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
@@ -25,7 +24,6 @@
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.database.ValueEventListener;
-import com.margsapp.messenger.Main.MainActivity;
import com.margsapp.messenger.Main.MessageActivity;
import com.margsapp.messenger.Model.Chat;
import com.margsapp.messenger.Model.Chatlist;
@@ -36,8 +34,6 @@
import java.util.List;
-import de.hdodenhof.circleimageview.CircleImageView;
-
public class UserAdapter extends RecyclerView.Adapter {
private final Context mContext;
private final List mUsers;
@@ -52,14 +48,17 @@ public class UserAdapter extends RecyclerView.Adapter {
String date_time;
String UnreadMessage;
+ Activity activity;
+
- public UserAdapter(Context mContext, List mUsers, boolean isChat, boolean isAdd, boolean isBlock) {
+ public UserAdapter(Context mContext, List mUsers, boolean isChat, boolean isAdd, boolean isBlock,Activity activity) {
this.mUsers = mUsers;
this.mContext = mContext;
this.isChat = isChat;
this.isAdd = isAdd;
this.isBlock = isBlock;
+ this.activity = activity;
}
@@ -117,7 +116,18 @@ public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
holder.UsernameText.setText(user.getUsername());
- holder.dt.setText(user.getDt());
+
+ if (user.getStatus().equals("online")) {
+ holder.img_on.setVisibility(View.VISIBLE);
+ holder.img_off.setVisibility(View.GONE);
+ } else {
+ holder.img_off.setVisibility(View.VISIBLE);
+ holder.img_on.setVisibility(View.GONE);
+ }
+
+ lastmessage(user.getId(), holder.last_msg,holder.date_lastmsg);
+ UnreadMessage(user.getId(), holder.unread);
+
if (user.getImageUrl().equals("default")) {
holder.profile.setImageResource(R.drawable.user);
@@ -134,26 +144,18 @@ public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
}
if (isChat) {
- if (user.getStatus().equals("online")) {
- holder.img_on.setVisibility(View.VISIBLE);
- holder.img_off.setVisibility(View.GONE);
- } else {
- holder.img_off.setVisibility(View.VISIBLE);
- holder.img_on.setVisibility(View.GONE);
- }
- holder.date_lastmsg.setVisibility(View.VISIBLE);
- lastmessage(user.getId(), holder.last_msg,holder.date_lastmsg);
- UnreadMessage(user.getId(), holder.unread);
+
holder.dt.setVisibility(View.GONE);
}
if (!isChat) {
-
+ holder.dt.setText(user.getDt());
holder.last_msg.setVisibility(View.GONE);
holder.img_on.setVisibility(View.GONE);
holder.img_off.setVisibility(View.VISIBLE);
holder.date_lastmsg.setVisibility(View.GONE);
holder.dt.setVisibility(View.VISIBLE);
+
}
holder.UnBlock_btn.setOnClickListener(v -> {
@@ -172,8 +174,23 @@ public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
});
+ holder.itemView.setOnTouchListener(new View.OnTouchListener() {
+ @SuppressLint("ClickableViewAccessibility")
+ @Override
+ public boolean onTouch(View v, MotionEvent event) {
+ if(event.getAction() == MotionEvent.ACTION_DOWN) {
+ holder.itemView.setBackgroundColor(mContext.getResources().getColor(R.color.onAdapClick));
+
+ }else {
+ holder.itemView.setBackgroundColor(mContext.getResources().getColor(R.color.background));
+
+ }
+ return false;
+ }
+ });
+
holder.itemView.setOnClickListener(v -> {
- holder.itemView.setBackgroundColor(mContext.getResources().getColor(R.color.onAdapClick));
+
String userid = user.getId();
OnMessage(userid);
});
@@ -323,15 +340,20 @@ public void onDataChange(@NonNull DataSnapshot snapshot) {
}
else {
+
Intent intent = new Intent(mContext, MessageActivity.class);
+
intent.putExtra("userid", userid);
mContext.startActivity(intent);
+ activity.overridePendingTransition(R.anim.activity_slide_in_left,R.anim.activity_slider_out_right);
+
}
}else if(!snapshot.exists()){
Intent intent = new Intent(mContext, MessageActivity.class);
intent.putExtra("userid", userid);
mContext.startActivity(intent);
+ activity.overridePendingTransition(R.anim.activity_slide_in_left,R.anim.activity_slider_out_right);
}
@@ -353,4 +375,6 @@ public void onCancelled(@NonNull DatabaseError error) {
}
+
+
}
\ No newline at end of file
diff --git a/app/src/main/java/com/margsapp/messenger/AppDetails/Terms_ConditionsActivity.java b/app/src/main/java/com/margsapp/messenger/AppDetails/Terms_ConditionsActivity.java
index 9d8ac1e..82cadb7 100644
--- a/app/src/main/java/com/margsapp/messenger/AppDetails/Terms_ConditionsActivity.java
+++ b/app/src/main/java/com/margsapp/messenger/AppDetails/Terms_ConditionsActivity.java
@@ -66,6 +66,7 @@ public void onAdFailedToLoad(@NonNull LoadAdError loadAdError) {
+
agree.setOnClickListener(v -> {
Intent intent = new Intent(Terms_ConditionsActivity.this, privacyActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK);
@@ -80,4 +81,5 @@ public void onAdFailedToLoad(@NonNull LoadAdError loadAdError) {
finish();
});
}
+
}
\ No newline at end of file
diff --git a/app/src/main/java/com/margsapp/messenger/Authentication/PhoneAuthActivity.java b/app/src/main/java/com/margsapp/messenger/Authentication/PhoneAuthActivity.java
index af8da72..b27bfaa 100644
--- a/app/src/main/java/com/margsapp/messenger/Authentication/PhoneAuthActivity.java
+++ b/app/src/main/java/com/margsapp/messenger/Authentication/PhoneAuthActivity.java
@@ -15,6 +15,7 @@
public class PhoneAuthActivity extends AppCompatActivity {
EditText phoneInputLayout;
+
CountryCodePicker countryCodePicker;
@Override
@@ -23,6 +24,7 @@ protected void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.activity_phone_auth);
phoneInputLayout = findViewById(R.id.phone_number);
+
countryCodePicker = findViewById(R.id.country_code_picker);
}
diff --git a/app/src/main/java/com/margsapp/messenger/Authentication/Phone_setupActivity.java b/app/src/main/java/com/margsapp/messenger/Authentication/Phone_setupActivity.java
index 40017a8..f9e269e 100644
--- a/app/src/main/java/com/margsapp/messenger/Authentication/Phone_setupActivity.java
+++ b/app/src/main/java/com/margsapp/messenger/Authentication/Phone_setupActivity.java
@@ -192,7 +192,6 @@ public void onComplete(@NonNull Task task) {
}
}
}
-
private String getFileExtension(Uri uri){
ContentResolver contentResolver = Phone_setupActivity.this.getContentResolver();
MimeTypeMap mimeTypeMap = MimeTypeMap.getSingleton();
diff --git a/app/src/main/java/com/margsapp/messenger/Authentication/SplashActivity.java b/app/src/main/java/com/margsapp/messenger/Authentication/SplashActivity.java
index cb65706..c1765da 100644
--- a/app/src/main/java/com/margsapp/messenger/Authentication/SplashActivity.java
+++ b/app/src/main/java/com/margsapp/messenger/Authentication/SplashActivity.java
@@ -43,7 +43,6 @@ protected void onCreate(Bundle savedInstanceState) {
overridePendingTransition(R.anim.fade_in,R.anim.fade_out);
setContentView(R.layout.activity_splash);
-
// Using handler with postDelayed called runnable run method
new Handler().postDelayed(() -> {
@@ -68,7 +67,4 @@ private void setLocale(String lang) {
getBaseContext().getResources().updateConfiguration(config, getBaseContext().getResources().getDisplayMetrics());
}
-
-
-
}
\ No newline at end of file
diff --git a/app/src/main/java/com/margsapp/messenger/Authentication/StartActivity.java b/app/src/main/java/com/margsapp/messenger/Authentication/StartActivity.java
index 02070ba..eb64902 100644
--- a/app/src/main/java/com/margsapp/messenger/Authentication/StartActivity.java
+++ b/app/src/main/java/com/margsapp/messenger/Authentication/StartActivity.java
@@ -34,6 +34,10 @@
import com.google.android.gms.common.SignInButton;
import com.google.android.gms.common.api.ApiException;
import com.google.android.gms.tasks.Task;
+import com.google.firebase.FirebaseApp;
+import com.google.firebase.appcheck.FirebaseAppCheck;
+import com.google.firebase.appcheck.debug.DebugAppCheckProviderFactory;
+import com.google.firebase.appcheck.safetynet.SafetyNetAppCheckProviderFactory;
import com.google.firebase.auth.AuthCredential;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.FirebaseUser;
@@ -85,6 +89,15 @@ protected void onStart() {
String language = preferences.getString("lang","");
setLocale(language);
+ FirebaseApp.initializeApp(this);
+ FirebaseAppCheck firebaseAppCheck = FirebaseAppCheck.getInstance();
+ firebaseAppCheck.installAppCheckProviderFactory(
+ SafetyNetAppCheckProviderFactory.getInstance());
+ firebaseAppCheck.installAppCheckProviderFactory(
+ DebugAppCheckProviderFactory.getInstance());
+
+
+
firebaseUser = FirebaseAuth.getInstance().getCurrentUser();
@@ -212,7 +225,6 @@ public void onClick(View view) {
-
MobileAds.initialize(this, initializationStatus -> {
});
AdRequest adRequest = new AdRequest.Builder().build();
@@ -245,7 +257,6 @@ public void onAdFailedToLoad(@NonNull LoadAdError loadAdError) {
firebaseAuth = FirebaseAuth.getInstance();
-
GoogleSignInOptions googleSignInOptions = new GoogleSignInOptions.Builder(
GoogleSignInOptions.DEFAULT_SIGN_IN
).requestIdToken("103512201849-u02rekekhtn7r4nuj8uqpku32qd57bh3.apps.googleusercontent.com")
@@ -284,7 +295,6 @@ protected void onActivityResult(int requestCode, int resultCode, @Nullable Inten
if(googleSignInAccount != null){
AuthCredential authCredential = GoogleAuthProvider.getCredential(googleSignInAccount.getIdToken(), null);
-
firebaseAuth.signInWithCredential(authCredential)
.addOnCompleteListener(task -> {
if(task.isSuccessful()){
diff --git a/app/src/main/java/com/margsapp/messenger/Authentication/VerifyOTP.java b/app/src/main/java/com/margsapp/messenger/Authentication/VerifyOTP.java
index 89f85a2..3b6a4a4 100644
--- a/app/src/main/java/com/margsapp/messenger/Authentication/VerifyOTP.java
+++ b/app/src/main/java/com/margsapp/messenger/Authentication/VerifyOTP.java
@@ -181,7 +181,6 @@ public void onCancelled(@NonNull DatabaseError error) {
}
-
public void callNextScreenFromOTP(View view){
String code = Objects.requireNonNull(pinFromUser.getText()).toString();
if(!code.isEmpty()){
diff --git a/app/src/main/java/com/margsapp/messenger/Authentication/setupActivity.java b/app/src/main/java/com/margsapp/messenger/Authentication/setupActivity.java
deleted file mode 100644
index 9ef26eb..0000000
--- a/app/src/main/java/com/margsapp/messenger/Authentication/setupActivity.java
+++ /dev/null
@@ -1,270 +0,0 @@
-package com.margsapp.messenger.Authentication;
-
-import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
-import androidx.appcompat.app.AppCompatActivity;
-import androidx.appcompat.widget.AppCompatButton;
-import androidx.appcompat.widget.Toolbar;
-
-import android.annotation.SuppressLint;
-import android.app.ProgressDialog;
-import android.content.ContentResolver;
-import android.content.Intent;
-import android.net.Uri;
-import android.os.Bundle;
-import android.util.Log;
-import android.view.Menu;
-import android.view.MenuItem;
-import android.webkit.MimeTypeMap;
-import android.widget.EditText;
-import android.widget.Toast;
-
-import com.bumptech.glide.Glide;
-import com.google.android.gms.ads.AdRequest;
-import com.google.android.gms.ads.LoadAdError;
-import com.google.android.gms.ads.MobileAds;
-import com.google.android.gms.ads.interstitial.InterstitialAd;
-import com.google.android.gms.ads.interstitial.InterstitialAdLoadCallback;
-import com.google.android.gms.tasks.Continuation;
-import com.google.android.gms.tasks.OnCompleteListener;
-import com.google.android.gms.tasks.Task;
-import com.google.firebase.auth.FirebaseAuth;
-import com.google.firebase.auth.FirebaseUser;
-import com.google.firebase.database.DataSnapshot;
-import com.google.firebase.database.DatabaseError;
-import com.google.firebase.database.DatabaseReference;
-import com.google.firebase.database.FirebaseDatabase;
-import com.google.firebase.database.ValueEventListener;
-import com.google.firebase.storage.FirebaseStorage;
-import com.google.firebase.storage.StorageReference;
-import com.google.firebase.storage.StorageTask;
-import com.google.firebase.storage.UploadTask;
-import com.margsapp.messenger.Main.MainActivity;
-import com.margsapp.messenger.Model.User;
-import com.margsapp.messenger.R;
-import com.theartofdev.edmodo.cropper.CropImage;
-import com.theartofdev.edmodo.cropper.CropImageView;
-
-import java.util.HashMap;
-import java.util.Objects;
-
-import de.hdodenhof.circleimageview.CircleImageView;
-
-public class setupActivity extends AppCompatActivity {
-
- private static final String TAG = "setupActivity" ;
- private InterstitialAd mInterstitialAd;
-
- FirebaseUser firebaseUser;
- DatabaseReference reference;
-
- EditText statusEditText;
- AppCompatButton saveButton;
- CircleImageView profileImageView;
-
- private ProgressDialog loadingBar;
-
- StorageReference storageReference;
- private static final int GALLERY_PICK = 1;
-
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_setup);
-
- profileImageView = findViewById(R.id.DP);
- saveButton = findViewById(R.id.save);
- statusEditText = findViewById(R.id.dt);
- Toolbar toolbar = findViewById(R.id.toolbar);
- setSupportActionBar(toolbar);
- Objects.requireNonNull(getSupportActionBar()).setTitle("Setup Profile");
- getSupportActionBar().setDisplayHomeAsUpEnabled(false);
-
- MobileAds.initialize(this, initializationStatus -> {
- });
- AdRequest adRequest = new AdRequest.Builder().build();
-
- InterstitialAd.load(this,"ca-app-pub-5615682506938042/8153781406", adRequest, new InterstitialAdLoadCallback() {
- @Override
- public void onAdLoaded(@NonNull InterstitialAd interstitialAd) {
- // The mInterstitialAd reference will be null until
- // an ad is loaded.
- mInterstitialAd = interstitialAd;
- Log.i(TAG, "onAdLoaded");
- }
-
- @Override
- public void onAdFailedToLoad(@NonNull LoadAdError loadAdError) {
- // Handle the error
- Log.i(TAG, loadAdError.getMessage());
- mInterstitialAd = null;
- }
- });
-
- saveButton.setOnClickListener(v -> {
- String txt_status = statusEditText.getText().toString();
- if(txt_status.equals("")){
- save("Hey there am using Messenger");
- }else {
- save(txt_status);
- }
- });
- firebaseUser = FirebaseAuth.getInstance().getCurrentUser();
- storageReference = FirebaseStorage.getInstance().getReference("ProfileImages");
-
-
-
- reference = FirebaseDatabase.getInstance().getReference("Users").child(firebaseUser.getUid());
- reference.addValueEventListener(new ValueEventListener() {
- @Override
- public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
- User user = dataSnapshot.getValue(User.class);
- assert user != null;
- if (user.getImageUrl().equals("default")) {
- profileImageView.setImageResource(R.drawable.clicky);
- } else {
- Glide.with((getApplicationContext())).load(user.getImageUrl()).into(profileImageView);
- }
- }
-
- @Override
- public void onCancelled(@NonNull DatabaseError error) {
-
- }
- });
-
- loadingBar = new ProgressDialog(this);
-
- profileImageView.setOnClickListener(v -> openImage());
- }
-
- private void save(String txt_status) {
-
-
-
-
- assert firebaseUser != null;
- String userid = firebaseUser.getUid();
-
- reference = FirebaseDatabase.getInstance().getReference("Users").child(userid);
- reference.addValueEventListener(new ValueEventListener() {
- @Override
- public void onDataChange(@NonNull DataSnapshot snapshot) {
-
- HashMap hash = new HashMap<>();
- hash.put("DT", txt_status);
- reference.updateChildren(hash);
-
- }
-
-
- @Override
- public void onCancelled(@NonNull DatabaseError error) {
-
- }
- });
- }
-
- @Override
- public boolean onCreateOptionsMenu(Menu menu) {
- getMenuInflater().inflate(R.menu.menuinstatus, menu);
- return true;
- }
-
- @SuppressLint("NonConstantResourceId")
- @Override
- public boolean onOptionsItemSelected(@NonNull MenuItem item) {
-
- if (item.getItemId() == R.id.done) {
- startActivity(new Intent(setupActivity.this, MainActivity.class).setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP));
-
- if (mInterstitialAd != null) {
- mInterstitialAd.show(setupActivity.this);
- } else {
- Log.d("TAG", "The interstitial ad wasn't ready yet.");
- }
-
- return true;
- }
-
- return false;
- }
-
- private void openImage() {
-
- Intent galleryIntent = new Intent();
- galleryIntent.setType("image/*");
- galleryIntent.setAction(Intent.ACTION_GET_CONTENT);
- startActivityForResult(galleryIntent, GALLERY_PICK);
-
- }
-
- @Override
- public void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
- super.onActivityResult(requestCode, resultCode, data);
-
-
- if (requestCode == GALLERY_PICK && resultCode == RESULT_OK && data != null) {
- Uri imageUri = data.getData();
- CropImage.activity(imageUri)
- .setGuidelines(CropImageView.Guidelines.ON)
- .setAspectRatio(1, 1)
- .start(this);
-
- }
-
- if (requestCode == CropImage.CROP_IMAGE_ACTIVITY_REQUEST_CODE) {
-
- CropImage.ActivityResult result = CropImage.getActivityResult(data);
-
- if (resultCode == RESULT_OK) {
- loadingBar.setTitle("Profile Image");
- loadingBar.setMessage("Please wait, while we update your profile picture...");
- loadingBar.show();
- loadingBar.setCanceledOnTouchOutside(false);
- assert result != null;
- Uri resultUri = result.getUri();
-
- StorageReference filepath = storageReference.child(System.currentTimeMillis()
- + "." + getFileExtension(resultUri));
-
- StorageTask uploadTask = filepath.putFile(resultUri);
- uploadTask.continueWithTask((Continuation>) task -> {
- if (!task.isSuccessful()) {
- throw task.getException();
- }
- return filepath.getDownloadUrl();
- }).addOnCompleteListener(new OnCompleteListener() {
- @Override
- public void onComplete(@NonNull Task task) {
- if (task.isSuccessful()) {
- Toast.makeText(setupActivity.this, "Image has been stored in our server", Toast.LENGTH_SHORT).show();
-
- Uri downloadUri = task.getResult();
- assert downloadUri != null;
- String mUri = downloadUri.toString();
-
-
- reference = FirebaseDatabase.getInstance().getReference("Users").child(firebaseUser.getUid());
- HashMap map = new HashMap<>();
- map.put("imageURL", mUri);
- reference.updateChildren(map);
-
- loadingBar.dismiss();
-
- }
- }
- });
- } else {
- Toast.makeText(this, "Profile Image update cancelled", Toast.LENGTH_SHORT).show();
- loadingBar.dismiss();
- }
- }
- }
-
- private String getFileExtension(Uri uri){
- ContentResolver contentResolver = setupActivity.this.getContentResolver();
- MimeTypeMap mimeTypeMap = MimeTypeMap.getSingleton();
- return mimeTypeMap.getExtensionFromMimeType(contentResolver.getType(uri));
- }
-}
\ No newline at end of file
diff --git a/app/src/main/java/com/margsapp/messenger/Fragments/AddParticipantsFragment.java b/app/src/main/java/com/margsapp/messenger/Fragments/AddParticipantsFragment.java
index 4bccfaf..67643f7 100644
--- a/app/src/main/java/com/margsapp/messenger/Fragments/AddParticipantsFragment.java
+++ b/app/src/main/java/com/margsapp/messenger/Fragments/AddParticipantsFragment.java
@@ -154,7 +154,6 @@ public void onCancelled(@NonNull DatabaseError error) {
-
public void AddParticipant(String id, String username, RotateLoading rotateLoading, Context mContext, ImageView remove) {
Calendar calendar = Calendar.getInstance();
@SuppressLint("SimpleDateFormat") SimpleDateFormat simpleDateFormat = new SimpleDateFormat("dd/MM/yy HH:mm");
@@ -175,7 +174,6 @@ public void AddParticipant(String id, String username, RotateLoading rotateLoadi
hash.put("timestamp", timestamp);
databaseReference2.push().setValue(hash);
-
DatabaseReference databaseReference = FirebaseDatabase.getInstance().getReference("Group").child(groupId).child("members").child(id);
HashMap hashMap1 = new HashMap<>();
hashMap1.put("id", id);
@@ -184,14 +182,10 @@ public void AddParticipant(String id, String username, RotateLoading rotateLoadi
databaseReference.setValue(hashMap1).addOnCompleteListener(task -> {
rotateLoading.stop();
rotateLoading.setVisibility(View.GONE);
-
-
Toast.makeText(mContext,username + getResources().getString(R.string.is_added),Toast.LENGTH_SHORT).show();
-
remove.setVisibility(View.VISIBLE);
});
-
}
@Override
diff --git a/app/src/main/java/com/margsapp/messenger/Fragments/ChatsFragment.java b/app/src/main/java/com/margsapp/messenger/Fragments/ChatsFragment.java
index 479a679..1374ed0 100644
--- a/app/src/main/java/com/margsapp/messenger/Fragments/ChatsFragment.java
+++ b/app/src/main/java/com/margsapp/messenger/Fragments/ChatsFragment.java
@@ -106,9 +106,8 @@ private void updateToken(String token){
private void chatList() {
mUsers = new ArrayList<>();
- Query query = FirebaseDatabase.getInstance().getReference("Users").orderByChild("username");
- query.keepSynced(true);
- query.addValueEventListener(new ValueEventListener() {
+ DatabaseReference databaseReference = FirebaseDatabase.getInstance().getReference("Users");
+ databaseReference.addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(@NonNull DataSnapshot snapshot) {
mUsers.clear();
@@ -117,11 +116,13 @@ public void onDataChange(@NonNull DataSnapshot snapshot) {
for (Chatlist chatlist : usersList){
assert user != null;
if(user.getId().equals(chatlist.getId())){
+
if(chatlist.getFriends().equals("Messaged")){
mUsers.add(user);
- }if (chatlist.getFriends().equals("Requested")){
- mUsers.add(user);
+ }
+ if(chatlist.getFriends().equals("Blocked")){
+ //Dont do anything
}
}
@@ -133,7 +134,7 @@ public void onDataChange(@NonNull DataSnapshot snapshot) {
- userAdapter = new UserAdapter(getContext(), mUsers, true, false, false);
+ userAdapter = new UserAdapter(getContext(), mUsers, true, false, false,getActivity());
recyclerView.setAdapter(userAdapter);
userAdapter.notifyDataSetChanged();
}
@@ -147,6 +148,4 @@ public void onCancelled(@NonNull DatabaseError error) {
-
-
}
\ No newline at end of file
diff --git a/app/src/main/java/com/margsapp/messenger/Fragments/GroupFragment.java b/app/src/main/java/com/margsapp/messenger/Fragments/GroupFragment.java
index 9101797..80a8f2f 100644
--- a/app/src/main/java/com/margsapp/messenger/Fragments/GroupFragment.java
+++ b/app/src/main/java/com/margsapp/messenger/Fragments/GroupFragment.java
@@ -126,7 +126,5 @@ public void onCancelled(@NonNull DatabaseError error) {
}
});
}
-
-
-
+
}
\ No newline at end of file
diff --git a/app/src/main/java/com/margsapp/messenger/Fragments/GroupInfoFragment.java b/app/src/main/java/com/margsapp/messenger/Fragments/GroupInfoFragment.java
index ff9ce2d..cea8767 100644
--- a/app/src/main/java/com/margsapp/messenger/Fragments/GroupInfoFragment.java
+++ b/app/src/main/java/com/margsapp/messenger/Fragments/GroupInfoFragment.java
@@ -52,6 +52,7 @@
import java.util.Calendar;
import java.util.HashMap;
import java.util.List;
+import java.util.Objects;
public class GroupInfoFragment extends Fragment implements GroupInfoAdapter.EventListener {
@@ -185,6 +186,7 @@ public void onDataChange(@NonNull DataSnapshot snapshot) {
Intent intent = new Intent(getContext(), manage_partActivty.class);
intent.putExtra("groupid", groupid);
startActivity(intent);
+ getActivity().overridePendingTransition(R.anim.activity_slide_in_left,R.anim.activity_slider_out_right);
}else {
AlertDialog.Builder dialog = new AlertDialog.Builder(requireContext());
dialog.setTitle(getResources().getString(R.string.not_an_admin));
@@ -293,7 +295,7 @@ private void leave(String groupId,String username) {
hash.put("sender", "LOGS");
hash.put("group", groupId);
hash.put("reply","false");
- hash.put("message", username + getResources().getString(R.string.left_group));
+ hash.put("message", username + " "+ getResources().getString(R.string.left_group));
hash.put("timestamp", timestamp);
databaseReference2.push().setValue(hash);
@@ -626,4 +628,5 @@ public void onDestroy() {
super.onDestroy();
groupInfoAdapter.removeEventListener();
}
+
}
\ No newline at end of file
diff --git a/app/src/main/java/com/margsapp/messenger/Fragments/ProfileFragment.java b/app/src/main/java/com/margsapp/messenger/Fragments/ProfileFragment.java
deleted file mode 100644
index 32aed9d..0000000
--- a/app/src/main/java/com/margsapp/messenger/Fragments/ProfileFragment.java
+++ /dev/null
@@ -1,205 +0,0 @@
-package com.margsapp.messenger.Fragments;
-
-import android.app.ProgressDialog;
-import android.content.ContentResolver;
-import android.content.Intent;
-import android.net.Uri;
-import android.os.Bundle;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.webkit.MimeTypeMap;
-import android.widget.TextView;
-import android.widget.Toast;
-
-import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
-import androidx.fragment.app.Fragment;
-
-import com.bumptech.glide.Glide;
-import com.google.android.gms.ads.AdRequest;
-import com.google.android.gms.ads.AdView;
-import com.google.android.gms.tasks.Continuation;
-import com.google.android.gms.tasks.OnCompleteListener;
-import com.google.android.gms.tasks.Task;
-import com.google.firebase.auth.FirebaseAuth;
-import com.google.firebase.auth.FirebaseUser;
-import com.google.firebase.database.DataSnapshot;
-import com.google.firebase.database.DatabaseError;
-import com.google.firebase.database.DatabaseReference;
-import com.google.firebase.database.FirebaseDatabase;
-import com.google.firebase.database.ValueEventListener;
-import com.google.firebase.storage.FirebaseStorage;
-import com.google.firebase.storage.StorageReference;
-import com.google.firebase.storage.StorageTask;
-import com.google.firebase.storage.UploadTask;
-import com.margsapp.messenger.Model.User;
-import com.margsapp.messenger.R;
-
-import java.util.HashMap;
-
-import de.hdodenhof.circleimageview.CircleImageView;
-
-import static android.app.Activity.RESULT_CANCELED;
-import static android.app.Activity.RESULT_OK;
-
-
-public class ProfileFragment extends Fragment {
-
- CircleImageView image_profile;
- TextView username, dt, joined_on;
-
-
- DatabaseReference databaseReference;
- FirebaseUser firebaseUser;
-
- StorageReference storageReference;
- private static final int IMAGE_REQUEST = 1;
- private Uri imageUri;
- private StorageTask uploadTask;
-
-
- @Override
- public View onCreateView(LayoutInflater inflater, ViewGroup container,
- Bundle savedInstanceState) {
-
-
- View view = inflater.inflate(R.layout.fragment_profile, container, false);
-
- AdView mAdView = view.findViewById(R.id.adView);
- AdRequest adRequest = new AdRequest.Builder().build();
- mAdView.loadAd(adRequest);
-
-
-
- image_profile = view.findViewById(R.id.profile_image);
- username = view.findViewById(R.id.username);
- joined_on = view.findViewById(R.id.joined_on);
- dt = view.findViewById(R.id.dt);
-
-
- firebaseUser = FirebaseAuth.getInstance().getCurrentUser();
- storageReference = FirebaseStorage.getInstance().getReference("uploads");
- databaseReference = FirebaseDatabase.getInstance().getReference("Users").child(firebaseUser.getUid());
-
- databaseReference.addValueEventListener(new ValueEventListener() {
- @Override
- public void onDataChange(@NonNull DataSnapshot snapshot) {
- if(isAdded()) {
- User user = snapshot.getValue(User.class);
- assert user != null;
- username.setText(user.getUsername());
- dt.setText(user.getDt());
- joined_on.setText(user.getJoined_on());
-
- if (user.getImageUrl().equals("default")) {
- image_profile.setImageResource(R.drawable.user);
- } else {
- Glide.with((requireContext())).load(user.getImageUrl()).into(image_profile);
- }
- }
- }
-
- @Override
- public void onCancelled(@NonNull DatabaseError error) {
-
- }
- });
-
-/*
- image_profile.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- openImage();
- }
- });
-
-*/
- return view;
-
-
-
-
- }
-
- private void openImage() {
-
- Intent intent = new Intent();
- intent.setType("image/*");
- intent.setAction(Intent.ACTION_GET_CONTENT);
- startActivityForResult(intent, IMAGE_REQUEST);
-
- }
-
- private String getFileExtension(Uri uri){
- ContentResolver contentResolver = requireContext().getContentResolver();
- MimeTypeMap mimeTypeMap = MimeTypeMap.getSingleton();
- return mimeTypeMap.getExtensionFromMimeType(contentResolver.getType(uri));
- }
-
- private void uploadImage(){
-
- final ProgressDialog pd = new ProgressDialog(getContext());
- pd.setMessage("Uploading");
- pd.show();
-
- if (imageUri != null){
- final StorageReference fileReference = storageReference.child(System.currentTimeMillis()
- +"."+getFileExtension(imageUri));
- uploadTask = fileReference.putFile(imageUri);
- uploadTask.continueWithTask((Continuation>) task -> {
- if(!task.isSuccessful()){
- throw task.getException();
- }
- return fileReference.getDownloadUrl();
-
- }).addOnCompleteListener(new OnCompleteListener() {
- @Override
- public void onComplete(@NonNull Task task) {
- if(task.isSuccessful()){
- Uri downloadUri = task.getResult();
- assert downloadUri != null;
- String mUri = downloadUri.toString();
-
- databaseReference = FirebaseDatabase.getInstance().getReference("Users").child(firebaseUser.getUid());
- HashMap map = new HashMap<>();
- map.put("imageURL", mUri);
- databaseReference.updateChildren(map);
-
- pd.dismiss();
- }
- else {
- Toast.makeText(getContext(), "Failed! Error code 0x08050101", Toast.LENGTH_SHORT).show();
- pd.dismiss();
- }
- }
- }).addOnFailureListener(e -> {
- Toast.makeText(getContext(), e.getMessage(), Toast.LENGTH_SHORT).show();
- pd.dismiss();
- });
- }else {
- Toast.makeText(getContext(),"No Image Error code 0x08050102",Toast.LENGTH_SHORT).show();
- }
-
-
- }
-
- @Override
- public void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
- super.onActivityResult(requestCode, resultCode, data);
-
- if(resultCode != RESULT_CANCELED){
- if(requestCode == IMAGE_REQUEST && resultCode == RESULT_OK
- && data != null && data.getData() !=null){
- imageUri = data.getData();
-
- if(uploadTask != null && uploadTask.isInProgress()){
- Toast.makeText(getContext(),"Upload in progress", Toast.LENGTH_SHORT).show();
- }else {
- uploadImage();
- }
- }
- }
-
- }
-}
\ No newline at end of file
diff --git a/app/src/main/java/com/margsapp/messenger/Fragments/UsersFragment.java b/app/src/main/java/com/margsapp/messenger/Fragments/UsersFragment.java
index a324518..161631f 100644
--- a/app/src/main/java/com/margsapp/messenger/Fragments/UsersFragment.java
+++ b/app/src/main/java/com/margsapp/messenger/Fragments/UsersFragment.java
@@ -1,12 +1,6 @@
package com.margsapp.messenger.Fragments;
import android.os.Bundle;
-
-import androidx.annotation.NonNull;
-import androidx.fragment.app.Fragment;
-import androidx.recyclerview.widget.LinearLayoutManager;
-import androidx.recyclerview.widget.RecyclerView;
-
import android.text.Editable;
import android.text.TextWatcher;
import android.view.LayoutInflater;
@@ -14,8 +8,13 @@
import android.view.ViewGroup;
import android.widget.EditText;
+import androidx.annotation.NonNull;
+import androidx.fragment.app.Fragment;
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
+import androidx.recyclerview.widget.SimpleItemAnimator;
+
import com.factor.bouncy.BouncyRecyclerView;
-import com.gjiazhe.springrecyclerview.SpringRecyclerView;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.FirebaseUser;
import com.google.firebase.database.DataSnapshot;
@@ -51,12 +50,16 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container,
View view = inflater.inflate(R.layout.fragment_users, container, false);
recyclerView = view.findViewById(R.id.recycler_view);
- recyclerView.setHasFixedSize(true);
recyclerView.setFlingAnimationSize(0.3f);
recyclerView.setOverscrollAnimationSize(0.3f);
- recyclerView.setHasFixedSize(true);
+ recyclerView.setHasFixedSize(false);
recyclerView.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL, false));
+ RecyclerView.ItemAnimator animator = recyclerView.getItemAnimator();
+ if (animator instanceof SimpleItemAnimator) {
+ ((SimpleItemAnimator) animator).setSupportsChangeAnimations(false);
+ }
+
mUsers = new ArrayList<>();
@@ -106,7 +109,7 @@ public void onDataChange(@NonNull DataSnapshot snapshot) {
}
}
- userAdapter = new UserAdapter(getContext(), mUsers,false, true,false);
+ userAdapter = new UserAdapter(getContext(), mUsers,false, true,false,getActivity());
recyclerView.setAdapter(userAdapter);
}
@@ -138,14 +141,11 @@ public void onDataChange(@NonNull DataSnapshot snapshot) {
}
- userAdapter = new UserAdapter(getContext(), mUsers, false, true,false);
+ userAdapter = new UserAdapter(getContext(), mUsers, false, true, false, getActivity());
recyclerView.setAdapter(userAdapter);
}
}
-
-
-
@Override
public void onCancelled(@NonNull DatabaseError error) {
diff --git a/app/src/main/java/com/margsapp/messenger/Fragments/manage_partFragment.java b/app/src/main/java/com/margsapp/messenger/Fragments/manage_partFragment.java
index 6209692..759365a 100644
--- a/app/src/main/java/com/margsapp/messenger/Fragments/manage_partFragment.java
+++ b/app/src/main/java/com/margsapp/messenger/Fragments/manage_partFragment.java
@@ -35,9 +35,7 @@ public class manage_partFragment extends Fragment implements AddPartAdapter.Even
private RecyclerView recyclerView;
private List mUsers;
-
FirebaseUser firebaseUser;
-
private List usersList;
public String groupname;
@@ -58,16 +56,12 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container,
recyclerView.setHasFixedSize(true);
recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
-
mUsers = new ArrayList<>();
firebaseUser = FirebaseAuth.getInstance().getCurrentUser();
chatList();
-
-
-
return view;
}
diff --git a/app/src/main/java/com/margsapp/messenger/Friends/Accepted.java b/app/src/main/java/com/margsapp/messenger/Friends/Accepted.java
index 58b2f1e..be3b76a 100644
--- a/app/src/main/java/com/margsapp/messenger/Friends/Accepted.java
+++ b/app/src/main/java/com/margsapp/messenger/Friends/Accepted.java
@@ -21,6 +21,8 @@
import com.google.firebase.database.ValueEventListener;
import com.margsapp.messenger.Settings.Chat_settings;
import com.margsapp.messenger.R;
+import com.r0adkll.slidr.Slidr;
+import com.r0adkll.slidr.model.SlidrInterface;
import java.util.ArrayList;
import java.util.HashMap;
@@ -28,6 +30,7 @@
public class Accepted extends AppCompatActivity {
+
FirebaseUser firebaseUser;
DatabaseReference reference;
@@ -39,11 +42,18 @@ protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_accepted);
+ SlidrInterface slidrInterface = Slidr.attach(this);
+
Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
Objects.requireNonNull(getSupportActionBar()).setTitle(getResources().getString(R.string.accepted));
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
- toolbar.setNavigationOnClickListener(v -> startActivity(new Intent(Accepted.this, Chat_settings.class).setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)));
+ toolbar.setNavigationOnClickListener(v -> {
+
+ startActivity(new Intent(Accepted.this, Chat_settings.class).addFlags(Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT));
+ finish();
+ overridePendingTransition(R.anim.activity_slider_in_right,R.anim.activity_slider_out_left);
+ });
firebaseUser = FirebaseAuth.getInstance().getCurrentUser();
@@ -74,7 +84,9 @@ public void onCancelled(@NonNull DatabaseError error) {
}
public void onBackPressed(){
- startActivity(new Intent(Accepted.this, Chat_settings.class).setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP));
+ startActivity(new Intent(Accepted.this, Chat_settings.class).addFlags(Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT));
+ finish();
+ overridePendingTransition(R.anim.activity_slider_in_right,R.anim.activity_slider_out_left);
}
static class ViewPageAdapter extends FragmentPagerAdapter {
@@ -113,6 +125,7 @@ public CharSequence getPageTitle(int position) {
}
}
+
private void status(String status){
reference = FirebaseDatabase.getInstance().getReference("Users").child(firebaseUser.getUid());
@@ -122,6 +135,7 @@ private void status(String status){
reference.updateChildren(hashMap);
}
+
@Override
protected void onResume() {
super.onResume();
diff --git a/app/src/main/java/com/margsapp/messenger/Friends/AcceptedFragment.java b/app/src/main/java/com/margsapp/messenger/Friends/AcceptedFragment.java
index 10314de..89e6de4 100644
--- a/app/src/main/java/com/margsapp/messenger/Friends/AcceptedFragment.java
+++ b/app/src/main/java/com/margsapp/messenger/Friends/AcceptedFragment.java
@@ -76,8 +76,6 @@ public void onCancelled(@NonNull DatabaseError error) {
return view;
}
-
-
private void chatList() {
mUsers = new ArrayList<>();
@@ -99,8 +97,7 @@ public void onDataChange(@NonNull DataSnapshot snapshot) {
}
}
-
- userAdapter = new UserAdapter(getContext(), mUsers, true, false,false);
+ userAdapter = new UserAdapter(getContext(), mUsers, true, false,false,getActivity());
recyclerView.setAdapter(userAdapter);
}
diff --git a/app/src/main/java/com/margsapp/messenger/Friends/Blocked.java b/app/src/main/java/com/margsapp/messenger/Friends/Blocked.java
index 085e5f8..376ff98 100644
--- a/app/src/main/java/com/margsapp/messenger/Friends/Blocked.java
+++ b/app/src/main/java/com/margsapp/messenger/Friends/Blocked.java
@@ -21,6 +21,8 @@
import com.google.firebase.database.ValueEventListener;
import com.margsapp.messenger.Settings.Chat_settings;
import com.margsapp.messenger.R;
+import com.r0adkll.slidr.Slidr;
+import com.r0adkll.slidr.model.SlidrInterface;
import java.util.ArrayList;
import java.util.HashMap;
@@ -39,15 +41,18 @@ protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_blocked);
+ SlidrInterface slidrInterface = Slidr.attach(this);
+
Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
Objects.requireNonNull(getSupportActionBar()).setTitle(getResources().getString(R.string.blocked));
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
- toolbar.setNavigationOnClickListener(v -> startActivity(new Intent(Blocked.this, Chat_settings.class).setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)));
-
+ toolbar.setNavigationOnClickListener(v ->{
+ startActivity(new Intent(Blocked.this, Chat_settings.class).addFlags(Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT));
+ overridePendingTransition(R.anim.activity_slider_in_right,R.anim.activity_slider_out_left);
+ });
firebaseUser = FirebaseAuth.getInstance().getCurrentUser();
-
final ViewPager viewPager = findViewById(R.id.viewPager);
reference = FirebaseDatabase.getInstance().getReference("Chats");
@@ -73,7 +78,9 @@ public void onCancelled(@NonNull DatabaseError error) {
}
public void onBackPressed(){
- startActivity(new Intent(Blocked.this, Chat_settings.class).setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP));
+ startActivity(new Intent(Blocked.this, Chat_settings.class).addFlags(Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT));
+ finish();
+ overridePendingTransition(R.anim.activity_slider_in_right,R.anim.activity_slider_out_left);
}
static class ViewPageAdapter extends FragmentPagerAdapter {
@@ -104,7 +111,6 @@ public void addFragment(Fragment fragment, String title)
titles.add(title);
}
-
@Nullable
@Override
public CharSequence getPageTitle(int position) {
@@ -132,6 +138,4 @@ protected void onPause() {
super.onPause();
status("offline");
}
-
-
}
\ No newline at end of file
diff --git a/app/src/main/java/com/margsapp/messenger/Friends/BlockedFragment.java b/app/src/main/java/com/margsapp/messenger/Friends/BlockedFragment.java
index b3d542d..d8e2601 100644
--- a/app/src/main/java/com/margsapp/messenger/Friends/BlockedFragment.java
+++ b/app/src/main/java/com/margsapp/messenger/Friends/BlockedFragment.java
@@ -29,8 +29,6 @@
public class BlockedFragment extends Fragment {
-
-
private RecyclerView recyclerView;
private UserAdapter userAdapter;
@@ -78,8 +76,6 @@ public void onCancelled(@NonNull DatabaseError error) {
return view;
}
-
-
private void chatList() {
mUsers = new ArrayList<>();
@@ -101,7 +97,7 @@ public void onDataChange(@NonNull DataSnapshot snapshot) {
}
- userAdapter = new UserAdapter(getContext(), mUsers, false, false,true);
+ userAdapter = new UserAdapter(getContext(), mUsers, false, false,true,getActivity());
recyclerView.setAdapter(userAdapter);
}
diff --git a/app/src/main/java/com/margsapp/messenger/Main/FindUsersActivity.java b/app/src/main/java/com/margsapp/messenger/Main/FindUsersActivity.java
index df5279e..8bd423f 100644
--- a/app/src/main/java/com/margsapp/messenger/Main/FindUsersActivity.java
+++ b/app/src/main/java/com/margsapp/messenger/Main/FindUsersActivity.java
@@ -76,6 +76,7 @@ protected void onCreate(Bundle savedInstanceState) {
+ /*
MobileAds.initialize(this, initializationStatus -> {
});
@@ -98,6 +99,8 @@ public void onAdFailedToLoad(@NonNull LoadAdError loadAdError) {
}
});
+ */
+
toolbar.setNavigationOnClickListener(v -> {
startActivity(new Intent(FindUsersActivity.this, MainActivity.class));
if (mInterstitialAd != null) {
@@ -114,7 +117,6 @@ public void onAdFailedToLoad(@NonNull LoadAdError loadAdError) {
final ViewPager viewPager = findViewById(R.id.viewPager);
-
FindUsersActivity.ViewPageAdapter viewPageAdapter = new ViewPageAdapter(getSupportFragmentManager());
viewPageAdapter.addFragment(new UsersFragment(), "Users");
viewPager.setAdapter(viewPageAdapter);
@@ -125,8 +127,6 @@ public void onAdFailedToLoad(@NonNull LoadAdError loadAdError) {
}
-
-
static class ViewPageAdapter extends FragmentPagerAdapter {
private final ArrayList fragments;
@@ -207,7 +207,4 @@ public void onBackPressed(){
}
}
-
-
-
}
\ No newline at end of file
diff --git a/app/src/main/java/com/margsapp/messenger/Main/MainActivity.java b/app/src/main/java/com/margsapp/messenger/Main/MainActivity.java
index 1bdb6b7..d09c20b 100644
--- a/app/src/main/java/com/margsapp/messenger/Main/MainActivity.java
+++ b/app/src/main/java/com/margsapp/messenger/Main/MainActivity.java
@@ -3,12 +3,17 @@
import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.ActivityOptions;
+import android.app.Dialog;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.res.Configuration;
+import android.graphics.Color;
+import android.graphics.drawable.ColorDrawable;
import android.os.Bundle;
+import android.os.Handler;
import android.util.Log;
import android.util.Pair;
+import android.view.Gravity;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
@@ -51,6 +56,7 @@
import com.margsapp.messenger.R;
import com.margsapp.messenger.Settings.edit_profile;
import com.margsapp.messenger.dp_view.main_dpActivity;
+import com.margsapp.messenger.dp_view.personal_dpActivity;
import com.margsapp.messenger.groupclass.create_groupActivity;
import java.text.SimpleDateFormat;
@@ -84,6 +90,8 @@ public class MainActivity extends AppCompatActivity {
private ProgressBar network_check;
+ Dialog dialog;
+
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@@ -94,6 +102,13 @@ protected void onCreate(Bundle savedInstanceState) {
setLocale(language);
+ // dialog = new Dialog(this);
+
+
+
+ // onOptions();
+
+
SharedPreferences preferences = getSharedPreferences("theme", 0);
String Theme = preferences.getString(THEME, "");
if(Theme.equals("2")){
@@ -111,6 +126,7 @@ protected void onCreate(Bundle savedInstanceState) {
setSupportActionBar(toolbar);
Objects.requireNonNull(getSupportActionBar()).setTitle("");
+ /*
MobileAds.initialize(this, initializationStatus -> {
});
AdRequest adRequest = new AdRequest.Builder().build();
@@ -132,6 +148,8 @@ public void onAdFailedToLoad(@NonNull LoadAdError loadAdError) {
}
});
+ */
+
DatabaseReference connectedRef = FirebaseDatabase.getInstance().getReference(".info/connected");
connectedRef.addValueEventListener(new ValueEventListener() {
@Override
@@ -177,10 +195,11 @@ public void onCancelled(@NonNull DatabaseError error) {
String data = imageurl;
Intent intent = new Intent(MainActivity.this, main_dpActivity.class);
-
-
- intent.putExtra("data", data);
- startActivity(intent);
+ Pair[] pairs = new Pair[1];
+ pairs[0] = new Pair(DP, "imageTransition");
+ intent.putExtra("data",data);
+ ActivityOptions options = ActivityOptions.makeSceneTransitionAnimation(MainActivity.this, pairs);
+ startActivity(intent, options.toBundle());
});
@@ -260,6 +279,20 @@ public void onCancelled(@NonNull DatabaseError error) {
}
+
+ /*
+ public void onOptions(){
+
+ dialog.setContentView(R.layout.new_update_release_notes);
+
+ dialog.getWindow().setGravity(Gravity.BOTTOM);
+ dialog.getWindow().getAttributes().windowAnimations = R.style.DialogAnimation;
+ dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
+ dialog.show();
+ }
+
+ */
+
private void setLocale(String lang) {
Locale locale = new Locale(lang);
@@ -302,12 +335,13 @@ public boolean onOptionsItemSelected(@NonNull MenuItem item) {
return true;
case R.id.edit:
startActivity(new Intent(MainActivity.this, edit_profile.class));
+ overridePendingTransition(R.anim.activity_slide_in_left,R.anim.activity_slider_out_right);
if (mInterstitialAd != null) {
mInterstitialAd.show(MainActivity.this);
} else {
Log.d("TAG", "The interstitial ad wasn't ready yet.");
}
- return true;
+ return false;
case R.id.create_group:
startActivity(new Intent(MainActivity.this, create_groupActivity.class));
@@ -402,17 +436,20 @@ protected void onResume() {
}
+
protected void onRestart() {
super.onRestart();
-
+ status("online");
}
+
@Override
protected void onPause() {
super.onPause();
status("offline");
}
+
protected void onDestroy() {
super.onDestroy();
status("offline");
diff --git a/app/src/main/java/com/margsapp/messenger/Main/MessageActivity.java b/app/src/main/java/com/margsapp/messenger/Main/MessageActivity.java
index 726d1fe..c29d0ef 100644
--- a/app/src/main/java/com/margsapp/messenger/Main/MessageActivity.java
+++ b/app/src/main/java/com/margsapp/messenger/Main/MessageActivity.java
@@ -8,12 +8,14 @@
import android.content.pm.ShortcutInfo;
import android.content.pm.ShortcutManager;
import android.graphics.Bitmap;
+import android.graphics.Color;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.Icon;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
+import android.os.Handler;
import android.text.Editable;
import android.text.TextWatcher;
import android.util.Log;
@@ -36,7 +38,6 @@
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.recyclerview.widget.ItemTouchHelper;
import androidx.recyclerview.widget.LinearLayoutManager;
-import androidx.recyclerview.widget.RecyclerView;
import com.bumptech.glide.Glide;
import com.factor.bouncy.BouncyRecyclerView;
@@ -66,6 +67,10 @@
import com.margsapp.messenger.R;
import com.margsapp.messenger.dp_view.personal_dpActivity;
import com.margsapp.messenger.reply.SwipeController;
+import com.r0adkll.slidr.Slidr;
+import com.r0adkll.slidr.model.SlidrConfig;
+import com.r0adkll.slidr.model.SlidrInterface;
+import com.r0adkll.slidr.model.SlidrListener;
import org.jetbrains.annotations.NotNull;
@@ -83,7 +88,6 @@
import retrofit2.Response;
import static com.margsapp.messenger.Settings.CustomiseActivity.THEME;
-import static java.security.AccessController.getContext;
public class MessageActivity extends AppCompatActivity {
@@ -132,6 +136,7 @@ public class MessageActivity extends AppCompatActivity {
boolean notify = false;
ShortcutManager shortcutManager;
+ private SlidrInterface slidrInterface;
@Override
protected void onStart() {
super.onStart();
@@ -159,6 +164,22 @@ protected void onCreate(Bundle savedInstanceState) {
+ /*
+ SlidrConfig config = new SlidrConfig().Builder()
+ .edge(true)
+ .edgeSize(0.18f)
+ .build();
+
+ */
+
+ SlidrConfig config = new SlidrConfig.Builder()
+ .edge(true)
+ .edgeSize(0.2f) // The % of the screen that counts as the edge, default 18%
+ .build();
+
+
+ slidrInterface = Slidr.attach(this,config);
+
androidx.appcompat.widget.Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
@@ -168,6 +189,7 @@ protected void onCreate(Bundle savedInstanceState) {
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.N_MR1) {
shortcutManager = getSystemService(ShortcutManager.class);
}
+ /*
MobileAds.initialize(this, initializationStatus -> {
});
AdRequest adRequest = new AdRequest.Builder().build();
@@ -189,13 +211,20 @@ public void onAdFailedToLoad(@NonNull LoadAdError loadAdError) {
}
});
+ */
- toolbar.setNavigationOnClickListener(v -> {
- Intent openMainActivity = new Intent(MessageActivity.this, MainActivity.class);
+ toolbar.setNavigationOnClickListener(v -> {
+ /*
+ Intent openMainActivity = new Intent(this, MainActivity.class);
+ openMainActivity.setFlags(Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT);
startActivity(openMainActivity);
+ */
+ finish();
+ overridePendingTransition(R.anim.activity_slider_in_right,R.anim.activity_slider_out_left);
+
if (mInterstitialAd != null) {
@@ -261,6 +290,9 @@ public void onAdFailedToLoad(@NonNull LoadAdError loadAdError) {
intent.putExtra("userid",userid);
ActivityOptions options = ActivityOptions.makeSceneTransitionAnimation(MessageActivity.this, pairs);
startActivity(intent, options.toBundle());
+
+ new Handler().postDelayed(this::finish, 1000);
+
});
@@ -510,6 +542,14 @@ public void onCancelled(@NonNull DatabaseError error) {
}
}
+ public void lockSlide(View view){
+ slidrInterface.lock();
+ }
+
+ public void unlockSlide(View view){
+ slidrInterface.unlock();
+ }
+
private void onReply(Chat getChat) {
@@ -991,32 +1031,33 @@ private void Shortcuts(String userid, String username, Drawable imageUrl){
- public void onBackPressed(){
-
- Intent openMainActivity = new Intent(MessageActivity.this, MainActivity.class);
- openMainActivity.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
+ public void onBackPressed() {
+ /*
+ Intent openMainActivity = new Intent(this, MainActivity.class);
+ openMainActivity.setFlags(Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT);
startActivityIfNeeded(openMainActivity, 0);
+ */
+ finish();
+ overridePendingTransition(R.anim.activity_slider_in_right,R.anim.activity_slider_out_left);
+
if (mInterstitialAd != null) {
mInterstitialAd.show(MessageActivity.this);
} else {
Log.d("TAG", "The interstitial ad wasn't ready yet.");
}
+
}
@Override
protected void onResume() {
-
super.onResume();
status("online");
-
-
currentUser(userid);
}
- protected void onPause()
- {
+ protected void onPause() {
super.onPause();
databaseReference.removeEventListener(seenListener);
// txt_database.removeEventListener(textListener);
diff --git a/app/src/main/java/com/margsapp/messenger/Model/APIService.java b/app/src/main/java/com/margsapp/messenger/Model/APIService.java
index 764fa4f..bb88bad 100644
--- a/app/src/main/java/com/margsapp/messenger/Model/APIService.java
+++ b/app/src/main/java/com/margsapp/messenger/Model/APIService.java
@@ -24,10 +24,6 @@ public interface APIService {
)
-
@POST("fcm/send")
Call sendNotification(@Body Sender body);
-
-
-
}
diff --git a/app/src/main/java/com/margsapp/messenger/Model/AppVersion.java b/app/src/main/java/com/margsapp/messenger/Model/AppVersion.java
index 5e9218b..83a7bcd 100644
--- a/app/src/main/java/com/margsapp/messenger/Model/AppVersion.java
+++ b/app/src/main/java/com/margsapp/messenger/Model/AppVersion.java
@@ -3,10 +3,6 @@
public class AppVersion {
private String appversion;
-
-
-
-
public AppVersion(String appversion){
this.appversion = appversion;
}
diff --git a/app/src/main/java/com/margsapp/messenger/Model/Chat.java b/app/src/main/java/com/margsapp/messenger/Model/Chat.java
index b80a42f..ff9b845 100644
--- a/app/src/main/java/com/margsapp/messenger/Model/Chat.java
+++ b/app/src/main/java/com/margsapp/messenger/Model/Chat.java
@@ -5,18 +5,23 @@ public class Chat {
private String sender;
private String receiver;
private String message;
+
private String isseen;
+
private String timestamp;
private String replytext;
private String reply;
private String replyto;
+
private String sendername;
+
private String replyname;
private String encrypted;
public Chat(String sender, String receiver, String message, String isseen, String timestamp, String replytext, String reply,String replyto,String replyname, String sendername, String encrypted) {
+
this.sender = sender;
this.receiver = receiver;
this.message = message;
diff --git a/app/src/main/java/com/margsapp/messenger/Model/Chatlist.java b/app/src/main/java/com/margsapp/messenger/Model/Chatlist.java
index 6348296..cfc3cef 100644
--- a/app/src/main/java/com/margsapp/messenger/Model/Chatlist.java
+++ b/app/src/main/java/com/margsapp/messenger/Model/Chatlist.java
@@ -9,7 +9,6 @@ public class Chatlist {
public Chatlist(String id, String friends){
this.id = id;
this.friends = friends;
-
}
public Chatlist(){
@@ -20,13 +19,10 @@ public String getFriends() {
return friends;
}
-
-
public String getId(){
return id;
}
-
public void setId(String id) {
this.id = id;
}
diff --git a/app/src/main/java/com/margsapp/messenger/Model/Group.java b/app/src/main/java/com/margsapp/messenger/Model/Group.java
index df3e255..f2c4407 100644
--- a/app/src/main/java/com/margsapp/messenger/Model/Group.java
+++ b/app/src/main/java/com/margsapp/messenger/Model/Group.java
@@ -14,6 +14,9 @@ public class Group {
private String createdon;
public Group(String groupname, String imageUrl, String id, String user_name, String admin, String createdon,String groupid) {
+
+
+
this.groupname = groupname;
this.imageUrl = imageUrl;
this.id = id;
diff --git a/app/src/main/java/com/margsapp/messenger/Model/GroupChat.java b/app/src/main/java/com/margsapp/messenger/Model/GroupChat.java
index 67e310f..501dd78 100644
--- a/app/src/main/java/com/margsapp/messenger/Model/GroupChat.java
+++ b/app/src/main/java/com/margsapp/messenger/Model/GroupChat.java
@@ -4,9 +4,12 @@ public class GroupChat {
private String sender;
private String sendername;
+
+
private String message;
private String timestamp;
+
private String replytext;
private String reply;
private String replyto;
@@ -15,6 +18,7 @@ public class GroupChat {
private String group;
public GroupChat(String sender,String sendername, String group, String message, String timestamp, String replytext, String reply, String replyto,String replyname) {
+
this.sender = sender;
this.sendername = sendername;
this.group = group;
@@ -28,6 +32,7 @@ public GroupChat(String sender,String sendername, String group, String message,
}
public GroupChat(){
+
}
public String getReplyname() {
diff --git a/app/src/main/java/com/margsapp/messenger/Model/GroupList.java b/app/src/main/java/com/margsapp/messenger/Model/GroupList.java
index 377f334..c5bd57e 100644
--- a/app/src/main/java/com/margsapp/messenger/Model/GroupList.java
+++ b/app/src/main/java/com/margsapp/messenger/Model/GroupList.java
@@ -16,7 +16,6 @@ public GroupList(String id, String admin, String groupname,String groupid) {
public GroupList() {
}
-
public String getGroupid() {
return groupid;
}
@@ -48,4 +47,4 @@ public String getAdmin() {
public void setAdmin(String admin) {
this.admin = admin;
}
-}
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/margsapp/messenger/Model/User.java b/app/src/main/java/com/margsapp/messenger/Model/User.java
index b01e2aa..f938c13 100644
--- a/app/src/main/java/com/margsapp/messenger/Model/User.java
+++ b/app/src/main/java/com/margsapp/messenger/Model/User.java
@@ -27,6 +27,10 @@ public User()
}
+
+
+
+
public String getTypingto() {
return typingto;
}
@@ -82,9 +86,4 @@ public String getStatus() {
public void setStatus(String status) {
this.status = status;
}
-
-
-
-
-
}
diff --git a/app/src/main/java/com/margsapp/messenger/Notifications/Client.java b/app/src/main/java/com/margsapp/messenger/Notifications/Client.java
index 54f1768..19845aa 100644
--- a/app/src/main/java/com/margsapp/messenger/Notifications/Client.java
+++ b/app/src/main/java/com/margsapp/messenger/Notifications/Client.java
@@ -17,4 +17,4 @@ public static Retrofit getClient(String url){
}
return retrofit;
}
-}
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/margsapp/messenger/Notifications/Data.java b/app/src/main/java/com/margsapp/messenger/Notifications/Data.java
index 3c73bab..81904c1 100644
--- a/app/src/main/java/com/margsapp/messenger/Notifications/Data.java
+++ b/app/src/main/java/com/margsapp/messenger/Notifications/Data.java
@@ -27,11 +27,6 @@ public Data(){
public String getGroupid() {
return groupid;
}
-
- public void setGroupid(String groupid) {
- this.groupid = groupid;
- }
-
*/
public String getGroup() {
diff --git a/app/src/main/java/com/margsapp/messenger/Notifications/MyFirebaseIdService.java b/app/src/main/java/com/margsapp/messenger/Notifications/MyFirebaseIdService.java
index 85f2f28..b135bbe 100644
--- a/app/src/main/java/com/margsapp/messenger/Notifications/MyFirebaseIdService.java
+++ b/app/src/main/java/com/margsapp/messenger/Notifications/MyFirebaseIdService.java
@@ -27,4 +27,4 @@ private void updateToken(String refreshToken) {
assert firebaseUser != null;
reference.child(firebaseUser.getUid()).setValue(token);
}
-}
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/margsapp/messenger/Notifications/MyFirebaseMessaging.java b/app/src/main/java/com/margsapp/messenger/Notifications/MyFirebaseMessaging.java
index b9471ab..2beaa53 100644
--- a/app/src/main/java/com/margsapp/messenger/Notifications/MyFirebaseMessaging.java
+++ b/app/src/main/java/com/margsapp/messenger/Notifications/MyFirebaseMessaging.java
@@ -42,27 +42,33 @@ public void onMessageReceived(@NotNull RemoteMessage remoteMessage) {
FirebaseUser firebaseUser = FirebaseAuth.getInstance().getCurrentUser();
-
+ assert group != null;
if(group.equals("false")){
- if (firebaseUser != null && sented.equals(firebaseUser.getUid())) {
-
- if (!currentuser.equals(user)) {
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
- sendOreoNotification(remoteMessage);
- } else {
- sendNotification(remoteMessage);
+ if (firebaseUser != null) {
+ assert sented != null;
+ if (sented.equals(firebaseUser.getUid())) {
+
+ if (!currentuser.equals(user)) {
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
+ sendOreoNotification(remoteMessage);
+ } else {
+ sendNotification(remoteMessage);
+ }
}
- }
+ }
}
}else {
- if (firebaseUser != null && sented.equals(firebaseUser.getUid())){
+ if (firebaseUser != null) {
+ assert sented != null;
+ if (sented.equals(firebaseUser.getUid())) {
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
- sendOreoGroupNotification(remoteMessage);
- } else {
- sendGroupNotification(remoteMessage);
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
+ sendOreoGroupNotification(remoteMessage);
+ } else {
+ sendGroupNotification(remoteMessage);
+ }
}
}
}
@@ -93,7 +99,7 @@ private void sendGroupNotification(RemoteMessage remoteMessage) {
.setSmallIcon(Integer.parseInt(icon))
.setContentTitle(title)
.setContentText(body)
- .setAutoCancel(true)
+ .setAutoCancel(false)
.setSound(defaultSound)
.setContentIntent(pendingIntent);
NotificationManager notificationManager = (NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE);
@@ -210,3 +216,4 @@ private void sendNotification(RemoteMessage remoteMessage) {
}
}
+
diff --git a/app/src/main/java/com/margsapp/messenger/Notifications/MyResponse.java b/app/src/main/java/com/margsapp/messenger/Notifications/MyResponse.java
index 41c7aab..cb1c6c6 100644
--- a/app/src/main/java/com/margsapp/messenger/Notifications/MyResponse.java
+++ b/app/src/main/java/com/margsapp/messenger/Notifications/MyResponse.java
@@ -1,6 +1,5 @@
package com.margsapp.messenger.Notifications;
public class MyResponse {
-
public int success;
-}
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/margsapp/messenger/Notifications/OreoNotification.java b/app/src/main/java/com/margsapp/messenger/Notifications/OreoNotification.java
index e8e754c..da2e6e9 100644
--- a/app/src/main/java/com/margsapp/messenger/Notifications/OreoNotification.java
+++ b/app/src/main/java/com/margsapp/messenger/Notifications/OreoNotification.java
@@ -55,7 +55,6 @@ public Notification.Builder getOreoNotification(String title, String body,
.setContentText(body)
.setSmallIcon(Integer.parseInt(icon))
.setSound(soundUri)
- .setAutoCancel(true);
-
+ .setAutoCancel(false);
}
-}
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/margsapp/messenger/Notifications/Sender.java b/app/src/main/java/com/margsapp/messenger/Notifications/Sender.java
index b950727..f093d69 100644
--- a/app/src/main/java/com/margsapp/messenger/Notifications/Sender.java
+++ b/app/src/main/java/com/margsapp/messenger/Notifications/Sender.java
@@ -2,6 +2,7 @@
public class Sender {
+
public Data data;
public String to;
diff --git a/app/src/main/java/com/margsapp/messenger/Notifications/Token.java b/app/src/main/java/com/margsapp/messenger/Notifications/Token.java
index 30df75b..6d9f605 100644
--- a/app/src/main/java/com/margsapp/messenger/Notifications/Token.java
+++ b/app/src/main/java/com/margsapp/messenger/Notifications/Token.java
@@ -9,9 +9,7 @@ public Token(String token){
}
public Token(){
-
}
-
public String getToken() {
return token;
}
@@ -19,4 +17,4 @@ public String getToken() {
public void setToken(String token) {
this.token = token;
}
-}
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/margsapp/messenger/Settings/AboutActivity.java b/app/src/main/java/com/margsapp/messenger/Settings/AboutActivity.java
index 9f3d7ab..8b0e046 100644
--- a/app/src/main/java/com/margsapp/messenger/Settings/AboutActivity.java
+++ b/app/src/main/java/com/margsapp/messenger/Settings/AboutActivity.java
@@ -32,6 +32,8 @@
import com.margsapp.messenger.BuildConfig;
import com.margsapp.messenger.Model.AppVersion;
import com.margsapp.messenger.R;
+import com.r0adkll.slidr.Slidr;
+import com.r0adkll.slidr.model.SlidrInterface;
import java.text.SimpleDateFormat;
import java.util.Calendar;
@@ -74,6 +76,8 @@ protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_about);
+ SlidrInterface slidrInterface = Slidr.attach(this);
+
Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
@@ -97,6 +101,8 @@ protected void onCreate(Bundle savedInstanceState) {
Intent intent = new Intent(AboutActivity.this, edit_profile.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
+ overridePendingTransition(R.anim.activity_slider_in_right, R.anim.activity_slider_out_left);
+
}else if(!Read_Recipients.isChecked()){
SharedPreferences sharedPreferences = getSharedPreferences("ReadRecipents",0);
@@ -114,6 +120,8 @@ protected void onCreate(Bundle savedInstanceState) {
Intent intent = new Intent(AboutActivity.this, edit_profile.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
+ overridePendingTransition(R.anim.activity_slider_in_right, R.anim.activity_slider_out_left);
+
}
if(Swicth_authenticate.isChecked()) {
Biometric();
@@ -146,6 +154,7 @@ protected void onCreate(Bundle savedInstanceState) {
Read_Recipients.setChecked(true);
+ /*
MobileAds.initialize(this, initializationStatus -> {
});
@@ -172,6 +181,8 @@ public void onAdFailedToLoad(@NonNull LoadAdError loadAdError) {
mAdView.loadAd(adRequest);
+ */
+
loadData();
updateViews();
@@ -318,6 +329,8 @@ public void onBackPressed() {
Intent intent = new Intent(AboutActivity.this, edit_profile.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
+ overridePendingTransition(R.anim.activity_slider_in_right, R.anim.activity_slider_out_left);
+
}else if(!Read_Recipients.isChecked()){
SharedPreferences sharedPreferences = getSharedPreferences("ReadRecipents",0);
@@ -335,6 +348,8 @@ public void onBackPressed() {
Intent intent = new Intent(AboutActivity.this, edit_profile.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
+ overridePendingTransition(R.anim.activity_slider_in_right, R.anim.activity_slider_out_left);
+
}
if(Swicth_authenticate.isChecked()) {
@@ -355,6 +370,8 @@ public void onBackPressed() {
Intent intent = new Intent(AboutActivity.this, edit_profile.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
+ overridePendingTransition(R.anim.activity_slider_in_right, R.anim.activity_slider_out_left);
+
}
diff --git a/app/src/main/java/com/margsapp/messenger/Settings/ChatViewActivity.java b/app/src/main/java/com/margsapp/messenger/Settings/ChatViewActivity.java
index b719dcd..9262a05 100644
--- a/app/src/main/java/com/margsapp/messenger/Settings/ChatViewActivity.java
+++ b/app/src/main/java/com/margsapp/messenger/Settings/ChatViewActivity.java
@@ -1,10 +1,13 @@
package com.margsapp.messenger.Settings;
import android.os.Bundle;
+import android.view.View;
import androidx.appcompat.app.AppCompatActivity;
import com.margsapp.messenger.R;
+import com.r0adkll.slidr.Slidr;
+import com.r0adkll.slidr.model.SlidrInterface;
import java.util.Objects;
@@ -15,15 +18,33 @@ protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_chat_view);
+ SlidrInterface slidrInterface = Slidr.attach(this);
+
androidx.appcompat.widget.Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
Objects.requireNonNull(getSupportActionBar()).setTitle("Chat Info");
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
- toolbar.setNavigationOnClickListener(v -> finish());
+ toolbar.setNavigationOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View view) {
+ finish();
+ overridePendingTransition(R.anim.activity_slider_in_right, R.anim.activity_slider_out_left);
+
+
+ }
+
+ });
}
+
+ public void onBackPressed(){
+ finish();
+ overridePendingTransition(R.anim.activity_slider_in_right, R.anim.activity_slider_out_left);
+ }
+
+
}
\ No newline at end of file
diff --git a/app/src/main/java/com/margsapp/messenger/Settings/Chat_settings.java b/app/src/main/java/com/margsapp/messenger/Settings/Chat_settings.java
index 7ba0559..bc95dd9 100644
--- a/app/src/main/java/com/margsapp/messenger/Settings/Chat_settings.java
+++ b/app/src/main/java/com/margsapp/messenger/Settings/Chat_settings.java
@@ -3,6 +3,7 @@
import android.annotation.SuppressLint;
import android.content.Intent;
import android.os.Bundle;
+import android.view.View;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
@@ -13,6 +14,8 @@
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.margsapp.messenger.R;
+import com.r0adkll.slidr.Slidr;
+import com.r0adkll.slidr.model.SlidrInterface;
import java.text.SimpleDateFormat;
import java.util.Calendar;
@@ -30,13 +33,22 @@ protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_chat_settings);
+ SlidrInterface slidrInterface = Slidr.attach(this);
+
Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
Objects.requireNonNull(getSupportActionBar()).setTitle(getResources().getString(R.string.people));
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
- toolbar.setNavigationOnClickListener(v -> startActivity(new Intent(Chat_settings.this, edit_profile.class).setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)));
+ toolbar.setNavigationOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View view) {
+ startActivity(new Intent(Chat_settings.this, edit_profile.class));
+ overridePendingTransition(R.anim.activity_slider_in_right, R.anim.activity_slider_out_left);
+
+ }
+ });
Accepted = findViewById(R.id.Accepted);
@@ -44,16 +56,14 @@ protected void onCreate(Bundle savedInstanceState) {
Accepted.setOnClickListener(v -> {
Intent intent = new Intent(Chat_settings.this, com.margsapp.messenger.Friends.Accepted.class);
- intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
- finish();
+ overridePendingTransition(R.anim.activity_slide_in_left,R.anim.activity_slider_out_right);
});
Blocked.setOnClickListener(v -> {
Intent intent = new Intent(Chat_settings.this, com.margsapp.messenger.Friends.Blocked.class);
- intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
- finish();
+ overridePendingTransition(R.anim.activity_slide_in_left,R.anim.activity_slider_out_right);
});
@@ -61,9 +71,11 @@ protected void onCreate(Bundle savedInstanceState) {
public void onBackPressed(){
Intent intent = new Intent(Chat_settings.this, edit_profile.class);
- intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
+ intent.addFlags(Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT);
startActivity(intent);
finish();
+ overridePendingTransition(R.anim.activity_slider_in_right, R.anim.activity_slider_out_left);
+
}
private void status(String status){
diff --git a/app/src/main/java/com/margsapp/messenger/Settings/CustomiseActivity.java b/app/src/main/java/com/margsapp/messenger/Settings/CustomiseActivity.java
index 981fa3e..ace0a3d 100644
--- a/app/src/main/java/com/margsapp/messenger/Settings/CustomiseActivity.java
+++ b/app/src/main/java/com/margsapp/messenger/Settings/CustomiseActivity.java
@@ -16,6 +16,8 @@
import com.google.android.material.button.MaterialButtonToggleGroup;
import com.margsapp.messenger.R;
+import com.r0adkll.slidr.Slidr;
+import com.r0adkll.slidr.model.SlidrInterface;
import java.util.Locale;
import java.util.Objects;
@@ -36,6 +38,8 @@ protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_customize);
+ SlidrInterface slidrInterface = Slidr.attach(this);
+
sun = findViewById(R.id.sun_img);
moon = findViewById(R.id.moon_img);
default_settings = findViewById(R.id.default_img);
@@ -53,7 +57,16 @@ protected void onCreate(Bundle savedInstanceState) {
Objects.requireNonNull(getSupportActionBar()).setTitle(getResources().getString(R.string.customize));
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
- toolbar.setNavigationOnClickListener(v -> startActivity(new Intent(CustomiseActivity.this,edit_profile.class).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)));
+ toolbar.setNavigationOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View view) {
+ startActivity(new Intent(CustomiseActivity.this,edit_profile.class).addFlags(Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT));
+ finish();
+ overridePendingTransition(R.anim.activity_slider_in_right,R.anim.activity_slider_out_left);
+
+ }
+ });
+
materialButtonToggleGroup = findViewById(R.id.btg_theme);
materialButtonToggleGroup.check(R.id.btnDefault);
@@ -191,11 +204,11 @@ private void loadData() {
}
-
-
@Override
public void onBackPressed() {
- startActivity(new Intent(CustomiseActivity.this,edit_profile.class).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
+ startActivity(new Intent(CustomiseActivity.this,edit_profile.class).addFlags(Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT));
+ finish();
+ overridePendingTransition(R.anim.activity_slider_in_right,R.anim.activity_slider_out_left);
}
}
diff --git a/app/src/main/java/com/margsapp/messenger/Settings/EditStatusActivity.java b/app/src/main/java/com/margsapp/messenger/Settings/EditStatusActivity.java
index c5d3b12..0d4a883 100644
--- a/app/src/main/java/com/margsapp/messenger/Settings/EditStatusActivity.java
+++ b/app/src/main/java/com/margsapp/messenger/Settings/EditStatusActivity.java
@@ -122,6 +122,7 @@ public boolean onOptionsItemSelected(@NonNull MenuItem item) {
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
finish();
+
}
return false;
@@ -175,4 +176,5 @@ protected void onDestroy() {
super.onDestroy();
status("offline");
}
+
}
\ No newline at end of file
diff --git a/app/src/main/java/com/margsapp/messenger/Settings/edit_profile.java b/app/src/main/java/com/margsapp/messenger/Settings/edit_profile.java
index be6024a..6b2e991 100644
--- a/app/src/main/java/com/margsapp/messenger/Settings/edit_profile.java
+++ b/app/src/main/java/com/margsapp/messenger/Settings/edit_profile.java
@@ -43,6 +43,10 @@
import com.margsapp.messenger.Main.MainActivity;
import com.margsapp.messenger.Model.User;
import com.margsapp.messenger.R;
+import com.r0adkll.slidr.Slidr;
+import com.r0adkll.slidr.model.SlidrConfig;
+import com.r0adkll.slidr.model.SlidrInterface;
+import com.r0adkll.slidr.model.SlidrListener;
import com.theartofdev.edmodo.cropper.CropImage;
import com.theartofdev.edmodo.cropper.CropImageView;
@@ -105,10 +109,14 @@ protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_profile_edit);
+
+ SlidrInterface slidrInterface = Slidr.attach(this);
+
Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
Objects.requireNonNull(getSupportActionBar()).setTitle(getResources().getString(R.string.settings));
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
+ /*
MobileAds.initialize(this, initializationStatus -> {
});
@@ -135,8 +143,11 @@ public void onAdFailedToLoad(@NonNull LoadAdError loadAdError) {
mAdView.loadAd(adRequest);
+ */
+
toolbar.setNavigationOnClickListener(v -> {
- startActivity(new Intent(edit_profile.this, MainActivity.class).setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP));
+ startActivity(new Intent(edit_profile.this, MainActivity.class).addFlags(Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT));
+ overridePendingTransition(R.anim.activity_slider_in_right,R.anim.activity_slider_out_left);
/*if (mInterstitialAd != null) {
mInterstitialAd.show(edit_profile.this);
} else {
@@ -161,45 +172,50 @@ public void onAdFailedToLoad(@NonNull LoadAdError loadAdError) {
Status_card.setOnClickListener(v -> {
Intent intent = new Intent(edit_profile.this, EditStatusActivity.class);
- intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
+
startActivity(intent);
+ overridePendingTransition(R.anim.activity_slide_in_left,R.anim.activity_slider_out_right);
+
if (mInterstitialAd != null) {
mInterstitialAd.show(edit_profile.this);
} else {
Log.d("TAG", "The interstitial ad wasn't ready yet.");
}
- finish();
});
Account_card.setOnClickListener(v -> {
Intent intent = new Intent(edit_profile.this, Chat_settings.class);
- intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
+ overridePendingTransition(R.anim.activity_slide_in_left,R.anim.activity_slider_out_right);
+
if (mInterstitialAd != null) {
mInterstitialAd.show(edit_profile.this);
} else {
Log.d("TAG", "The interstitial ad wasn't ready yet.");
}
- finish();
+
});
Customize_card.setOnClickListener(v -> {
Intent intent = new Intent(edit_profile.this, CustomiseActivity.class);
- intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
+ overridePendingTransition(R.anim.activity_slide_in_left,R.anim.activity_slider_out_right);
+
+
if (mInterstitialAd != null) {
mInterstitialAd.show(edit_profile.this);
} else {
Log.d("TAG", "The interstitial ad wasn't ready yet.");
}
- finish();
+
});
About_card.setOnClickListener(v -> {
Intent intent = new Intent(edit_profile.this, AboutActivity.class);
- intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
+ overridePendingTransition(R.anim.activity_slide_in_left,R.anim.activity_slider_out_right);
+
/*
if (mInterstitialAd != null) {
mInterstitialAd.show(edit_profile.this);
@@ -208,7 +224,7 @@ public void onAdFailedToLoad(@NonNull LoadAdError loadAdError) {
}
*/
- finish();
+
});
@@ -217,8 +233,7 @@ public void onAdFailedToLoad(@NonNull LoadAdError loadAdError) {
reference = FirebaseDatabase.getInstance().getReference("Users").child(firebaseUser.getUid());
- reference.keepSynced(true);
- reference.addValueEventListener(new ValueEventListener() {
+ reference.addListenerForSingleValueEvent(new ValueEventListener() {
@Override
public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
@@ -250,6 +265,7 @@ public void onCancelled(@NonNull DatabaseError error) {
}
});
+
loadingBar = new ProgressDialog(this);
profile_image.setOnClickListener(v -> openImage());
@@ -260,8 +276,9 @@ public void onCancelled(@NonNull DatabaseError error) {
public void onBackPressed(){
Intent intent = new Intent(edit_profile.this, MainActivity.class);
- intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
+ overridePendingTransition(R.anim.activity_slider_in_right,R.anim.activity_slider_out_left);
+
if (mInterstitialAd != null) {
mInterstitialAd.show(edit_profile.this);
@@ -269,7 +286,6 @@ public void onBackPressed(){
Log.d("TAG", "The interstitial ad wasn't ready yet.");
}
- finish();
}
diff --git a/app/src/main/java/com/margsapp/messenger/Utils/EmptyClass.java b/app/src/main/java/com/margsapp/messenger/Utils/EmptyClass.java
deleted file mode 100644
index e31079d..0000000
--- a/app/src/main/java/com/margsapp/messenger/Utils/EmptyClass.java
+++ /dev/null
@@ -1,6 +0,0 @@
-package com.margsapp.messenger.Utils;
-
-
-public class EmptyClass{
-
-}
diff --git a/app/src/main/java/com/margsapp/messenger/Utils/EncryptingClass.java b/app/src/main/java/com/margsapp/messenger/Utils/EncryptingClass.java
deleted file mode 100644
index 3210357..0000000
--- a/app/src/main/java/com/margsapp/messenger/Utils/EncryptingClass.java
+++ /dev/null
@@ -1,4 +0,0 @@
-package com.margsapp.messenger.Utils;
-
-public class EncryptingClass {
-}
diff --git a/app/src/main/java/com/margsapp/messenger/Utils/FireBaseOffline.java b/app/src/main/java/com/margsapp/messenger/Utils/FireBaseOffline.java
deleted file mode 100644
index 78af23d..0000000
--- a/app/src/main/java/com/margsapp/messenger/Utils/FireBaseOffline.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.margsapp.messenger.Utils;
-
-import android.app.Application;
-
-import com.google.firebase.database.FirebaseDatabase;
-
-public class FireBaseOffline extends Application {
-
- @Override
- public void onCreate() {
- super.onCreate();
- FirebaseDatabase.getInstance().setPersistenceEnabled(true);
-
-
- }
-}
diff --git a/app/src/main/java/com/margsapp/messenger/dp_view/group_dpActivity.java b/app/src/main/java/com/margsapp/messenger/dp_view/group_dpActivity.java
index 8064716..75388a7 100644
--- a/app/src/main/java/com/margsapp/messenger/dp_view/group_dpActivity.java
+++ b/app/src/main/java/com/margsapp/messenger/dp_view/group_dpActivity.java
@@ -33,13 +33,18 @@ public class group_dpActivity extends AppCompatActivity {
Intent intent;
String groupid;
+
+
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE,
WindowManager.LayoutParams.FLAG_SECURE);
- setContentView(R.layout.activity_dp_view);
+ setContentView(R.layout.activity_dp_group);
+
+
+
intent = getIntent();
imageurl = intent.getStringExtra("data");
@@ -104,7 +109,9 @@ public void onBackPressed() {
pairs[0] = new Pair(dpView, "imageTransition");
ActivityOptions options = ActivityOptions.makeSceneTransitionAnimation(group_dpActivity.this, pairs);
intent.putExtra("groupid",groupid);
+
startActivity(intent, options.toBundle());
+
}
@@ -124,6 +131,4 @@ protected void onDestroy() {
super.onDestroy();
status("offline");
}
-
-
}
\ No newline at end of file
diff --git a/app/src/main/java/com/margsapp/messenger/dp_view/main_dpActivity.java b/app/src/main/java/com/margsapp/messenger/dp_view/main_dpActivity.java
index 307c578..3e13648 100644
--- a/app/src/main/java/com/margsapp/messenger/dp_view/main_dpActivity.java
+++ b/app/src/main/java/com/margsapp/messenger/dp_view/main_dpActivity.java
@@ -21,7 +21,6 @@ public class main_dpActivity extends AppCompatActivity {
ImageView dpView;
String imageurl;
-
Intent intent;
@Override
@@ -40,8 +39,10 @@ protected void onCreate(Bundle savedInstanceState) {
Intent intent = new Intent(main_dpActivity.this, MainActivity.class);
Pair[] pairs = new Pair[1];
pairs[0] = new Pair(dpView, "imageTransition");
+ intent.addFlags(Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT);
ActivityOptions options = ActivityOptions.makeSceneTransitionAnimation(main_dpActivity.this, pairs);
startActivity(intent, options.toBundle());
+ finish();
});
dpView = findViewById(R.id.dpview);
@@ -65,7 +66,9 @@ public void onBackPressed() {
Intent intent = new Intent(main_dpActivity.this, MainActivity.class);
Pair[] pairs = new Pair[1];
pairs[0] = new Pair(dpView, "imageTransition");
+ intent.addFlags(Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT);
ActivityOptions options = ActivityOptions.makeSceneTransitionAnimation(main_dpActivity.this, pairs);
startActivity(intent, options.toBundle());
+ finish();
}
}
\ No newline at end of file
diff --git a/app/src/main/java/com/margsapp/messenger/dp_view/personal_dpActivity.java b/app/src/main/java/com/margsapp/messenger/dp_view/personal_dpActivity.java
index 743d9bd..c2956c8 100644
--- a/app/src/main/java/com/margsapp/messenger/dp_view/personal_dpActivity.java
+++ b/app/src/main/java/com/margsapp/messenger/dp_view/personal_dpActivity.java
@@ -42,17 +42,18 @@ protected void onCreate(Bundle savedInstanceState) {
toolbar.setNavigationOnClickListener(v -> {
Intent intent = new Intent(personal_dpActivity.this, MessageActivity.class);
+ intent.putExtra("userid",userid);
+ intent.addFlags(Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT);
Pair[] pairs = new Pair[1];
pairs[0] = new Pair(dpView, "imageTransition");
ActivityOptions options = ActivityOptions.makeSceneTransitionAnimation(personal_dpActivity.this, pairs);
- intent.putExtra("userid",userid);
- startActivity(intent, options.toBundle());
+ startActivity(intent,options.toBundle());
+ finish();
});
dpView = findViewById(R.id.dpview);
-
if(imageurl.equals("default"))
{
dpView.setImageResource(R.drawable.user);
@@ -65,12 +66,15 @@ protected void onCreate(Bundle savedInstanceState) {
@Override
public void onBackPressed() {
- super.onBackPressed();
Intent intent = new Intent(personal_dpActivity.this, MessageActivity.class);
+ intent.putExtra("userid",userid);
+ intent.addFlags(Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT);
Pair[] pairs = new Pair[1];
pairs[0] = new Pair(dpView, "imageTransition");
- intent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
ActivityOptions options = ActivityOptions.makeSceneTransitionAnimation(personal_dpActivity.this, pairs);
- startActivityIfNeeded(intent,0, options.toBundle());
+ startActivity(intent,options.toBundle());
+ finish();
+
+
}
}
\ No newline at end of file
diff --git a/app/src/main/java/com/margsapp/messenger/groupclass/AddParticipants.java b/app/src/main/java/com/margsapp/messenger/groupclass/AddParticipants.java
index 1c6d636..b7e8e15 100644
--- a/app/src/main/java/com/margsapp/messenger/groupclass/AddParticipants.java
+++ b/app/src/main/java/com/margsapp/messenger/groupclass/AddParticipants.java
@@ -60,12 +60,6 @@ public String getMyData() {
-
-
-
-
-
-
static class ViewPageAdapter extends FragmentPagerAdapter {
private final ArrayList fragments;
diff --git a/app/src/main/java/com/margsapp/messenger/groupclass/create_groupActivity.java b/app/src/main/java/com/margsapp/messenger/groupclass/create_groupActivity.java
index a98d0b1..dd82762 100644
--- a/app/src/main/java/com/margsapp/messenger/groupclass/create_groupActivity.java
+++ b/app/src/main/java/com/margsapp/messenger/groupclass/create_groupActivity.java
@@ -169,7 +169,6 @@ private void creategroup(String txt_groupname, String image_, String timestamp,
-
reference = FirebaseDatabase.getInstance().getReference("Group").child(groupID);
HashMap hashMap = new HashMap<>();
diff --git a/app/src/main/java/com/margsapp/messenger/groupclass/edit_group_name.java b/app/src/main/java/com/margsapp/messenger/groupclass/edit_group_name.java
index ba62884..755f14f 100644
--- a/app/src/main/java/com/margsapp/messenger/groupclass/edit_group_name.java
+++ b/app/src/main/java/com/margsapp/messenger/groupclass/edit_group_name.java
@@ -84,7 +84,7 @@ public void onCancelled(@NonNull DatabaseError error) {
}
- private void save(String txt_groupname,String username, String groupid) {
+ private void save(String txt_groupname, String username, String groupid) {
firebaseUser = FirebaseAuth.getInstance().getCurrentUser();
reference = FirebaseDatabase.getInstance().getReference("Group").child(groupid);
@@ -141,20 +141,18 @@ public boolean onOptionsItemSelected(@NonNull MenuItem item) {
switch (item.getItemId()) {
case R.id.done:
String txt_groupname = GroupName.getText().toString();
- save(txt_groupname, username,groupid);
+ save(txt_groupname, username, groupid);
break;
}
return false;
}
-
-
- public void onBackPressed(){
+ public void onBackPressed() {
}
- private void status(String status){
+ private void status(String status) {
FirebaseUser firebaseUserStatus = FirebaseAuth.getInstance().getCurrentUser();
assert firebaseUserStatus != null;
DatabaseReference statusdatabaseReference = FirebaseDatabase.getInstance().getReference("Users").child(firebaseUserStatus.getUid());
@@ -189,6 +187,4 @@ protected void onDestroy() {
status("offline");
}
-
- }
-
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/margsapp/messenger/groupclass/group_infoActivity.java b/app/src/main/java/com/margsapp/messenger/groupclass/group_infoActivity.java
index 0c93acc..5610b0a 100644
--- a/app/src/main/java/com/margsapp/messenger/groupclass/group_infoActivity.java
+++ b/app/src/main/java/com/margsapp/messenger/groupclass/group_infoActivity.java
@@ -70,6 +70,7 @@ protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_group_info);
+
androidx.appcompat.widget.Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
Objects.requireNonNull(getSupportActionBar()).setTitle("Group Info");
@@ -104,7 +105,7 @@ public void onCancelled(@NonNull DatabaseError error) {
});
toolbar.setNavigationOnClickListener(v -> {
Intent openMainActivity = new Intent(group_infoActivity.this, group_messageActivity.class);
- openMainActivity.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
+ openMainActivity.setFlags(Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT);
startActivityIfNeeded(openMainActivity, 0);
});
@@ -174,7 +175,6 @@ public void addFragment(Fragment fragment, String title)
titles.add(title);
}
-
@Nullable
@Override
public CharSequence getPageTitle(int position) {
@@ -220,7 +220,6 @@ public void onActivityResult(int requestCode, int resultCode, @Nullable Intent d
StorageReference filepath = storageReference.child(System.currentTimeMillis()
+ "." + getFileExtension(resultUri));
-
StorageTask uploadTask = filepath.putFile(resultUri);
uploadTask.continueWithTask(new Continuation>() {
@Override
@@ -257,18 +256,15 @@ public void onComplete(@NonNull Task task) {
}
}
}
-
private String getFileExtension(Uri uri){
ContentResolver contentResolver = group_infoActivity.this.getContentResolver();
MimeTypeMap mimeTypeMap = MimeTypeMap.getSingleton();
return mimeTypeMap.getExtensionFromMimeType(contentResolver.getType(uri));
}
-
-
@Override
public void onBackPressed() {
Intent openMainActivity = new Intent(group_infoActivity.this, group_messageActivity.class);
- openMainActivity.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
+ openMainActivity.setFlags(Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT);
startActivityIfNeeded(openMainActivity, 0);
}
}
\ No newline at end of file
diff --git a/app/src/main/java/com/margsapp/messenger/groupclass/group_messageActivity.java b/app/src/main/java/com/margsapp/messenger/groupclass/group_messageActivity.java
index 2aa2c4c..827eec5 100644
--- a/app/src/main/java/com/margsapp/messenger/groupclass/group_messageActivity.java
+++ b/app/src/main/java/com/margsapp/messenger/groupclass/group_messageActivity.java
@@ -165,6 +165,7 @@ protected void onCreate(Bundle savedInstanceState) {
shortcutManager = getSystemService(ShortcutManager.class);
}
+ /*
MobileAds.initialize(this, initializationStatus -> {
});
AdRequest adRequest = new AdRequest.Builder().build();
@@ -186,6 +187,8 @@ public void onAdFailedToLoad(@NonNull LoadAdError loadAdError) {
}
});
+ */
+
toolbar.setNavigationOnClickListener(v -> {
Intent openMainActivity = new Intent(group_messageActivity.this, MainActivity.class);
@@ -357,12 +360,15 @@ private void checkText() {
private void onReply(GroupChat getChat) {
- reply_txt.setText(getChat.getMessage());
- ReplyId = getChat.getSender();
- Replyname = getChat.getSendername();
- reply.setVisibility(View.VISIBLE);
- text_send.isFocused();
- reply_ = true;
+ if(!getChat.getSender().equals("LOGS")){
+ reply_txt.setText(getChat.getMessage());
+ ReplyId = getChat.getSender();
+ Replyname = getChat.getSendername();
+ reply.setVisibility(View.VISIBLE);
+ text_send.isFocused();
+ reply_ = true;
+ }
+
}
@@ -664,6 +670,4 @@ protected void onDestroy() {
}
-
-
}
\ No newline at end of file
diff --git a/app/src/main/java/com/margsapp/messenger/groupclass/manage_partActivty.java b/app/src/main/java/com/margsapp/messenger/groupclass/manage_partActivty.java
index 6cffd51..52a0134 100644
--- a/app/src/main/java/com/margsapp/messenger/groupclass/manage_partActivty.java
+++ b/app/src/main/java/com/margsapp/messenger/groupclass/manage_partActivty.java
@@ -30,10 +30,12 @@ protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_manage_part);
+
Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
Objects.requireNonNull(getSupportActionBar()).setTitle(getResources().getString(R.string.manage_participants));
+
intent = getIntent();
groupid = intent.getStringExtra("groupid");
@@ -60,6 +62,7 @@ static class ViewPageAdapter extends FragmentPagerAdapter {
this.titles = new ArrayList<>();
}
+
@NonNull
@Override
public Fragment getItem(int position) {
@@ -92,6 +95,7 @@ public boolean onCreateOptionsMenu(Menu menu) {
return true;
}
+
@Override
public boolean onOptionsItemSelected(@NonNull MenuItem item) {
diff --git a/app/src/main/java/com/margsapp/messenger/reply/DimensionUtils.java b/app/src/main/java/com/margsapp/messenger/reply/DimensionUtils.java
index ad83d08..420d2f9 100644
--- a/app/src/main/java/com/margsapp/messenger/reply/DimensionUtils.java
+++ b/app/src/main/java/com/margsapp/messenger/reply/DimensionUtils.java
@@ -6,8 +6,11 @@ public class DimensionUtils {
public static int getDP(float toDP, Context context){
+
if (toDP == 0){
+
return 0;
+
} else{
float density = context.getResources().getDisplayMetrics().density;
return (int) Math.ceil((density * toDP));
diff --git a/app/src/main/java/com/margsapp/messenger/reply/ISwipeControllerActions.java b/app/src/main/java/com/margsapp/messenger/reply/ISwipeControllerActions.java
index ab6fec4..37dff9f 100644
--- a/app/src/main/java/com/margsapp/messenger/reply/ISwipeControllerActions.java
+++ b/app/src/main/java/com/margsapp/messenger/reply/ISwipeControllerActions.java
@@ -2,4 +2,4 @@
public interface ISwipeControllerActions {
void onSwipePerformed(int position);
-}
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/margsapp/messenger/reply/SwipeController.java b/app/src/main/java/com/margsapp/messenger/reply/SwipeController.java
index 509cd34..d59678d 100644
--- a/app/src/main/java/com/margsapp/messenger/reply/SwipeController.java
+++ b/app/src/main/java/com/margsapp/messenger/reply/SwipeController.java
@@ -210,3 +210,5 @@ private void drawReplyButton(Canvas canvas){
}
+
+
diff --git a/app/src/main/java/com/margsapp/messenger/utils/FirebaseOffline.kt b/app/src/main/java/com/margsapp/messenger/utils/FirebaseOffline.kt
new file mode 100644
index 0000000..6e10887
--- /dev/null
+++ b/app/src/main/java/com/margsapp/messenger/utils/FirebaseOffline.kt
@@ -0,0 +1,10 @@
+package com.margsapp.messenger.utils
+
+import android.app.Application
+import com.google.firebase.database.FirebaseDatabase
+class FirebaseOffline : Application() {
+ override fun onCreate() {
+ super.onCreate()
+ FirebaseDatabase.getInstance().setPersistenceEnabled(true);
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/res/anim/activity_slide_in_left.xml b/app/src/main/res/anim/activity_slide_in_left.xml
new file mode 100644
index 0000000..91ecf0b
--- /dev/null
+++ b/app/src/main/res/anim/activity_slide_in_left.xml
@@ -0,0 +1,7 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/anim/activity_slider_in_right.xml b/app/src/main/res/anim/activity_slider_in_right.xml
new file mode 100644
index 0000000..5cdc869
--- /dev/null
+++ b/app/src/main/res/anim/activity_slider_in_right.xml
@@ -0,0 +1,7 @@
+
+
+
+
diff --git a/app/src/main/res/anim/activity_slider_out_left.xml b/app/src/main/res/anim/activity_slider_out_left.xml
new file mode 100644
index 0000000..b4be277
--- /dev/null
+++ b/app/src/main/res/anim/activity_slider_out_left.xml
@@ -0,0 +1,7 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/anim/activity_slider_out_right.xml b/app/src/main/res/anim/activity_slider_out_right.xml
new file mode 100644
index 0000000..cee6d41
--- /dev/null
+++ b/app/src/main/res/anim/activity_slider_out_right.xml
@@ -0,0 +1,7 @@
+
+
+
+
diff --git a/app/src/main/res/font/nunito_bold.xml b/app/src/main/res/font/nunito_bold.xml
new file mode 100644
index 0000000..4484884
--- /dev/null
+++ b/app/src/main/res/font/nunito_bold.xml
@@ -0,0 +1,7 @@
+
+
+
diff --git a/app/src/main/res/layout-sw600dp/activity_register.xml b/app/src/main/res/layout-sw600dp/activity_register.xml
deleted file mode 100644
index 28155cb..0000000
--- a/app/src/main/res/layout-sw600dp/activity_register.xml
+++ /dev/null
@@ -1,118 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_about.xml b/app/src/main/res/layout/activity_about.xml
index c7f537a..b183777 100644
--- a/app/src/main/res/layout/activity_about.xml
+++ b/app/src/main/res/layout/activity_about.xml
@@ -151,4 +151,5 @@
app:layout_constraintVertical_bias="1.0" />
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_accepted.xml b/app/src/main/res/layout/activity_accepted.xml
index 28a3ee2..4d0ddc3 100644
--- a/app/src/main/res/layout/activity_accepted.xml
+++ b/app/src/main/res/layout/activity_accepted.xml
@@ -27,5 +27,4 @@
android:layout_marginTop="10dp"
android:layout_below="@+id/bar"
/>
-
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_add_participants.xml b/app/src/main/res/layout/activity_add_participants.xml
index 3ce967c..97cef48 100644
--- a/app/src/main/res/layout/activity_add_participants.xml
+++ b/app/src/main/res/layout/activity_add_participants.xml
@@ -27,5 +27,4 @@
android:layout_marginTop="10dp"
android:layout_below="@+id/bar"
/>
-
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_blocked.xml b/app/src/main/res/layout/activity_blocked.xml
index 5933366..3c7ef12 100644
--- a/app/src/main/res/layout/activity_blocked.xml
+++ b/app/src/main/res/layout/activity_blocked.xml
@@ -20,7 +20,6 @@
app:popupTheme="@style/MenuStyle"/>
-
-
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_chat_settings.xml b/app/src/main/res/layout/activity_chat_settings.xml
index d9a4c17..6207109 100644
--- a/app/src/main/res/layout/activity_chat_settings.xml
+++ b/app/src/main/res/layout/activity_chat_settings.xml
@@ -79,6 +79,7 @@
android:layout_gravity="center_vertical|end"
android:background="@color/card_back"
/>
+
+
+
diff --git a/app/src/main/res/layout/activity_chat_view.xml b/app/src/main/res/layout/activity_chat_view.xml
index 3abe0e3..85d6fe2 100644
--- a/app/src/main/res/layout/activity_chat_view.xml
+++ b/app/src/main/res/layout/activity_chat_view.xml
@@ -29,9 +29,12 @@
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_create_group.xml b/app/src/main/res/layout/activity_create_group.xml
index be94ffc..cee3b6f 100644
--- a/app/src/main/res/layout/activity_create_group.xml
+++ b/app/src/main/res/layout/activity_create_group.xml
@@ -57,6 +57,4 @@
-
-
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_customize.xml b/app/src/main/res/layout/activity_customize.xml
index 3af6957..9cf3889 100644
--- a/app/src/main/res/layout/activity_customize.xml
+++ b/app/src/main/res/layout/activity_customize.xml
@@ -4,7 +4,8 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
- tools:context=".Settings.CustomiseActivity">
+ tools:context=".Settings.CustomiseActivity"
+ android:background="@color/diffrentBack">
+ >
@@ -130,13 +134,15 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/lang_card"
+ android:layout_marginTop="25dp"
+ app:cardElevation="5dp"
app:layout_constraintTop_toBottomOf="@+id/theme_card"
>
+ >
+ android:textSize="22sp"
+ android:textStyle="bold" />
+ android:layout_toEndOf="@+id/translate_img"
+ android:fontFamily="@font/nunito"
+ android:text="@string/english"
+ android:textColor="@color/blacktext"
+ android:textSize="20dp" />
@@ -189,6 +197,4 @@
-
-
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_dp_view.xml b/app/src/main/res/layout/activity_dp_group.xml
similarity index 99%
rename from app/src/main/res/layout/activity_dp_view.xml
rename to app/src/main/res/layout/activity_dp_group.xml
index 76a7c18..5d155e5 100644
--- a/app/src/main/res/layout/activity_dp_view.xml
+++ b/app/src/main/res/layout/activity_dp_group.xml
@@ -28,6 +28,7 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_edit_group.xml b/app/src/main/res/layout/activity_edit_group.xml
index 2d52dee..a715114 100644
--- a/app/src/main/res/layout/activity_edit_group.xml
+++ b/app/src/main/res/layout/activity_edit_group.xml
@@ -42,8 +42,6 @@
-
-
-
-
-
@@ -315,4 +315,6 @@
-->
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_login.xml b/app/src/main/res/layout/activity_login.xml
deleted file mode 100644
index 6bd336b..0000000
--- a/app/src/main/res/layout/activity_login.xml
+++ /dev/null
@@ -1,101 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index ed7920e..78c28e1 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -81,4 +81,5 @@
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_main_dp.xml b/app/src/main/res/layout/activity_main_dp.xml
index b461740..c2bf514 100644
--- a/app/src/main/res/layout/activity_main_dp.xml
+++ b/app/src/main/res/layout/activity_main_dp.xml
@@ -41,4 +41,5 @@
android:scaleType="centerCrop"/>
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_manage_part.xml b/app/src/main/res/layout/activity_manage_part.xml
index dcdc657..b3407d2 100644
--- a/app/src/main/res/layout/activity_manage_part.xml
+++ b/app/src/main/res/layout/activity_manage_part.xml
@@ -27,5 +27,4 @@
android:layout_marginTop="10dp"
android:layout_below="@+id/bar"
/>
-
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_message.xml b/app/src/main/res/layout/activity_message.xml
index 965447d..8e5e0fc 100644
--- a/app/src/main/res/layout/activity_message.xml
+++ b/app/src/main/res/layout/activity_message.xml
@@ -146,7 +146,7 @@
app:layout_constrainedHeight="true"
android:foregroundGravity="top"
app:recyclerview_damping_ratio="DAMPING_RATIO_LOW_BOUNCY"
- app:recyclerview_stiffness="STIFFNESS_MEDIUM"
+ app:recyclerview_stiffness="STIFFNESS_LOW"
app:allow_drag_reorder="false"
app:allow_item_swipe="true"
@@ -275,50 +275,6 @@
app:layout_constraintStart_toEndOf="@+id/text_send"
app:layout_constraintTop_toTopOf="@+id/text_send"/>
-
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_personal_dp.xml b/app/src/main/res/layout/activity_personal_dp.xml
index b13de1f..cfc8a0c 100644
--- a/app/src/main/res/layout/activity_personal_dp.xml
+++ b/app/src/main/res/layout/activity_personal_dp.xml
@@ -41,4 +41,5 @@
android:scaleType="centerCrop"/>
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_phone_auth.xml b/app/src/main/res/layout/activity_phone_auth.xml
index 04ca0f2..d5bfb78 100644
--- a/app/src/main/res/layout/activity_phone_auth.xml
+++ b/app/src/main/res/layout/activity_phone_auth.xml
@@ -4,7 +4,8 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
- tools:context=".Authentication.PhoneAuthActivity">
+ tools:context=".Authentication.PhoneAuthActivity"
+ android:background="@color/background">
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_phone_setup.xml b/app/src/main/res/layout/activity_phone_setup.xml
index 1b8ada0..d278169 100644
--- a/app/src/main/res/layout/activity_phone_setup.xml
+++ b/app/src/main/res/layout/activity_phone_setup.xml
@@ -4,7 +4,7 @@ xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
-tools:context=".Authentication.setupActivity"
+tools:context=".Authentication.Phone_setupActivity"
android:background="@color/diffrentBack">
-
-
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_privacy.xml b/app/src/main/res/layout/activity_privacy.xml
index c7ca27a..6033b3c 100644
--- a/app/src/main/res/layout/activity_privacy.xml
+++ b/app/src/main/res/layout/activity_privacy.xml
@@ -52,5 +52,4 @@
android:layout_alignParentBottom="true"
android:layout_marginBottom="50dp"/>
-
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_profile_edit.xml b/app/src/main/res/layout/activity_profile_edit.xml
index a1d4690..41bb33f 100644
--- a/app/src/main/res/layout/activity_profile_edit.xml
+++ b/app/src/main/res/layout/activity_profile_edit.xml
@@ -291,4 +291,5 @@
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_register.xml b/app/src/main/res/layout/activity_register.xml
deleted file mode 100644
index 873440b..0000000
--- a/app/src/main/res/layout/activity_register.xml
+++ /dev/null
@@ -1,120 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_reset_password.xml b/app/src/main/res/layout/activity_reset_password.xml
deleted file mode 100644
index ae89c22..0000000
--- a/app/src/main/res/layout/activity_reset_password.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_setup.xml b/app/src/main/res/layout/activity_setup.xml
deleted file mode 100644
index dadeec7..0000000
--- a/app/src/main/res/layout/activity_setup.xml
+++ /dev/null
@@ -1,69 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_start.xml b/app/src/main/res/layout/activity_start.xml
index 09b461c..136321d 100644
--- a/app/src/main/res/layout/activity_start.xml
+++ b/app/src/main/res/layout/activity_start.xml
@@ -8,6 +8,7 @@
tools:context=".Authentication.StartActivity"
android:gravity="center"
android:orientation="vertical"
+ android:background="@color/background"
>
@@ -45,28 +46,6 @@
app:layout_constraintVertical_bias="0.141" />
-
-
-
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_terms__conditions.xml b/app/src/main/res/layout/activity_terms__conditions.xml
index 5214449..1adb998 100644
--- a/app/src/main/res/layout/activity_terms__conditions.xml
+++ b/app/src/main/res/layout/activity_terms__conditions.xml
@@ -5,7 +5,8 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:ads="http://schemas.android.com/apk/res-auto"
- tools:context=".AppDetails.Terms_ConditionsActivity">
+ tools:context=".AppDetails.Terms_ConditionsActivity"
+ android:background="@color/background">
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_verify_o_t_p.xml b/app/src/main/res/layout/activity_verify_o_t_p.xml
index e27e478..d87e494 100644
--- a/app/src/main/res/layout/activity_verify_o_t_p.xml
+++ b/app/src/main/res/layout/activity_verify_o_t_p.xml
@@ -4,7 +4,8 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
- tools:context=".Authentication.VerifyOTP">
+ tools:context=".Authentication.VerifyOTP"
+ android:background="@color/background">
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/add_part_item.xml b/app/src/main/res/layout/add_part_item.xml
index 9c2650a..35fe8c6 100644
--- a/app/src/main/res/layout/add_part_item.xml
+++ b/app/src/main/res/layout/add_part_item.xml
@@ -85,4 +85,6 @@
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/bar_layout.xml b/app/src/main/res/layout/bar_layout.xml
index ef036eb..04e14fc 100644
--- a/app/src/main/res/layout/bar_layout.xml
+++ b/app/src/main/res/layout/bar_layout.xml
@@ -7,6 +7,4 @@
android:background="@color/coral"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:popupTheme="@style/MenuStyle">
-
-
\ No newline at end of file
diff --git a/app/src/main/res/layout/chat_item_right.xml b/app/src/main/res/layout/chat_item_right.xml
index 19c2769..616cfc5 100644
--- a/app/src/main/res/layout/chat_item_right.xml
+++ b/app/src/main/res/layout/chat_item_right.xml
@@ -57,6 +57,4 @@
-
-
\ No newline at end of file
diff --git a/app/src/main/res/layout/chat_reply_left.xml b/app/src/main/res/layout/chat_reply_left.xml
index 13f63f7..05fd1ca 100644
--- a/app/src/main/res/layout/chat_reply_left.xml
+++ b/app/src/main/res/layout/chat_reply_left.xml
@@ -112,5 +112,4 @@
android:layout_below="@+id/show_message"
/>
-
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_accepted.xml b/app/src/main/res/layout/fragment_accepted.xml
index 8b16998..f65b757 100644
--- a/app/src/main/res/layout/fragment_accepted.xml
+++ b/app/src/main/res/layout/fragment_accepted.xml
@@ -1,10 +1,8 @@
-
-
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_blocked.xml b/app/src/main/res/layout/fragment_blocked.xml
index 6da20c8..c6d52f3 100644
--- a/app/src/main/res/layout/fragment_blocked.xml
+++ b/app/src/main/res/layout/fragment_blocked.xml
@@ -10,4 +10,6 @@
android:layout_height="match_parent"
android:id="@+id/Blocked"/>
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_chats.xml b/app/src/main/res/layout/fragment_chats.xml
index e409e8d..2866c56 100644
--- a/app/src/main/res/layout/fragment_chats.xml
+++ b/app/src/main/res/layout/fragment_chats.xml
@@ -12,12 +12,14 @@
android:id="@+id/recycler_view"
android:layout_height="match_parent"
app:recyclerview_damping_ratio="DAMPING_RATIO_LOW_BOUNCY"
- app:recyclerview_stiffness="STIFFNESS_MEDIUM"
+ app:recyclerview_stiffness="STIFFNESS_LOW"
app:allow_drag_reorder="false"
- app:allow_item_swipe="true">
+ app:allow_item_swipe="false">
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_group.xml b/app/src/main/res/layout/fragment_group.xml
index 8c6933c..351a858 100644
--- a/app/src/main/res/layout/fragment_group.xml
+++ b/app/src/main/res/layout/fragment_group.xml
@@ -1,17 +1,10 @@
-
-
+ tools:context=".Fragments.GroupFragment" android:background="@color/background">
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_group_info.xml b/app/src/main/res/layout/fragment_group_info.xml
index ca1f3af..c1ee677 100644
--- a/app/src/main/res/layout/fragment_group_info.xml
+++ b/app/src/main/res/layout/fragment_group_info.xml
@@ -141,6 +141,7 @@
android:id="@+id/participants_name"
app:layout_constrainedHeight="true"
android:background="@color/diffrentBack"
+
app:layout_constraintTop_toBottomOf="@+id/cardView">
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_manage_part.xml b/app/src/main/res/layout/fragment_manage_part.xml
index a45c9b7..3cb0424 100644
--- a/app/src/main/res/layout/fragment_manage_part.xml
+++ b/app/src/main/res/layout/fragment_manage_part.xml
@@ -11,4 +11,5 @@
android:layout_height="match_parent">
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_profile.xml b/app/src/main/res/layout/fragment_profile.xml
deleted file mode 100644
index 7ece75a..0000000
--- a/app/src/main/res/layout/fragment_profile.xml
+++ /dev/null
@@ -1,118 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_users.xml b/app/src/main/res/layout/fragment_users.xml
index f5a7379..4aa525d 100644
--- a/app/src/main/res/layout/fragment_users.xml
+++ b/app/src/main/res/layout/fragment_users.xml
@@ -37,9 +37,9 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
app:recyclerview_damping_ratio="DAMPING_RATIO_LOW_BOUNCY"
- app:recyclerview_stiffness="STIFFNESS_MEDIUM"
+ app:recyclerview_stiffness="STIFFNESS_LOW"
app:allow_drag_reorder="false"
- app:allow_item_swipe="true"
+ app:allow_item_swipe="false"
android:id="@+id/recycler_view"
/>
@@ -47,11 +47,4 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/layout/group_info_pop_up.xml b/app/src/main/res/layout/group_info_pop_up.xml
index 517878a..a01210c 100644
--- a/app/src/main/res/layout/group_info_pop_up.xml
+++ b/app/src/main/res/layout/group_info_pop_up.xml
@@ -196,4 +196,5 @@
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/group_item.xml b/app/src/main/res/layout/group_item.xml
index 9a58843..1b7a1b2 100644
--- a/app/src/main/res/layout/group_item.xml
+++ b/app/src/main/res/layout/group_item.xml
@@ -66,4 +66,5 @@
android:textColor="@color/greytext"/>
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/incoming_call.xml b/app/src/main/res/layout/incoming_call.xml
index efa97e0..afe94c6 100644
--- a/app/src/main/res/layout/incoming_call.xml
+++ b/app/src/main/res/layout/incoming_call.xml
@@ -47,7 +47,6 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.43" />
-
-
\ No newline at end of file
diff --git a/app/src/main/res/layout/new_update_release_notes.xml b/app/src/main/res/layout/new_update_release_notes.xml
new file mode 100644
index 0000000..e5bb5d1
--- /dev/null
+++ b/app/src/main/res/layout/new_update_release_notes.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/outgoing_call.xml b/app/src/main/res/layout/outgoing_call.xml
index b84d9ac..254ea26 100644
--- a/app/src/main/res/layout/outgoing_call.xml
+++ b/app/src/main/res/layout/outgoing_call.xml
@@ -85,6 +85,5 @@
-->
-
diff --git a/app/src/main/res/layout/user_item.xml b/app/src/main/res/layout/user_item.xml
index defd831..fb42dc6 100644
--- a/app/src/main/res/layout/user_item.xml
+++ b/app/src/main/res/layout/user_item.xml
@@ -1,7 +1,8 @@
-
-
+ android:id="@+id/unread"
+ tools:ignore="HardcodedText" />
@@ -101,6 +101,8 @@
android:layout_marginBottom="10dp"
android:maxLines="2"
android:maxLength="500"
+ android:visibility="visible"
+
android:ellipsize="end"
android:layout_marginStart="10dp"
android:textColor="@color/greytext"/>
@@ -111,12 +113,9 @@
android:layout_alignParentEnd="true"
android:id="@+id/date_lastmsg"
- android:visibility="gone"
+ android:visibility="visible"
android:textColor="@color/greytext"/>
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/raw/noti.mp3 b/app/src/main/res/raw/noti.mp3
deleted file mode 100644
index 1886b7b..0000000
Binary files a/app/src/main/res/raw/noti.mp3 and /dev/null differ
diff --git a/app/src/main/res/values-hi-rIN/strings.xml b/app/src/main/res/values-hi-rIN/strings.xml
index a57b219..70e9b2a 100644
--- a/app/src/main/res/values-hi-rIN/strings.xml
+++ b/app/src/main/res/values-hi-rIN/strings.xml
@@ -116,4 +116,5 @@
ठीक है
अब व्यवस्थापक है।
समूह का नाम संपादित करें
+
\ No newline at end of file
diff --git a/app/src/main/res/values-night/themes.xml b/app/src/main/res/values-night/themes.xml
index 9bf9536..03a3345 100644
--- a/app/src/main/res/values-night/themes.xml
+++ b/app/src/main/res/values-night/themes.xml
@@ -10,6 +10,7 @@
- @color/coral
- @color/black
- true
+
- ?attr/colorPrimaryVariant
@@ -28,6 +29,24 @@
- ?attr/colorPrimaryVariant
+
+
+
+