Merge branch 'feature/release-4.1-new-chat-bubbles' into feature/release-4.1
This commit is contained in:
commit
c1c6915481
63 changed files with 1909 additions and 1843 deletions
|
@ -105,10 +105,12 @@ dependencies {
|
|||
implementation 'com.google.firebase:firebase-messaging:15.0.2'
|
||||
implementation 'com.android.billingclient:billing:1.2'
|
||||
implementation 'org.apache.commons:commons-compress:1.16.1'
|
||||
implementation 'com.android.support:support-v4:28.0.0'
|
||||
implementation 'com.android.support:recyclerview-v7:28.0.0'
|
||||
implementation 'com.android.support:appcompat-v7:28.0.0'
|
||||
implementation 'com.android.support:design:28.0.0'
|
||||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||
implementation 'androidx.recyclerview:recyclerview:1.0.0'
|
||||
implementation 'androidx.appcompat:appcompat:1.0.2'
|
||||
implementation 'com.google.android.material:material:1.1.0-alpha01'
|
||||
implementation 'com.google.android:flexbox:1.1.0'
|
||||
|
||||
if (isLocalAarAvailable()) {
|
||||
implementation project(":linphone-sdk-android")
|
||||
} else {
|
||||
|
@ -117,7 +119,6 @@ dependencies {
|
|||
debugImplementation "org.linphone:liblinphone-sdk:${android.defaultConfig.versionName}-DEBUG"
|
||||
}
|
||||
}
|
||||
|
||||
if (firebaseEnabled()) {
|
||||
apply plugin: 'com.google.gms.google-services'
|
||||
}
|
|
@ -282,7 +282,7 @@
|
|||
</service>
|
||||
|
||||
<provider
|
||||
android:name="android.support.v4.content.FileProvider"
|
||||
android:name="androidx.core.content.FileProvider"
|
||||
android:authorities="${applicationId}.provider"
|
||||
android:exported="false"
|
||||
android:grantUriPermissions="true">
|
||||
|
|
|
@ -36,11 +36,11 @@ import android.graphics.drawable.Drawable;
|
|||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.provider.Settings;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v4.app.ActivityCompat;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.support.v4.widget.DrawerLayout;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.core.app.ActivityCompat;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.drawerlayout.widget.DrawerLayout;
|
||||
import android.view.Gravity;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.LayoutInflater;
|
||||
|
|
|
@ -36,8 +36,8 @@ import android.content.pm.PackageManager;
|
|||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.ActivityCompat;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import androidx.core.app.ActivityCompat;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import android.text.TextUtils;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
|
|
|
@ -36,9 +36,9 @@ import android.os.Bundle;
|
|||
import android.os.CountDownTimer;
|
||||
import android.os.Handler;
|
||||
import android.os.SystemClock;
|
||||
import android.support.v4.app.ActivityCompat;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.support.v4.widget.DrawerLayout;
|
||||
import androidx.core.app.ActivityCompat;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.drawerlayout.widget.DrawerLayout;
|
||||
import android.text.Html;
|
||||
import android.view.Gravity;
|
||||
import android.view.KeyEvent;
|
||||
|
|
|
@ -26,7 +26,7 @@ import android.content.Intent;
|
|||
import android.content.pm.ActivityInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.ActivityCompat;
|
||||
import androidx.core.app.ActivityCompat;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.ImageView;
|
||||
|
@ -56,7 +56,6 @@ import org.linphone.views.CallIncomingButtonListener;
|
|||
import org.linphone.views.CallIncomingDeclineButton;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class CallIncomingActivity extends LinphoneGenericActivity {
|
||||
private static CallIncomingActivity instance;
|
||||
|
|
|
@ -23,7 +23,7 @@ import android.Manifest;
|
|||
import android.content.pm.ActivityInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.ActivityCompat;
|
||||
import androidx.core.app.ActivityCompat;
|
||||
import android.view.Gravity;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.LayoutInflater;
|
||||
|
@ -53,7 +53,6 @@ import org.linphone.core.Reason;
|
|||
import org.linphone.mediastream.Log;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class CallOutgoingActivity extends LinphoneGenericActivity implements OnClickListener {
|
||||
private static CallOutgoingActivity instance;
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
package org.linphone.chat;
|
||||
|
||||
/*
|
||||
ChatMessageViewHolder.java
|
||||
Copyright (C) 2017 Belledonne Communications, Grenoble, France
|
||||
|
@ -17,11 +19,22 @@ along with this program; if not, write to the Free Software
|
|||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
package org.linphone.chat;
|
||||
|
||||
import android.Manifest;
|
||||
import android.content.Context;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
|
||||
import androidx.core.content.FileProvider;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.net.Uri;
|
||||
import android.text.Spanned;
|
||||
import android.text.method.LinkMovementMethod;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.webkit.MimeTypeMap;
|
||||
import android.widget.Button;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.ImageView;
|
||||
|
@ -30,39 +43,54 @@ import android.widget.ProgressBar;
|
|||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.google.android.flexbox.FlexboxLayout;
|
||||
|
||||
import org.linphone.LinphoneActivity;
|
||||
import org.linphone.R;
|
||||
import org.linphone.contacts.ContactsManager;
|
||||
import org.linphone.contacts.LinphoneContact;
|
||||
import org.linphone.core.Address;
|
||||
import org.linphone.core.ChatMessage;
|
||||
import org.linphone.core.ChatMessageListenerStub;
|
||||
import org.linphone.core.Content;
|
||||
import org.linphone.mediastream.Log;
|
||||
import org.linphone.utils.FileUtils;
|
||||
import org.linphone.utils.LinphoneUtils;
|
||||
import org.linphone.views.AsyncBitmap;
|
||||
import org.linphone.views.BitmapWorkerTask;
|
||||
import org.linphone.views.ContactAvatar;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static android.content.Intent.FLAG_GRANT_READ_URI_PERMISSION;
|
||||
|
||||
public class ChatMessageViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
|
||||
public String messageId;
|
||||
public Context mContext;
|
||||
private Context mContext;
|
||||
|
||||
public ChatMessage message;
|
||||
|
||||
public LinearLayout eventLayout;
|
||||
public TextView eventMessage;
|
||||
|
||||
public LinearLayout securityEventLayout;
|
||||
public TextView securityEventMessage;
|
||||
|
||||
public View rightAnchor;
|
||||
public RelativeLayout bubbleLayout;
|
||||
public LinearLayout separatorLayout;
|
||||
public LinearLayout background;
|
||||
public RelativeLayout avatarLayout;
|
||||
public TextView contactName;
|
||||
|
||||
public ImageView messageStatus;
|
||||
public ProgressBar messageSendingInProgress;
|
||||
public LinearLayout imdmLayout;
|
||||
public ImageView imdmIcon;
|
||||
public TextView imdmLabel;
|
||||
|
||||
public ProgressBar sendInProgress;
|
||||
public TextView timeText;
|
||||
public ImageView outgoingImdn;
|
||||
public TextView messageText;
|
||||
public ImageView messageImage;
|
||||
|
||||
public RelativeLayout fileTransferLayout;
|
||||
public ProgressBar fileTransferProgressBar;
|
||||
public Button fileTransferAction;
|
||||
public FlexboxLayout pictures;
|
||||
|
||||
public TextView fileName;
|
||||
public Button openFileButton;
|
||||
|
||||
public CheckBox delete;
|
||||
public CheckBox deleteEvent;
|
||||
public CheckBox deleteMessage;
|
||||
private ClickListener mListener;
|
||||
|
||||
public ChatMessageViewHolder(Context context, View view, ClickListener listener) {
|
||||
|
@ -75,32 +103,25 @@ public class ChatMessageViewHolder extends RecyclerView.ViewHolder implements Vi
|
|||
public ChatMessageViewHolder(View view) {
|
||||
super(view);
|
||||
eventLayout = view.findViewById(R.id.event);
|
||||
//eventTime = view.findViewById(R.id.event_date);
|
||||
eventMessage = view.findViewById(R.id.event_text);
|
||||
|
||||
securityEventLayout = view.findViewById(R.id.security_event);
|
||||
securityEventMessage = view.findViewById(R.id.security_event_text);
|
||||
|
||||
rightAnchor = view.findViewById(R.id.rightAnchor);
|
||||
bubbleLayout = view.findViewById(R.id.bubble);
|
||||
background = view.findViewById(R.id.background);
|
||||
avatarLayout = view.findViewById(R.id.avatar_layout);
|
||||
contactName = view.findViewById(R.id.contact_header);
|
||||
|
||||
messageStatus = view.findViewById(R.id.status);
|
||||
messageSendingInProgress = view.findViewById(R.id.inprogress);
|
||||
imdmLayout = view.findViewById(R.id.imdmLayout);
|
||||
imdmIcon = view.findViewById(R.id.imdmIcon);
|
||||
imdmLabel = view.findViewById(R.id.imdmText);
|
||||
|
||||
sendInProgress = view.findViewById(R.id.send_in_progress);
|
||||
timeText = view.findViewById(R.id.time);
|
||||
outgoingImdn = view.findViewById(R.id.imdn);
|
||||
messageText = view.findViewById(R.id.message);
|
||||
messageImage = view.findViewById(R.id.image);
|
||||
separatorLayout = view.findViewById(R.id.separator);
|
||||
|
||||
fileTransferLayout = view.findViewById(R.id.file_transfer_layout);
|
||||
fileTransferProgressBar = view.findViewById(R.id.progress_bar);
|
||||
fileTransferAction = view.findViewById(R.id.file_transfer_action);
|
||||
pictures = view.findViewById(R.id.pictures);
|
||||
|
||||
fileName = view.findViewById(R.id.file_name);
|
||||
openFileButton = view.findViewById(R.id.open_file);
|
||||
|
||||
delete = view.findViewById(R.id.delete_message);
|
||||
deleteEvent = view.findViewById(R.id.delete_event);
|
||||
deleteMessage = view.findViewById(R.id.delete_message);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -113,4 +134,213 @@ public class ChatMessageViewHolder extends RecyclerView.ViewHolder implements Vi
|
|||
public interface ClickListener {
|
||||
void onItemClicked(int position);
|
||||
}
|
||||
|
||||
public void bindMessage(final ChatMessage message, LinphoneContact contact) {
|
||||
eventLayout.setVisibility(View.GONE);
|
||||
securityEventLayout.setVisibility(View.GONE);
|
||||
rightAnchor.setVisibility(View.VISIBLE);
|
||||
bubbleLayout.setVisibility(View.VISIBLE);
|
||||
messageText.setVisibility(View.GONE);
|
||||
timeText.setVisibility(View.VISIBLE);
|
||||
outgoingImdn.setVisibility(View.GONE);
|
||||
avatarLayout.setVisibility(View.GONE);
|
||||
sendInProgress.setVisibility(View.GONE);
|
||||
pictures.setVisibility(View.GONE);
|
||||
pictures.removeAllViews();
|
||||
|
||||
ChatMessage.State status = message.getState();
|
||||
Address remoteSender = message.getFromAddress();
|
||||
String displayName;
|
||||
String time = LinphoneUtils.timestampToHumanDate(mContext, message.getTime(), R.string.messages_date_format);
|
||||
|
||||
if (message.isOutgoing()) {
|
||||
outgoingImdn.setVisibility(View.INVISIBLE); // For anchoring purposes
|
||||
|
||||
if (status == ChatMessage.State.DeliveredToUser) {
|
||||
outgoingImdn.setVisibility(View.VISIBLE);
|
||||
outgoingImdn.setImageResource(R.drawable.imdn_received);
|
||||
} else if (status == ChatMessage.State.Displayed) {
|
||||
outgoingImdn.setVisibility(View.VISIBLE);
|
||||
outgoingImdn.setImageResource(R.drawable.imdn_read);
|
||||
} else if (status == ChatMessage.State.NotDelivered) {
|
||||
outgoingImdn.setVisibility(View.VISIBLE);
|
||||
outgoingImdn.setImageResource(R.drawable.imdn_error);
|
||||
} else if (status == ChatMessage.State.FileTransferError) {
|
||||
outgoingImdn.setVisibility(View.VISIBLE);
|
||||
outgoingImdn.setImageResource(R.drawable.imdn_error);
|
||||
} else if (status == ChatMessage.State.InProgress) {
|
||||
sendInProgress.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
timeText.setVisibility(View.VISIBLE);
|
||||
background.setBackgroundResource(R.drawable.chat_bubble_outgoing_full);
|
||||
} else {
|
||||
rightAnchor.setVisibility(View.GONE);
|
||||
avatarLayout.setVisibility(View.VISIBLE);
|
||||
background.setBackgroundResource(R.drawable.chat_bubble_incoming_full);
|
||||
}
|
||||
|
||||
if (contact == null) {
|
||||
contact = ContactsManager.getInstance().findContactFromAddress(remoteSender);
|
||||
}
|
||||
if (contact != null) {
|
||||
if (contact.getFullName() != null) {
|
||||
displayName = contact.getFullName();
|
||||
} else {
|
||||
displayName = LinphoneUtils.getAddressDisplayName(remoteSender);
|
||||
}
|
||||
ContactAvatar.displayAvatar(contact, avatarLayout);
|
||||
} else {
|
||||
displayName = LinphoneUtils.getAddressDisplayName(remoteSender);
|
||||
ContactAvatar.displayAvatar(displayName, avatarLayout);
|
||||
}
|
||||
|
||||
if (message.isOutgoing()) {
|
||||
timeText.setText(time);
|
||||
} else {
|
||||
timeText.setText(time + " - " + displayName);
|
||||
}
|
||||
|
||||
if (message.hasTextContent()) {
|
||||
String msg = message.getTextContent();
|
||||
Spanned text = LinphoneUtils.getTextWithHttpLinks(msg);
|
||||
messageText.setText(text);
|
||||
messageText.setMovementMethod(LinkMovementMethod.getInstance());
|
||||
messageText.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
List<Content> fileContents = new ArrayList<>();
|
||||
for (Content c : message.getContents()) {
|
||||
if (c.isFile() || c.isFileTransfer()) {
|
||||
fileContents.add(c);
|
||||
}
|
||||
}
|
||||
|
||||
if (fileContents.size() > 0) {
|
||||
pictures.setVisibility(View.VISIBLE);
|
||||
for (Content c : fileContents) {
|
||||
View content = LayoutInflater.from(mContext).inflate(R.layout.chat_bubble_content, null, false);
|
||||
|
||||
if (c.isFile()) {
|
||||
String filePath = c.getFilePath();
|
||||
|
||||
View v;
|
||||
if (FileUtils.isExtensionImage(filePath)) {
|
||||
v = content.findViewById(R.id.image);
|
||||
loadBitmap(c.getFilePath(), ((ImageView)v));
|
||||
} else {
|
||||
v = content.findViewById(R.id.file);
|
||||
((TextView)v).setText(FileUtils.getNameFromFilePath(filePath));
|
||||
}
|
||||
v.setVisibility(View.VISIBLE);
|
||||
v.setTag(c.getFilePath());
|
||||
v.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
openFile((String) v.getTag());
|
||||
}
|
||||
});
|
||||
} else {
|
||||
Button download = content.findViewById(R.id.download);
|
||||
download.setVisibility(View.VISIBLE);
|
||||
|
||||
if (mContext.getPackageManager().checkPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE, mContext.getPackageName()) == PackageManager.PERMISSION_GRANTED) {
|
||||
String filename = c.getName();
|
||||
File file = new File(FileUtils.getStorageDirectory(mContext), filename);
|
||||
|
||||
int prefix = 1;
|
||||
while (file.exists()) {
|
||||
file = new File(FileUtils.getStorageDirectory(mContext), prefix + "_" + filename);
|
||||
Log.w("File with that name already exists, renamed to " + prefix + "_" + filename);
|
||||
prefix += 1;
|
||||
}
|
||||
|
||||
download.setTag(c);
|
||||
c.setFilePath(file.getPath());
|
||||
download.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Content c = (Content) v.getTag();
|
||||
message.downloadContent(c);
|
||||
}
|
||||
});
|
||||
|
||||
message.setListener(new ChatMessageListenerStub() {
|
||||
@Override
|
||||
public void onMsgStateChanged(ChatMessage msg, ChatMessage.State state) {
|
||||
//TODO: invalidate
|
||||
}
|
||||
});
|
||||
} else {
|
||||
Log.w("WRITE_EXTERNAL_STORAGE permission not granted, won't be able to store the downloaded file");
|
||||
LinphoneActivity.instance().checkAndRequestExternalStoragePermission();
|
||||
}
|
||||
}
|
||||
|
||||
pictures.addView(content);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void openFile(String path) {
|
||||
Intent intent = new Intent(Intent.ACTION_VIEW);
|
||||
File file;
|
||||
Uri contentUri;
|
||||
if (path.startsWith("file://")) {
|
||||
path = path.substring("file://".length());
|
||||
file = new File(path);
|
||||
contentUri = FileProvider.getUriForFile(mContext, mContext.getResources().getString(R.string.file_provider), file);
|
||||
} else if (path.startsWith("content://")) {
|
||||
contentUri = Uri.parse(path);
|
||||
} else {
|
||||
file = new File(path);
|
||||
try {
|
||||
contentUri = FileProvider.getUriForFile(mContext, mContext.getResources().getString(R.string.file_provider), file);
|
||||
} catch (Exception e) {
|
||||
contentUri = Uri.parse(path);
|
||||
}
|
||||
}
|
||||
|
||||
String type = null;
|
||||
String extension = MimeTypeMap.getFileExtensionFromUrl(contentUri.toString());
|
||||
if (extension != null) {
|
||||
type = MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension);
|
||||
}
|
||||
if (type != null) {
|
||||
intent.setDataAndType(contentUri, type);
|
||||
} else {
|
||||
intent.setDataAndType(contentUri, "*/*");
|
||||
}
|
||||
intent.addFlags(FLAG_GRANT_READ_URI_PERMISSION);
|
||||
mContext.startActivity(intent);
|
||||
}
|
||||
|
||||
private void loadBitmap(String path, ImageView imageView) {
|
||||
if (cancelPotentialWork(path, imageView)) {
|
||||
Bitmap defaultBitmap = BitmapFactory.decodeResource(mContext.getResources(), R.drawable.chat_file);
|
||||
BitmapWorkerTask task = new BitmapWorkerTask(mContext, imageView, defaultBitmap);
|
||||
final AsyncBitmap asyncBitmap = new AsyncBitmap(mContext.getResources(), defaultBitmap, task);
|
||||
imageView.setImageDrawable(asyncBitmap);
|
||||
task.execute(path);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean cancelPotentialWork(String path, ImageView imageView) {
|
||||
final BitmapWorkerTask bitmapWorkerTask = BitmapWorkerTask.getBitmapWorkerTask(imageView);
|
||||
|
||||
if (bitmapWorkerTask != null) {
|
||||
final String bitmapData = bitmapWorkerTask.path;
|
||||
// If bitmapData is not yet set or it differs from the new data
|
||||
if (bitmapData == null || bitmapData != path) {
|
||||
// Cancel previous task
|
||||
bitmapWorkerTask.cancel(true);
|
||||
} else {
|
||||
// The same work is already in progress
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// No task associated with the ImageView, or an existing task was cancelled
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
|
@ -19,72 +19,36 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
|
||||
package org.linphone.chat;
|
||||
|
||||
import android.Manifest;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.graphics.Matrix;
|
||||
import android.graphics.drawable.BitmapDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.media.ExifInterface;
|
||||
import android.net.Uri;
|
||||
import android.os.AsyncTask;
|
||||
import android.provider.MediaStore;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v4.content.FileProvider;
|
||||
import android.text.Spanned;
|
||||
import android.text.method.LinkMovementMethod;
|
||||
import androidx.annotation.NonNull;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.webkit.MimeTypeMap;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.RelativeLayout;
|
||||
|
||||
import org.linphone.LinphoneManager;
|
||||
import org.linphone.utils.FileUtils;
|
||||
import org.linphone.utils.LinphoneUtils;
|
||||
import org.linphone.R;
|
||||
import org.linphone.LinphoneActivity;
|
||||
import org.linphone.compatibility.Compatibility;
|
||||
import org.linphone.contacts.ContactsManager;
|
||||
import org.linphone.contacts.LinphoneContact;
|
||||
import org.linphone.core.Address;
|
||||
import org.linphone.core.ChatMessage;
|
||||
import org.linphone.core.ChatMessageListenerStub;
|
||||
import org.linphone.core.Content;
|
||||
import org.linphone.core.EventLog;
|
||||
import org.linphone.core.LimeState;
|
||||
import org.linphone.mediastream.Log;
|
||||
import org.linphone.views.ContactAvatar;
|
||||
import org.linphone.utils.SelectableAdapter;
|
||||
import org.linphone.utils.SelectableHelper;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import static android.content.Intent.FLAG_GRANT_READ_URI_PERMISSION;
|
||||
|
||||
public class ChatMessagesAdapter extends SelectableAdapter<ChatMessageViewHolder> {
|
||||
public static int MAX_TIME_TO_GROUP_MESSAGES = 60;
|
||||
|
||||
private static int MARGIN_BETWEEN_MESSAGES = 10;
|
||||
private static int SIDE_MARGIN = 100;
|
||||
private Context mContext;
|
||||
private List<EventLog> mHistory;
|
||||
private List<LinphoneContact> mParticipants;
|
||||
private int mItemResource;
|
||||
private Bitmap mDefaultBitmap;
|
||||
private ChatMessagesFragment mFragment;
|
||||
private ChatMessageListenerStub mListener;
|
||||
|
||||
private ChatMessageViewHolder.ClickListener mClickListener;
|
||||
|
||||
|
@ -97,42 +61,6 @@ public class ChatMessagesAdapter extends SelectableAdapter<ChatMessageViewHolder
|
|||
Collections.reverse(mHistory);
|
||||
mParticipants = participants;
|
||||
mClickListener = clickListener;
|
||||
mListener = new ChatMessageListenerStub() {
|
||||
@Override
|
||||
public void onFileTransferProgressIndication(ChatMessage message, Content content, int offset, int total) {
|
||||
ChatMessageViewHolder holder = (ChatMessageViewHolder) message.getUserData();
|
||||
if (holder == null) return;
|
||||
|
||||
if (offset == total) {
|
||||
holder.fileTransferProgressBar.setVisibility(View.GONE);
|
||||
holder.fileTransferAction.setVisibility(View.GONE);
|
||||
holder.fileTransferLayout.setVisibility(View.GONE);
|
||||
|
||||
displayAttachedFile(message, holder);
|
||||
} else {
|
||||
holder.fileTransferProgressBar.setVisibility(View.VISIBLE);
|
||||
holder.fileTransferProgressBar.setProgress(offset * 100 / total);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMsgStateChanged(ChatMessage message, ChatMessage.State state) {
|
||||
if (state == ChatMessage.State.FileTransferDone) {
|
||||
if (!message.isOutgoing()) {
|
||||
message.setAppdata(message.getFileTransferFilepath());
|
||||
}
|
||||
message.setFileTransferFilepath(null); // Not needed anymore, will help differenciate between InProgress states for file transfer / message sending
|
||||
}
|
||||
for (int i = 0; i < mHistory.size(); i++) {
|
||||
EventLog log = mHistory.get(i);
|
||||
if (log.getType() == EventLog.Type.ConferenceChatMessage && log.getChatMessage() == message) {
|
||||
notifyItemChanged(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -149,219 +77,56 @@ public class ChatMessagesAdapter extends SelectableAdapter<ChatMessageViewHolder
|
|||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull final ChatMessageViewHolder holder, int position) {
|
||||
final EventLog event = mHistory.get(position);
|
||||
holder.eventLayout.setVisibility(View.GONE);
|
||||
holder.bubbleLayout.setVisibility(View.GONE);
|
||||
holder.delete.setVisibility(isEditionEnabled() ? View.VISIBLE : View.GONE);
|
||||
holder.messageText.setVisibility(View.GONE);
|
||||
holder.messageImage.setVisibility(View.GONE);
|
||||
holder.fileTransferLayout.setVisibility(View.GONE);
|
||||
holder.fileTransferProgressBar.setProgress(0);
|
||||
holder.fileTransferAction.setEnabled(true);
|
||||
holder.fileName.setVisibility(View.GONE);
|
||||
holder.openFileButton.setVisibility(View.GONE);
|
||||
holder.messageStatus.setVisibility(View.INVISIBLE);
|
||||
holder.messageSendingInProgress.setVisibility(View.GONE);
|
||||
holder.imdmLayout.setVisibility(View.INVISIBLE);
|
||||
EventLog event = mHistory.get(position);
|
||||
|
||||
if (isEditionEnabled()) {
|
||||
holder.delete.setOnCheckedChangeListener(null);
|
||||
holder.delete.setChecked(isSelected(position));
|
||||
holder.delete.setTag(position);
|
||||
}
|
||||
holder.deleteEvent.setVisibility(View.GONE);
|
||||
holder.deleteMessage.setVisibility(View.GONE);
|
||||
holder.eventLayout.setVisibility(View.GONE);
|
||||
holder.securityEventLayout.setVisibility(View.GONE);
|
||||
holder.rightAnchor.setVisibility(View.GONE);
|
||||
holder.bubbleLayout.setVisibility(View.GONE);
|
||||
holder.sendInProgress.setVisibility(View.GONE);
|
||||
|
||||
if (event.getType() == EventLog.Type.ConferenceChatMessage) {
|
||||
holder.bubbleLayout.setVisibility(View.VISIBLE);
|
||||
final ChatMessage message = event.getChatMessage();
|
||||
|
||||
if (position > 0 && mContext.getResources().getBoolean(R.bool.lower_space_between_chat_bubbles_if_same_person)) {
|
||||
EventLog previousEvent = (EventLog) getItem(position - 1);
|
||||
if (previousEvent.getType() == EventLog.Type.ConferenceChatMessage) {
|
||||
ChatMessage previousMessage = previousEvent.getChatMessage();
|
||||
if (previousMessage.getFromAddress().weakEqual(message.getFromAddress())) {
|
||||
holder.separatorLayout.setVisibility(View.GONE);
|
||||
}
|
||||
} else {
|
||||
// No separator if previous event is not a message
|
||||
holder.separatorLayout.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
holder.messageId = message.getMessageId();
|
||||
ChatMessage message = event.getChatMessage();
|
||||
message.setUserData(holder);
|
||||
|
||||
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT);
|
||||
if (isEditionEnabled()) {
|
||||
holder.deleteMessage.setVisibility(View.VISIBLE);
|
||||
holder.deleteMessage.setChecked(isSelected(position));
|
||||
holder.deleteMessage.setTag(position);
|
||||
}
|
||||
|
||||
ChatMessage.State status = message.getState();
|
||||
Address remoteSender = message.getFromAddress();
|
||||
String displayName;
|
||||
if (message.isOutgoing() && message.getState() != ChatMessage.State.Displayed) {
|
||||
message.setListener(new ChatMessageListenerStub() {
|
||||
@Override
|
||||
public void onMsgStateChanged(ChatMessage message, ChatMessage.State state) {
|
||||
ChatMessageViewHolder holder = (ChatMessageViewHolder) message.getUserData();
|
||||
if (holder != null) {
|
||||
notifyItemChanged(holder.getAdapterPosition());
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
LinphoneContact contact = null;
|
||||
if (message.isOutgoing()) {
|
||||
message.setListener(mListener);
|
||||
|
||||
if (status == ChatMessage.State.InProgress) {
|
||||
holder.messageSendingInProgress.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
if (!message.isSecured() && LinphoneManager.getLc().limeEnabled() == LimeState.Mandatory && status != ChatMessage.State.InProgress) {
|
||||
holder.messageStatus.setVisibility(View.VISIBLE);
|
||||
holder.messageStatus.setImageResource(R.drawable.chat_unsecure);
|
||||
}
|
||||
|
||||
if (status == ChatMessage.State.DeliveredToUser) {
|
||||
holder.imdmLayout.setVisibility(View.VISIBLE);
|
||||
holder.imdmIcon.setImageResource(R.drawable.imdn_received);
|
||||
holder.imdmLabel.setText(R.string.delivered);
|
||||
holder.imdmLabel.setTextColor(mContext.getResources().getColor(R.color.colorD));
|
||||
} else if (status == ChatMessage.State.Displayed) {
|
||||
holder.imdmLayout.setVisibility(View.VISIBLE);
|
||||
holder.imdmIcon.setImageResource(R.drawable.imdn_read);
|
||||
holder.imdmLabel.setText(R.string.displayed);
|
||||
holder.imdmLabel.setTextColor(mContext.getResources().getColor(R.color.colorK));
|
||||
} else if (status == ChatMessage.State.NotDelivered) {
|
||||
holder.imdmLayout.setVisibility(View.VISIBLE);
|
||||
holder.imdmIcon.setImageResource(R.drawable.imdn_error);
|
||||
holder.imdmLabel.setText(R.string.error);
|
||||
holder.imdmLabel.setTextColor(mContext.getResources().getColor(R.color.colorI));
|
||||
} else if (status == ChatMessage.State.FileTransferError) {
|
||||
holder.imdmLayout.setVisibility(View.VISIBLE);
|
||||
holder.imdmIcon.setImageResource(R.drawable.imdn_error);
|
||||
holder.imdmLabel.setText(R.string.file_transfer_error);
|
||||
holder.imdmLabel.setTextColor(mContext.getResources().getColor(R.color.colorI));
|
||||
}
|
||||
|
||||
//layoutParams allow bubbles alignment during selection mode
|
||||
if (isEditionEnabled()) {
|
||||
layoutParams.addRule(RelativeLayout.LEFT_OF, holder.delete.getId());
|
||||
layoutParams.setMargins(SIDE_MARGIN, MARGIN_BETWEEN_MESSAGES / 2, 0, MARGIN_BETWEEN_MESSAGES / 2);
|
||||
} else {
|
||||
layoutParams.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);
|
||||
layoutParams.setMargins(SIDE_MARGIN, MARGIN_BETWEEN_MESSAGES / 2, 0, MARGIN_BETWEEN_MESSAGES / 2);
|
||||
}
|
||||
|
||||
holder.background.setBackgroundResource(R.drawable.resizable_chat_bubble_outgoing);
|
||||
Compatibility.setTextAppearance(holder.contactName, mContext, R.style.font3);
|
||||
Compatibility.setTextAppearance(holder.fileTransferAction, mContext, R.style.font15);
|
||||
holder.fileTransferAction.setBackgroundResource(R.drawable.resizable_confirm_delete_button);
|
||||
ContactAvatar.setAvatarMask(holder.avatarLayout, R.drawable.avatar_chat_mask_outgoing);
|
||||
} else {
|
||||
Address remoteSender = message.getFromAddress();
|
||||
if (!message.isOutgoing()) {
|
||||
for (LinphoneContact c : mParticipants) {
|
||||
if (c != null && c.hasAddress(remoteSender.asStringUriOnly())) {
|
||||
contact = c;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (isEditionEnabled()) {
|
||||
layoutParams.addRule(RelativeLayout.LEFT_OF, holder.delete.getId());
|
||||
layoutParams.setMargins(SIDE_MARGIN, MARGIN_BETWEEN_MESSAGES / 2, 0, MARGIN_BETWEEN_MESSAGES / 2);
|
||||
} else {
|
||||
layoutParams.addRule(RelativeLayout.ALIGN_PARENT_LEFT);
|
||||
layoutParams.setMargins(0, MARGIN_BETWEEN_MESSAGES / 2, SIDE_MARGIN, MARGIN_BETWEEN_MESSAGES / 2);
|
||||
}
|
||||
|
||||
holder.background.setBackgroundResource(R.drawable.resizable_chat_bubble_incoming);
|
||||
Compatibility.setTextAppearance(holder.contactName, mContext, R.style.font9);
|
||||
Compatibility.setTextAppearance(holder.fileTransferAction, mContext, R.style.font8);
|
||||
holder.fileTransferAction.setBackgroundResource(R.drawable.resizable_assistant_button);
|
||||
ContactAvatar.setAvatarMask(holder.avatarLayout, R.drawable.avatar_chat_mask);
|
||||
}
|
||||
|
||||
if (contact == null) {
|
||||
contact = ContactsManager.getInstance().findContactFromAddress(remoteSender);
|
||||
}
|
||||
if (contact != null) {
|
||||
if (contact.getFullName() != null) {
|
||||
displayName = contact.getFullName();
|
||||
} else {
|
||||
displayName = LinphoneUtils.getAddressDisplayName(remoteSender);
|
||||
}
|
||||
ContactAvatar.displayAvatar(contact, holder.avatarLayout);
|
||||
} else {
|
||||
displayName = LinphoneUtils.getAddressDisplayName(remoteSender);
|
||||
ContactAvatar.displayAvatar(displayName, holder.avatarLayout);
|
||||
}
|
||||
holder.contactName.setText(LinphoneUtils.timestampToHumanDate(mContext, message.getTime(), R.string.messages_date_format) + " - " + displayName);
|
||||
|
||||
if (message.hasTextContent()) {
|
||||
String msg = message.getTextContent();
|
||||
Spanned text = LinphoneUtils.getTextWithHttpLinks(msg);
|
||||
holder.messageText.setText(text);
|
||||
holder.messageText.setMovementMethod(LinkMovementMethod.getInstance());
|
||||
holder.messageText.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
String externalBodyUrl = message.getExternalBodyUrl();
|
||||
Content fileTransferContent = message.getFileTransferInformation();
|
||||
|
||||
boolean hasFile = message.getAppdata() != null;
|
||||
boolean hasFileTransfer = externalBodyUrl != null;
|
||||
for (Content c : message.getContents()) {
|
||||
if (c.isFile()) {
|
||||
hasFile = true;
|
||||
} else if (c.isFileTransfer()) {
|
||||
hasFileTransfer = true;
|
||||
}
|
||||
}
|
||||
if (hasFile) { // Something to display
|
||||
displayAttachedFile(message, holder);
|
||||
}
|
||||
|
||||
if (hasFileTransfer) { // Incoming file transfer not yet downloaded
|
||||
holder.fileName.setVisibility(View.VISIBLE);
|
||||
holder.fileName.setText(fileTransferContent.getName());
|
||||
|
||||
holder.fileTransferLayout.setVisibility(View.VISIBLE);
|
||||
holder.fileTransferProgressBar.setVisibility(View.GONE);
|
||||
if (message.isFileTransferInProgress()) { // Incoming file transfer in progress
|
||||
holder.fileTransferAction.setVisibility(View.GONE);
|
||||
} else {
|
||||
holder.fileTransferAction.setText(mContext.getString(R.string.accept));
|
||||
holder.fileTransferAction.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (mContext.getPackageManager().checkPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE, mContext.getPackageName()) == PackageManager.PERMISSION_GRANTED) {
|
||||
v.setEnabled(false);
|
||||
String filename = message.getFileTransferInformation().getName();
|
||||
File file = new File(FileUtils.getStorageDirectory(mContext), filename);
|
||||
int prefix = 1;
|
||||
while (file.exists()) {
|
||||
file = new File(FileUtils.getStorageDirectory(mContext), prefix + "_" + filename);
|
||||
Log.w("File with that name already exists, renamed to " + prefix + "_" + filename);
|
||||
prefix += 1;
|
||||
}
|
||||
message.setListener(mListener);
|
||||
message.setFileTransferFilepath(file.getPath());
|
||||
message.downloadFile();
|
||||
|
||||
} else {
|
||||
Log.w("WRITE_EXTERNAL_STORAGE permission not granted, won't be able to store the downloaded file");
|
||||
LinphoneActivity.instance().checkAndRequestExternalStoragePermission();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
} else if (message.isFileTransferInProgress()) { // Outgoing file transfer in progress
|
||||
message.setListener(mListener); // add the listener for file upload progress display
|
||||
holder.messageSendingInProgress.setVisibility(View.GONE);
|
||||
holder.fileTransferLayout.setVisibility(View.VISIBLE);
|
||||
holder.fileTransferAction.setText(mContext.getString(R.string.cancel));
|
||||
holder.fileTransferAction.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
message.cancelFileTransfer();
|
||||
notifyItemChanged(holder.getAdapterPosition());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
holder.bubbleLayout.setLayoutParams(layoutParams);
|
||||
holder.bindMessage(message, contact);
|
||||
changeBackgroundDependingOnPreviousAndNextEvents(message, holder, position);
|
||||
} else { // Event is not chat message
|
||||
holder.eventLayout.setVisibility(View.VISIBLE);
|
||||
holder.eventMessage.setTextColor(mContext.getResources().getColor(R.color.colorE));
|
||||
holder.eventLayout.setBackgroundResource(R.drawable.event_decoration_gray);
|
||||
holder.eventLayout.setBackgroundResource(R.drawable.event_decoration_gray);
|
||||
if (isEditionEnabled()) {
|
||||
holder.deleteEvent.setVisibility(View.VISIBLE);
|
||||
holder.deleteEvent.setChecked(isSelected(position));
|
||||
holder.deleteEvent.setTag(position);
|
||||
}
|
||||
|
||||
Address address = event.getParticipantAddress();
|
||||
if (address == null && event.getType() == EventLog.Type.ConferenceSecurityEvent) {
|
||||
|
@ -379,49 +144,56 @@ public class ChatMessagesAdapter extends SelectableAdapter<ChatMessageViewHolder
|
|||
|
||||
switch (event.getType()) {
|
||||
case ConferenceCreated:
|
||||
holder.eventLayout.setVisibility(View.VISIBLE);
|
||||
holder.eventMessage.setText(mContext.getString(R.string.conference_created));
|
||||
break;
|
||||
case ConferenceTerminated:
|
||||
holder.eventLayout.setVisibility(View.VISIBLE);
|
||||
holder.eventMessage.setText(mContext.getString(R.string.conference_destroyed));
|
||||
break;
|
||||
case ConferenceParticipantAdded:
|
||||
holder.eventLayout.setVisibility(View.VISIBLE);
|
||||
holder.eventMessage.setText(mContext.getString(R.string.participant_added).replace("%s", displayName));
|
||||
break;
|
||||
case ConferenceParticipantRemoved:
|
||||
holder.eventLayout.setVisibility(View.VISIBLE);
|
||||
holder.eventMessage.setText(mContext.getString(R.string.participant_removed).replace("%s", displayName));
|
||||
break;
|
||||
case ConferenceSubjectChanged:
|
||||
holder.eventLayout.setVisibility(View.VISIBLE);
|
||||
holder.eventMessage.setText(mContext.getString(R.string.subject_changed).replace("%s", event.getSubject()));
|
||||
break;
|
||||
case ConferenceParticipantSetAdmin:
|
||||
holder.eventLayout.setVisibility(View.VISIBLE);
|
||||
holder.eventMessage.setText(mContext.getString(R.string.admin_set).replace("%s", displayName));
|
||||
break;
|
||||
case ConferenceParticipantUnsetAdmin:
|
||||
holder.eventLayout.setVisibility(View.VISIBLE);
|
||||
holder.eventMessage.setText(mContext.getString(R.string.admin_unset).replace("%s", displayName));
|
||||
break;
|
||||
case ConferenceParticipantDeviceAdded:
|
||||
holder.eventLayout.setVisibility(View.VISIBLE);
|
||||
holder.eventMessage.setText(mContext.getString(R.string.device_added).replace("%s", displayName));
|
||||
break;
|
||||
case ConferenceParticipantDeviceRemoved:
|
||||
holder.eventLayout.setVisibility(View.VISIBLE);
|
||||
holder.eventMessage.setText(mContext.getString(R.string.device_removed).replace("%s", displayName));
|
||||
break;
|
||||
case ConferenceSecurityEvent:
|
||||
holder.eventMessage.setTextColor(mContext.getResources().getColor(R.color.colorI));
|
||||
holder.eventLayout.setBackgroundResource(R.drawable.event_decoration_red);
|
||||
holder.eventLayout.setBackgroundResource(R.drawable.event_decoration_red);
|
||||
holder.securityEventLayout.setVisibility(View.VISIBLE);
|
||||
|
||||
switch (event.getSecurityEventType()) {
|
||||
case EncryptionIdentityKeyChanged:
|
||||
holder.eventMessage.setText(mContext.getString(R.string.lime_identity_key_changed).replace("%s", displayName));
|
||||
holder.securityEventMessage.setText(mContext.getString(R.string.lime_identity_key_changed).replace("%s", displayName));
|
||||
break;
|
||||
case ManInTheMiddleDetected:
|
||||
holder.eventMessage.setText(mContext.getString(R.string.man_in_the_middle_detected).replace("%s", displayName));
|
||||
holder.securityEventMessage.setText(mContext.getString(R.string.man_in_the_middle_detected).replace("%s", displayName));
|
||||
break;
|
||||
case SecurityLevelDowngraded:
|
||||
holder.eventMessage.setText(mContext.getString(R.string.security_level_downgraded).replace("%s", displayName));
|
||||
holder.securityEventMessage.setText(mContext.getString(R.string.security_level_downgraded).replace("%s", displayName));
|
||||
break;
|
||||
case ParticipantMaxDeviceCountExceeded:
|
||||
holder.eventMessage.setText(mContext.getString(R.string.participant_max_count_exceeded).replace("%s", displayName));
|
||||
holder.securityEventMessage.setText(mContext.getString(R.string.participant_max_count_exceeded).replace("%s", displayName));
|
||||
break;
|
||||
case None:
|
||||
default:
|
||||
|
@ -430,6 +202,7 @@ public class ChatMessagesAdapter extends SelectableAdapter<ChatMessageViewHolder
|
|||
break;
|
||||
case None:
|
||||
default:
|
||||
holder.eventLayout.setVisibility(View.VISIBLE);
|
||||
holder.eventMessage.setText(mContext.getString(R.string.unexpected_event).replace("%s", displayName).replace("%i", String.valueOf(event.getType().toInt())));
|
||||
break;
|
||||
}
|
||||
|
@ -444,6 +217,7 @@ public class ChatMessagesAdapter extends SelectableAdapter<ChatMessageViewHolder
|
|||
public void addToHistory(EventLog log) {
|
||||
mHistory.add(0, log);
|
||||
notifyItemInserted(0);
|
||||
notifyItemChanged(1); // Update second to last item just in case for grouping purposes
|
||||
}
|
||||
|
||||
public void addAllToHistory(ArrayList<EventLog> logs) {
|
||||
|
@ -486,220 +260,57 @@ public class ChatMessagesAdapter extends SelectableAdapter<ChatMessageViewHolder
|
|||
notifyItemRemoved(i);
|
||||
}
|
||||
|
||||
private void loadBitmap(String path, ImageView imageView) {
|
||||
if (cancelPotentialWork(path, imageView)) {
|
||||
mDefaultBitmap = BitmapFactory.decodeResource(mContext.getResources(), R.drawable.chat_file);
|
||||
BitmapWorkerTask task = new BitmapWorkerTask(imageView);
|
||||
final AsyncBitmap asyncBitmap = new AsyncBitmap(mContext.getResources(), mDefaultBitmap, task);
|
||||
imageView.setImageDrawable(asyncBitmap);
|
||||
task.execute(path);
|
||||
}
|
||||
}
|
||||
private void changeBackgroundDependingOnPreviousAndNextEvents(ChatMessage message, ChatMessageViewHolder holder, int position) {
|
||||
boolean hasPrevious = false, hasNext = false;
|
||||
|
||||
private void openFile(String path) {
|
||||
Intent intent = new Intent(Intent.ACTION_VIEW);
|
||||
File file;
|
||||
Uri contentUri;
|
||||
if (path.startsWith("file://")) {
|
||||
path = path.substring("file://".length());
|
||||
file = new File(path);
|
||||
contentUri = FileProvider.getUriForFile(mContext, mContext.getResources().getString(R.string.file_provider), file);
|
||||
} else if (path.startsWith("content://")) {
|
||||
contentUri = Uri.parse(path);
|
||||
// Do not forget history is reversed, so previous in order is next in list display and chronology !
|
||||
if (position > 0 && mContext.getResources().getBoolean(R.bool.lower_space_between_chat_bubbles_if_same_person)) {
|
||||
EventLog previousEvent = (EventLog) getItem(position - 1);
|
||||
if (previousEvent.getType() == EventLog.Type.ConferenceChatMessage) {
|
||||
ChatMessage previousMessage = previousEvent.getChatMessage();
|
||||
if (previousMessage.getFromAddress().weakEqual(message.getFromAddress())) {
|
||||
if (previousMessage.getTime() - message.getTime() < MAX_TIME_TO_GROUP_MESSAGES) {
|
||||
hasPrevious = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (position < mHistory.size() - 1 && mContext.getResources().getBoolean(R.bool.lower_space_between_chat_bubbles_if_same_person)) {
|
||||
EventLog nextEvent = (EventLog) getItem(position + 1);
|
||||
if (nextEvent.getType() == EventLog.Type.ConferenceChatMessage) {
|
||||
ChatMessage nextMessage = nextEvent.getChatMessage();
|
||||
if (nextMessage.getFromAddress().weakEqual(message.getFromAddress())) {
|
||||
if (message.getTime() - nextMessage.getTime() < MAX_TIME_TO_GROUP_MESSAGES) {
|
||||
holder.timeText.setVisibility(View.GONE);
|
||||
if (!message.isOutgoing()) {
|
||||
holder.avatarLayout.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
hasNext = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (message.isOutgoing()) {
|
||||
if (hasNext && hasPrevious) {
|
||||
holder.background.setBackgroundResource(R.drawable.chat_bubble_outgoing_split_2);
|
||||
} else if (hasNext) {
|
||||
holder.background.setBackgroundResource(R.drawable.chat_bubble_outgoing_split_3);
|
||||
} else if (hasPrevious) {
|
||||
holder.background.setBackgroundResource(R.drawable.chat_bubble_outgoing_split_1);
|
||||
} else {
|
||||
holder.background.setBackgroundResource(R.drawable.chat_bubble_outgoing_full);
|
||||
}
|
||||
} else {
|
||||
file = new File(path);
|
||||
try {
|
||||
contentUri = FileProvider.getUriForFile(mContext, mContext.getResources().getString(R.string.file_provider), file);
|
||||
} catch (Exception e) {
|
||||
contentUri = Uri.parse(path);
|
||||
}
|
||||
}
|
||||
String type = null;
|
||||
String extension = MimeTypeMap.getFileExtensionFromUrl(contentUri.toString());
|
||||
if (extension != null) {
|
||||
type = MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension);
|
||||
}
|
||||
if (type != null) {
|
||||
intent.setDataAndType(contentUri, type);
|
||||
} else {
|
||||
intent.setDataAndType(contentUri, "*/*");
|
||||
}
|
||||
intent.addFlags(FLAG_GRANT_READ_URI_PERMISSION);
|
||||
mContext.startActivity(intent);
|
||||
}
|
||||
|
||||
private void displayAttachedFile(ChatMessage message, ChatMessageViewHolder holder) {
|
||||
holder.fileName.setVisibility(View.VISIBLE);
|
||||
|
||||
String appData = message.getAppdata();
|
||||
if (appData == null) {
|
||||
for (Content c : message.getContents()) {
|
||||
if (c.isFile()) {
|
||||
appData = c.getFilePath();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (appData != null) {
|
||||
FileUtils.scanFile(message);
|
||||
holder.fileName.setText(FileUtils.getNameFromFilePath(appData));
|
||||
if (FileUtils.isExtensionImage(appData)) {
|
||||
holder.messageImage.setVisibility(View.VISIBLE);
|
||||
loadBitmap(appData, holder.messageImage);
|
||||
holder.messageImage.setTag(appData);
|
||||
if (hasNext && hasPrevious) {
|
||||
holder.background.setBackgroundResource(R.drawable.chat_bubble_incoming_split_2);
|
||||
} else if (hasNext) {
|
||||
holder.background.setBackgroundResource(R.drawable.chat_bubble_incoming_split_3);
|
||||
} else if (hasPrevious) {
|
||||
holder.background.setBackgroundResource(R.drawable.chat_bubble_incoming_split_1);
|
||||
} else {
|
||||
holder.openFileButton.setVisibility(View.VISIBLE);
|
||||
holder.openFileButton.setTag(appData);
|
||||
holder.openFileButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
openFile((String) v.getTag());
|
||||
}
|
||||
});
|
||||
holder.background.setBackgroundResource(R.drawable.chat_bubble_incoming_full);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Bitmap related classes and methods
|
||||
*/
|
||||
|
||||
private class BitmapWorkerTask extends AsyncTask<String, Void, Bitmap> {
|
||||
private final WeakReference<ImageView> imageViewReference;
|
||||
public String path;
|
||||
|
||||
public BitmapWorkerTask(ImageView imageView) {
|
||||
path = null;
|
||||
// Use a WeakReference to ensure the ImageView can be garbage collected
|
||||
imageViewReference = new WeakReference<>(imageView);
|
||||
}
|
||||
|
||||
private Bitmap scaleToFitHeight(Bitmap b, int height) {
|
||||
float factor = height / (float) b.getHeight();
|
||||
return Bitmap.createScaledBitmap(b, (int) (b.getWidth() * factor), height, true);
|
||||
}
|
||||
|
||||
// Decode image in background.
|
||||
@Override
|
||||
protected Bitmap doInBackground(String... params) {
|
||||
path = params[0];
|
||||
Bitmap bm = null;
|
||||
Bitmap thumbnail = null;
|
||||
if (FileUtils.isExtensionImage(path)) {
|
||||
if (path.startsWith("content")) {
|
||||
try {
|
||||
bm = MediaStore.Images.Media.getBitmap(mContext.getContentResolver(), Uri.parse(path));
|
||||
} catch (FileNotFoundException e) {
|
||||
Log.e(e);
|
||||
} catch (IOException e) {
|
||||
Log.e(e);
|
||||
}
|
||||
} else {
|
||||
bm = BitmapFactory.decodeFile(path);
|
||||
}
|
||||
|
||||
ImageView imageView = imageViewReference.get();
|
||||
try {
|
||||
// Rotate the bitmap if possible/needed, using EXIF data
|
||||
Matrix matrix = new Matrix();
|
||||
ExifInterface exif = new ExifInterface(path);
|
||||
int pictureOrientation = exif.getAttributeInt(ExifInterface.TAG_ORIENTATION, 0);
|
||||
if (pictureOrientation == 6 || pictureOrientation == 3 || pictureOrientation == 8) {
|
||||
if (pictureOrientation == 6) {
|
||||
matrix.postRotate(90);
|
||||
} else if (pictureOrientation == 3) {
|
||||
matrix.postRotate(180);
|
||||
} else {
|
||||
matrix.postRotate(270);
|
||||
}
|
||||
if (pictureOrientation == 6 || pictureOrientation == 8) {
|
||||
matrix.postScale(1, imageView.getMeasuredHeight() / (float) bm.getHeight());
|
||||
} else {
|
||||
matrix.postScale(imageView.getMeasuredHeight() / (float) bm.getHeight(), 1);
|
||||
}
|
||||
thumbnail = Bitmap.createBitmap(bm, 0, 0, bm.getWidth(), bm.getHeight(), matrix, true);
|
||||
if (thumbnail != bm) {
|
||||
bm.recycle();
|
||||
bm = null;
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.e(e);
|
||||
}
|
||||
|
||||
if (thumbnail == null && bm != null) {
|
||||
thumbnail = scaleToFitHeight(bm, imageView.getMeasuredHeight());
|
||||
bm.recycle();
|
||||
}
|
||||
return thumbnail;
|
||||
} else {
|
||||
return mDefaultBitmap;
|
||||
}
|
||||
}
|
||||
|
||||
// Once complete, see if ImageView is still around and set bitmap.
|
||||
@Override
|
||||
protected void onPostExecute(Bitmap bitmap) {
|
||||
if (isCancelled()) {
|
||||
bitmap.recycle();
|
||||
bitmap = null;
|
||||
}
|
||||
if (imageViewReference != null && bitmap != null) {
|
||||
final ImageView imageView = imageViewReference.get();
|
||||
final BitmapWorkerTask bitmapWorkerTask = getBitmapWorkerTask(imageView);
|
||||
if (this == bitmapWorkerTask && imageView != null) {
|
||||
imageView.setImageBitmap(bitmap);
|
||||
imageView.setTag(path);
|
||||
imageView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
openFile((String) v.getTag());
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class AsyncBitmap extends BitmapDrawable {
|
||||
private final WeakReference<BitmapWorkerTask> bitmapWorkerTaskReference;
|
||||
|
||||
public AsyncBitmap(Resources res, Bitmap bitmap, BitmapWorkerTask bitmapWorkerTask) {
|
||||
super(res, bitmap);
|
||||
bitmapWorkerTaskReference = new WeakReference<>(bitmapWorkerTask);
|
||||
}
|
||||
|
||||
public BitmapWorkerTask getBitmapWorkerTask() {
|
||||
return bitmapWorkerTaskReference.get();
|
||||
}
|
||||
}
|
||||
|
||||
private boolean cancelPotentialWork(String path, ImageView imageView) {
|
||||
final BitmapWorkerTask bitmapWorkerTask = getBitmapWorkerTask(imageView);
|
||||
|
||||
if (bitmapWorkerTask != null) {
|
||||
final String bitmapData = bitmapWorkerTask.path;
|
||||
// If bitmapData is not yet set or it differs from the new data
|
||||
if (bitmapData == null || bitmapData != path) {
|
||||
// Cancel previous task
|
||||
bitmapWorkerTask.cancel(true);
|
||||
} else {
|
||||
// The same work is already in progress
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// No task associated with the ImageView, or an existing task was cancelled
|
||||
return true;
|
||||
}
|
||||
|
||||
private BitmapWorkerTask getBitmapWorkerTask(ImageView imageView) {
|
||||
if (imageView != null) {
|
||||
final Drawable drawable = imageView.getDrawable();
|
||||
if (drawable instanceof AsyncBitmap) {
|
||||
final AsyncBitmap asyncDrawable = (AsyncBitmap) drawable;
|
||||
return asyncDrawable.getBitmapWorkerTask();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,8 +35,8 @@ import android.os.Handler;
|
|||
import android.os.Looper;
|
||||
import android.os.Parcelable;
|
||||
import android.provider.MediaStore;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import android.text.Editable;
|
||||
import android.text.TextWatcher;
|
||||
import android.view.ContextMenu;
|
||||
|
@ -56,6 +56,7 @@ import android.widget.LinearLayout;
|
|||
import android.widget.TextView;
|
||||
|
||||
import org.linphone.LinphoneManager;
|
||||
import org.linphone.core.ChatMessageListenerStub;
|
||||
import org.linphone.settings.LinphonePreferences;
|
||||
import org.linphone.LinphoneService;
|
||||
import org.linphone.utils.FileUtils;
|
||||
|
@ -167,12 +168,12 @@ public class ChatMessagesFragment extends Fragment implements ChatRoomListener,
|
|||
if (getResources().getBoolean(R.bool.isTablet)) {
|
||||
mBackButton.setVisibility(View.INVISIBLE);
|
||||
} else {
|
||||
mBackButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
LinphoneActivity.instance().goToChatList();
|
||||
}
|
||||
});
|
||||
mBackButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
LinphoneActivity.instance().goToChatList();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
mCallButton = view.findViewById(R.id.start_call);
|
||||
|
|
|
@ -21,9 +21,9 @@ package org.linphone.chat;
|
|||
|
||||
import android.app.Fragment;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.widget.DividerItemDecoration;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
|
|
@ -22,7 +22,7 @@ package org.linphone.chat;
|
|||
import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import android.view.View;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.ImageView;
|
||||
|
@ -156,8 +156,8 @@ public class ChatRoomViewHolder extends RecyclerView.ViewHolder implements View.
|
|||
if (mRoom.hasCapability(ChatRoomCapabilities.Encrypted.toInt())) {
|
||||
Participant[] participants = mRoom.getParticipants();
|
||||
if (participants.length > 0) {
|
||||
remoteAddr = participants[0].getAddress();
|
||||
} else {
|
||||
remoteAddr = participants[0].getAddress();
|
||||
} else {
|
||||
//TODO: error
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -22,14 +22,15 @@ package org.linphone.chat;
|
|||
import android.app.Fragment;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.widget.DividerItemDecoration;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import org.linphone.LinphoneManager;
|
||||
import org.linphone.R;
|
||||
|
@ -44,7 +45,6 @@ import org.linphone.core.CoreListenerStub;
|
|||
import org.linphone.core.EventLog;
|
||||
import org.linphone.core.ProxyConfig;
|
||||
import org.linphone.fragments.FragmentsAvailable;
|
||||
import org.linphone.mediastream.Log;
|
||||
import org.linphone.utils.SelectableHelper;
|
||||
|
||||
import java.io.File;
|
||||
|
@ -64,8 +64,9 @@ public class ChatRoomsFragment extends Fragment implements ContactsUpdatedListen
|
|||
private int mChatRoomDeletionPendingCount;
|
||||
private ChatRoomListenerStub mChatRoomListener;
|
||||
private Context mContext;
|
||||
public List<ChatRoom> mRooms;
|
||||
private List<ChatRoom> mRooms;
|
||||
private SelectableHelper mSelectionHelper;
|
||||
private TextView mNoChatHistory;
|
||||
|
||||
@Override
|
||||
public View onCreateView(final LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
|
@ -81,6 +82,7 @@ public class ChatRoomsFragment extends Fragment implements ContactsUpdatedListen
|
|||
mNewDiscussionButton = view.findViewById(R.id.new_discussion);
|
||||
mNewGroupDiscussionButton = view.findViewById(R.id.new_group_discussion);
|
||||
mBackToCallButton = view.findViewById(R.id.back_in_call);
|
||||
mNoChatHistory = view.findViewById(R.id.noChatHistory);
|
||||
|
||||
mSelectionHelper = new SelectableHelper(view, this);
|
||||
mChatRoomsAdapter = new ChatRoomsAdapter(mContext, R.layout.chatlist_cell, mRooms, this, mSelectionHelper);
|
||||
|
@ -176,7 +178,7 @@ public class ChatRoomsFragment extends Fragment implements ContactsUpdatedListen
|
|||
|
||||
private void refreshChatRoomsList() {
|
||||
mChatRoomsAdapter.refresh();
|
||||
//mNoChatHistory.setVisibility(mChatRoomsAdapter.getItemCount() == 0 ? View.VISIBLE : View.GONE);
|
||||
mNoChatHistory.setVisibility(mChatRoomsAdapter.getItemCount() == 0 ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
|
||||
public void displayFirstChat() {
|
||||
|
|
|
@ -19,8 +19,8 @@ along with this program; if not, write to the Free Software
|
|||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
public abstract class ChatScrollListener extends RecyclerView.OnScrollListener {
|
||||
// The minimum amount of items to have below your current scroll position
|
||||
|
|
|
@ -21,7 +21,7 @@ package org.linphone.chat;
|
|||
|
||||
import android.app.Fragment;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.Nullable;
|
||||
import androidx.annotation.Nullable;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
|
|
@ -19,8 +19,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
|
||||
package org.linphone.chat;
|
||||
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
@ -33,7 +33,6 @@ import org.linphone.R;
|
|||
import org.linphone.contacts.ContactAddress;
|
||||
import org.linphone.contacts.LinphoneContact;
|
||||
import org.linphone.core.ChatRoom;
|
||||
import org.linphone.core.ChatRoomCapabilities;
|
||||
import org.linphone.core.Participant;
|
||||
import org.linphone.views.ContactAvatar;
|
||||
|
||||
|
|
|
@ -23,9 +23,9 @@ import android.app.Dialog;
|
|||
import android.app.Fragment;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.widget.DividerItemDecoration;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import android.text.Editable;
|
||||
import android.text.TextWatcher;
|
||||
import android.view.LayoutInflater;
|
||||
|
|
|
@ -21,23 +21,19 @@ package org.linphone.chat;
|
|||
|
||||
import android.app.Fragment;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.text.Spanned;
|
||||
import android.text.method.LinkMovementMethod;
|
||||
import androidx.annotation.Nullable;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import org.linphone.LinphoneManager;
|
||||
import org.linphone.utils.FileUtils;
|
||||
import org.linphone.mediastream.Log;
|
||||
import org.linphone.utils.LinphoneUtils;
|
||||
import org.linphone.R;
|
||||
import org.linphone.LinphoneActivity;
|
||||
import org.linphone.compatibility.Compatibility;
|
||||
import org.linphone.contacts.ContactsManager;
|
||||
import org.linphone.contacts.LinphoneContact;
|
||||
import org.linphone.core.Address;
|
||||
|
@ -101,18 +97,7 @@ public class ImdnFragment extends Fragment {
|
|||
mSentHeader = view.findViewById(R.id.sent_layout_header);
|
||||
mUndeliveredHeader = view.findViewById(R.id.undelivered_layout_header);
|
||||
|
||||
mBubble = new ChatMessageViewHolder(view.findViewById(R.id.bubble));
|
||||
mBubble.eventLayout.setVisibility(View.GONE);
|
||||
mBubble.bubbleLayout.setVisibility(View.VISIBLE);
|
||||
mBubble.delete.setVisibility(View.GONE);
|
||||
mBubble.messageText.setVisibility(View.GONE);
|
||||
mBubble.messageImage.setVisibility(View.GONE);
|
||||
mBubble.fileTransferLayout.setVisibility(View.GONE);
|
||||
mBubble.fileName.setVisibility(View.GONE);
|
||||
mBubble.openFileButton.setVisibility(View.GONE);
|
||||
mBubble.messageStatus.setVisibility(View.INVISIBLE);
|
||||
mBubble.messageSendingInProgress.setVisibility(View.GONE);
|
||||
mBubble.imdmLayout.setVisibility(View.INVISIBLE);
|
||||
mBubble = new ChatMessageViewHolder(getActivity(), view.findViewById(R.id.bubble), null);
|
||||
|
||||
mMessage = mRoom.findMessage(mMessageId);
|
||||
mListener = new ChatMessageListenerStub() {
|
||||
|
@ -124,23 +109,6 @@ public class ImdnFragment extends Fragment {
|
|||
if (mMessage == null) return null;
|
||||
mMessage.setListener(mListener);
|
||||
|
||||
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT);
|
||||
layoutParams.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);
|
||||
layoutParams.setMargins(100, 10, 10, 10);
|
||||
if (mMessage.isOutgoing()) {
|
||||
mBubble.background.setBackgroundResource(R.drawable.resizable_chat_bubble_outgoing);
|
||||
Compatibility.setTextAppearance(mBubble.contactName, getActivity(), R.style.font3);
|
||||
Compatibility.setTextAppearance(mBubble.fileTransferAction, getActivity(), R.style.font15);
|
||||
mBubble.fileTransferAction.setBackgroundResource(R.drawable.resizable_confirm_delete_button);
|
||||
ContactAvatar.setAvatarMask(mBubble.avatarLayout, R.drawable.avatar_chat_mask_outgoing);
|
||||
} else {
|
||||
mBubble.background.setBackgroundResource(R.drawable.resizable_chat_bubble_incoming);
|
||||
Compatibility.setTextAppearance(mBubble.contactName, getActivity(), R.style.font9);
|
||||
Compatibility.setTextAppearance(mBubble.fileTransferAction, getActivity(), R.style.font8);
|
||||
mBubble.fileTransferAction.setBackgroundResource(R.drawable.resizable_assistant_button);
|
||||
ContactAvatar.setAvatarMask(mBubble.avatarLayout, R.drawable.avatar_chat_mask);
|
||||
}
|
||||
|
||||
return view;
|
||||
}
|
||||
|
||||
|
@ -153,41 +121,31 @@ public class ImdnFragment extends Fragment {
|
|||
}
|
||||
|
||||
refreshInfo();
|
||||
mMessage.setListener(new ChatMessageListenerStub() {
|
||||
@Override
|
||||
public void onParticipantImdnStateChanged(ChatMessage msg, ParticipantImdnState state) {
|
||||
refreshInfo();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPause() {
|
||||
mMessage.setListener(null);
|
||||
super.onPause();
|
||||
}
|
||||
|
||||
private void refreshInfo() {
|
||||
Address remoteSender = mMessage.getFromAddress();
|
||||
LinphoneContact contact = ContactsManager.getInstance().findContactFromAddress(remoteSender);
|
||||
String displayName;
|
||||
|
||||
if (contact != null) {
|
||||
if (contact.getFullName() != null) {
|
||||
displayName = contact.getFullName();
|
||||
} else {
|
||||
displayName = LinphoneUtils.getAddressDisplayName(remoteSender);
|
||||
}
|
||||
|
||||
ContactAvatar.displayAvatar(contact, mBubble.avatarLayout);
|
||||
} else {
|
||||
displayName = LinphoneUtils.getAddressDisplayName(remoteSender);
|
||||
ContactAvatar.displayAvatar(displayName, mBubble.avatarLayout);
|
||||
}
|
||||
mBubble.contactName.setText(LinphoneUtils.timestampToHumanDate(getActivity(), mMessage.getTime(), R.string.messages_date_format) + " - " + displayName);
|
||||
|
||||
if (mMessage.hasTextContent()) {
|
||||
String msg = mMessage.getTextContent();
|
||||
Spanned text = LinphoneUtils.getTextWithHttpLinks(msg);
|
||||
mBubble.messageText.setText(text);
|
||||
mBubble.messageText.setMovementMethod(LinkMovementMethod.getInstance());
|
||||
mBubble.messageText.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
String appData = mMessage.getAppdata();
|
||||
if (appData != null) { // Something to display
|
||||
mBubble.fileName.setVisibility(View.VISIBLE);
|
||||
mBubble.fileName.setText(FileUtils.getNameFromFilePath(appData));
|
||||
// We purposely chose not to display the image
|
||||
}
|
||||
mBubble.deleteMessage.setVisibility(View.GONE);
|
||||
mBubble.deleteEvent.setVisibility(View.GONE);
|
||||
mBubble.eventLayout.setVisibility(View.GONE);
|
||||
mBubble.securityEventLayout.setVisibility(View.GONE);
|
||||
mBubble.rightAnchor.setVisibility(View.GONE);
|
||||
mBubble.bubbleLayout.setVisibility(View.GONE);
|
||||
mBubble.bindMessage(mMessage, contact);
|
||||
|
||||
mRead.removeAllViews();
|
||||
mDelivered.removeAllViews();
|
||||
|
|
|
@ -24,9 +24,7 @@ import android.app.Notification;
|
|||
import android.app.PendingIntent;
|
||||
import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.view.ViewTreeObserver;
|
||||
import android.view.ViewTreeObserver.OnGlobalLayoutListener;
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import org.linphone.R;
|
||||
|
||||
|
|
|
@ -20,8 +20,8 @@ package org.linphone.contacts;
|
|||
*/
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
@ -33,7 +33,6 @@ import android.widget.SectionIndexer;
|
|||
import android.widget.TextView;
|
||||
|
||||
import org.linphone.R;
|
||||
import org.linphone.mediastream.Log;
|
||||
import org.linphone.views.ContactAvatar;
|
||||
import org.linphone.utils.SelectableAdapter;
|
||||
import org.linphone.utils.SelectableHelper;
|
||||
|
|
|
@ -23,9 +23,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
import android.app.Fragment;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.widget.DividerItemDecoration;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
|
|
@ -19,8 +19,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
|
||||
package org.linphone.contacts;
|
||||
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
|
|
@ -25,7 +25,7 @@ import android.content.Intent;
|
|||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
|
|
|
@ -26,7 +26,7 @@ import android.graphics.drawable.ColorDrawable;
|
|||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
|
|
|
@ -21,7 +21,7 @@ package org.linphone.history;
|
|||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.support.annotation.NonNull;
|
||||
import androidx.annotation.NonNull;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
|
|
@ -22,9 +22,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
import android.app.Fragment;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.widget.DividerItemDecoration;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
|
@ -130,6 +130,9 @@ public class HistoryListFragment extends Fragment implements OnClickListener, On
|
|||
|
||||
private void hideHistoryListAndDisplayMessageIfEmpty() {
|
||||
removeNotMissedCallsFromLogs();
|
||||
noCallHistory.setVisibility(View.GONE);
|
||||
noMissedCallHistory.setVisibility(View.GONE);
|
||||
|
||||
if (mLogs.isEmpty()) {
|
||||
if (mOnlyDisplayMissedCalls) {
|
||||
noMissedCallHistory.setVisibility(View.VISIBLE);
|
||||
|
|
|
@ -19,7 +19,7 @@ package org.linphone.history;
|
|||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import android.view.View;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.ImageView;
|
||||
|
|
|
@ -19,7 +19,7 @@ package org.linphone.utils;
|
|||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import android.util.SparseBooleanArray;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
|
|
@ -21,7 +21,7 @@ package org.linphone.utils;
|
|||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
|
|
39
app/src/main/java/org/linphone/views/AsyncBitmap.java
Normal file
39
app/src/main/java/org/linphone/views/AsyncBitmap.java
Normal file
|
@ -0,0 +1,39 @@
|
|||
package org.linphone.views;
|
||||
|
||||
/*
|
||||
AsyncBitmap.java
|
||||
Copyright (C) 2018 Belledonne Communications, Grenoble, France
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.drawable.BitmapDrawable;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
public class AsyncBitmap extends BitmapDrawable {
|
||||
private final WeakReference<BitmapWorkerTask> bitmapWorkerTaskReference;
|
||||
|
||||
public AsyncBitmap(Resources res, Bitmap bitmap, BitmapWorkerTask bitmapWorkerTask) {
|
||||
super(res, bitmap);
|
||||
bitmapWorkerTaskReference = new WeakReference<>(bitmapWorkerTask);
|
||||
}
|
||||
|
||||
public BitmapWorkerTask getBitmapWorkerTask() {
|
||||
return bitmapWorkerTaskReference.get();
|
||||
}
|
||||
}
|
154
app/src/main/java/org/linphone/views/BitmapWorkerTask.java
Normal file
154
app/src/main/java/org/linphone/views/BitmapWorkerTask.java
Normal file
|
@ -0,0 +1,154 @@
|
|||
package org.linphone.views;
|
||||
|
||||
/*
|
||||
BitmapWorkerTask.java
|
||||
Copyright (C) 2018 Belledonne Communications, Grenoble, France
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.graphics.Matrix;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.media.ExifInterface;
|
||||
import android.net.Uri;
|
||||
import android.os.AsyncTask;
|
||||
import android.provider.MediaStore;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import org.linphone.mediastream.Log;
|
||||
import org.linphone.utils.FileUtils;
|
||||
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
public class BitmapWorkerTask extends AsyncTask<String, Void, Bitmap> {
|
||||
private Context mContext;
|
||||
private Bitmap mDefaultBitmap;
|
||||
|
||||
private final WeakReference<ImageView> imageViewReference;
|
||||
public String path;
|
||||
|
||||
public BitmapWorkerTask(Context context, ImageView imageView, Bitmap defaultBitmap) {
|
||||
mContext = context;
|
||||
mDefaultBitmap = defaultBitmap;
|
||||
path = null;
|
||||
// Use a WeakReference to ensure the ImageView can be garbage collected
|
||||
imageViewReference = new WeakReference<>(imageView);
|
||||
}
|
||||
|
||||
private Bitmap scaleToFitHeight(Bitmap b, int height) {
|
||||
float factor = height / (float) b.getHeight();
|
||||
int dstWidth = (int) (b.getWidth() * factor);
|
||||
if (dstWidth > 0 && height > 0) {
|
||||
return Bitmap.createScaledBitmap(b, dstWidth, height, true);
|
||||
}
|
||||
return b;
|
||||
}
|
||||
|
||||
// Decode image in background.
|
||||
@Override
|
||||
protected Bitmap doInBackground(String... params) {
|
||||
path = params[0];
|
||||
Bitmap bm = null;
|
||||
Bitmap thumbnail = null;
|
||||
if (FileUtils.isExtensionImage(path)) {
|
||||
if (path.startsWith("content")) {
|
||||
try {
|
||||
bm = MediaStore.Images.Media.getBitmap(mContext.getContentResolver(), Uri.parse(path));
|
||||
} catch (FileNotFoundException e) {
|
||||
Log.e(e);
|
||||
} catch (IOException e) {
|
||||
Log.e(e);
|
||||
}
|
||||
} else {
|
||||
bm = BitmapFactory.decodeFile(path);
|
||||
}
|
||||
|
||||
ImageView imageView = imageViewReference.get();
|
||||
|
||||
try {
|
||||
// Rotate the bitmap if possible/needed, using EXIF data
|
||||
Matrix matrix = new Matrix();
|
||||
ExifInterface exif = new ExifInterface(path);
|
||||
int pictureOrientation = exif.getAttributeInt(ExifInterface.TAG_ORIENTATION, 0);
|
||||
if (pictureOrientation == 6 || pictureOrientation == 3 || pictureOrientation == 8) {
|
||||
if (pictureOrientation == 6) {
|
||||
matrix.postRotate(90);
|
||||
} else if (pictureOrientation == 3) {
|
||||
matrix.postRotate(180);
|
||||
} else {
|
||||
matrix.postRotate(270);
|
||||
}
|
||||
if (imageView != null) {
|
||||
if (pictureOrientation == 6 || pictureOrientation == 8) {
|
||||
matrix.postScale(1, imageView.getMeasuredHeight() / (float) bm.getHeight());
|
||||
} else {
|
||||
matrix.postScale(imageView.getMeasuredHeight() / (float) bm.getHeight(), 1);
|
||||
}
|
||||
}
|
||||
thumbnail = Bitmap.createBitmap(bm, 0, 0, bm.getWidth(), bm.getHeight(), matrix, true);
|
||||
if (thumbnail != bm) {
|
||||
bm.recycle();
|
||||
bm = null;
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.e(e);
|
||||
}
|
||||
|
||||
if (thumbnail == null && bm != null) {
|
||||
if (imageView == null) return bm;
|
||||
thumbnail = scaleToFitHeight(bm, imageView.getMeasuredHeight());
|
||||
if (thumbnail != bm) {
|
||||
bm.recycle();
|
||||
}
|
||||
}
|
||||
return thumbnail;
|
||||
} else {
|
||||
return mDefaultBitmap;
|
||||
}
|
||||
}
|
||||
|
||||
// Once complete, see if ImageView is still around and set bitmap.
|
||||
@Override
|
||||
protected void onPostExecute(Bitmap bitmap) {
|
||||
if (isCancelled()) {
|
||||
bitmap.recycle();
|
||||
bitmap = null;
|
||||
}
|
||||
if (imageViewReference != null && bitmap != null) {
|
||||
final ImageView imageView = imageViewReference.get();
|
||||
final BitmapWorkerTask bitmapWorkerTask = getBitmapWorkerTask(imageView);
|
||||
if (this == bitmapWorkerTask && imageView != null) {
|
||||
imageView.setImageBitmap(bitmap);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static BitmapWorkerTask getBitmapWorkerTask(ImageView imageView) {
|
||||
if (imageView != null) {
|
||||
final Drawable drawable = imageView.getDrawable();
|
||||
if (drawable instanceof AsyncBitmap) {
|
||||
final AsyncBitmap asyncDrawable = (AsyncBitmap) drawable;
|
||||
return asyncDrawable.getBitmapWorkerTask();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
*/
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.annotation.Nullable;
|
||||
import androidx.annotation.Nullable;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
|
|
|
@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
*/
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.annotation.Nullable;
|
||||
import androidx.annotation.Nullable;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
|
|
5
app/src/main/res/drawable/chat_bubble_incoming_full.xml
Normal file
5
app/src/main/res/drawable/chat_bubble_incoming_full.xml
Normal file
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||
<solid android:color="@color/chat_bubble_incoming"/>
|
||||
<corners android:radius="6.7dp"/>
|
||||
</shape>
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||
<solid android:color="@color/chat_bubble_incoming"/>
|
||||
<corners android:radius="6.7dp" android:bottomLeftRadius="0dp"/>
|
||||
</shape>
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||
<solid android:color="@color/chat_bubble_incoming"/>
|
||||
<corners android:radius="6.7dp" android:topLeftRadius="0dp" android:bottomLeftRadius="0dp"/>
|
||||
</shape>
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||
<solid android:color="@color/chat_bubble_incoming"/>
|
||||
<corners android:radius="6.7dp" android:topLeftRadius="0dp"/>
|
||||
</shape>
|
5
app/src/main/res/drawable/chat_bubble_outgoing_full.xml
Normal file
5
app/src/main/res/drawable/chat_bubble_outgoing_full.xml
Normal file
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||
<solid android:color="@color/chat_bubble_outgoing"/>
|
||||
<corners android:radius="6.7dp"/>
|
||||
</shape>
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||
<solid android:color="@color/chat_bubble_outgoing"/>
|
||||
<corners android:radius="6.7dp" android:bottomRightRadius="0dp"/>
|
||||
</shape>
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||
<solid android:color="@color/chat_bubble_outgoing"/>
|
||||
<corners android:radius="6.7dp" android:topRightRadius="0dp" android:bottomRightRadius="0dp"/>
|
||||
</shape>
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||
<solid android:color="@color/chat_bubble_outgoing"/>
|
||||
<corners android:radius="6.7dp" android:topRightRadius="0dp"/>
|
||||
</shape>
|
|
@ -6,7 +6,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<android.support.v4.widget.DrawerLayout
|
||||
<androidx.drawerlayout.widget.DrawerLayout
|
||||
android:id="@+id/side_menu"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
@ -441,7 +441,7 @@
|
|||
|
||||
</RelativeLayout>
|
||||
|
||||
</android.support.v4.widget.DrawerLayout>
|
||||
</androidx.drawerlayout.widget.DrawerLayout>
|
||||
|
||||
<fragment
|
||||
android:id="@+id/status"
|
||||
|
|
|
@ -1,33 +1,33 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<fragment
|
||||
android:id="@+id/status"
|
||||
android:name="org.linphone.fragments.StatusFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="35dp"
|
||||
tools:layout="@layout/status" />
|
||||
<fragment
|
||||
android:id="@+id/status"
|
||||
android:name="org.linphone.fragments.StatusFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="35dp"
|
||||
tools:layout="@layout/status" />
|
||||
|
||||
<android.support.v4.widget.DrawerLayout
|
||||
android:id="@+id/side_menu"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@id/status">
|
||||
<androidx.drawerlayout.widget.DrawerLayout
|
||||
android:id="@+id/side_menu"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@id/status">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/top_bar"
|
||||
android:id="@+id/top_bar"
|
||||
android:visibility="gone"
|
||||
android:orientation="horizontal"
|
||||
android:background="@color/colorF"
|
||||
android:layout_width="match_parent"
|
||||
android:background="@color/colorF"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp">
|
||||
|
||||
<ImageView
|
||||
|
@ -40,262 +40,262 @@
|
|||
android:layout_weight="0.2"
|
||||
android:padding="18dp"/>
|
||||
|
||||
<TextView
|
||||
<TextView
|
||||
android:id="@+id/top_bar_title"
|
||||
style="@style/font1"
|
||||
style="@style/font1"
|
||||
android:maxLines="1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.4"
|
||||
android:gravity="center"
|
||||
android:padding="15dp"/>
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.2"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:layout_below="@id/top_bar"
|
||||
android:layout_toRightOf="@+id/footer">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:layout_below="@id/top_bar"
|
||||
android:layout_toRightOf="@+id/footer">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentTop="true">
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentTop="true">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/fragmentContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal" />
|
||||
</FrameLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/fragmentContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal" />
|
||||
</FrameLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/footer"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:orientation="vertical">
|
||||
<LinearLayout
|
||||
android:id="@+id/footer"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/history"
|
||||
android:background="@drawable/footer_button"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="0dp">
|
||||
<RelativeLayout
|
||||
android:id="@+id/history"
|
||||
android:background="@drawable/footer_button"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="0dp">
|
||||
|
||||
<ImageView
|
||||
android:src="@drawable/footer_history"
|
||||
android:contentDescription="@string/content_description_history"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="15dp"
|
||||
android:layout_centerInParent="true"/>
|
||||
<ImageView
|
||||
android:src="@drawable/footer_history"
|
||||
android:contentDescription="@string/content_description_history"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="15dp"
|
||||
android:layout_centerInParent="true"/>
|
||||
|
||||
<View
|
||||
android:id="@+id/history_select"
|
||||
android:background="@color/colorA"
|
||||
android:layout_width="5dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:visibility="gone"/>
|
||||
<View
|
||||
android:id="@+id/history_select"
|
||||
android:background="@color/colorA"
|
||||
android:layout_width="5dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/missed_calls"
|
||||
android:background="@drawable/unread_message_count_bg"
|
||||
style="@style/font18"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:visibility="gone"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"/>
|
||||
<TextView
|
||||
android:id="@+id/missed_calls"
|
||||
android:background="@drawable/unread_message_count_bg"
|
||||
style="@style/font18"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:visibility="gone"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"/>
|
||||
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/contacts"
|
||||
android:background="@drawable/footer_button"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="0dp">
|
||||
<RelativeLayout
|
||||
android:id="@+id/contacts"
|
||||
android:background="@drawable/footer_button"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="0dp">
|
||||
|
||||
<ImageView
|
||||
android:src="@drawable/footer_contacts"
|
||||
android:contentDescription="@string/content_description_contacts"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="15dp"
|
||||
android:layout_centerInParent="true"/>
|
||||
<ImageView
|
||||
android:src="@drawable/footer_contacts"
|
||||
android:contentDescription="@string/content_description_contacts"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="15dp"
|
||||
android:layout_centerInParent="true"/>
|
||||
|
||||
<View
|
||||
android:id="@+id/contacts_select"
|
||||
android:background="@color/colorA"
|
||||
android:layout_width="5dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:visibility="gone"/>
|
||||
</RelativeLayout>
|
||||
<View
|
||||
android:id="@+id/contacts_select"
|
||||
android:background="@color/colorA"
|
||||
android:layout_width="5dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:visibility="gone"/>
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/dialer"
|
||||
android:background="@drawable/footer_button"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="0dp">
|
||||
<RelativeLayout
|
||||
android:id="@+id/dialer"
|
||||
android:background="@drawable/footer_button"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="0dp">
|
||||
|
||||
<ImageView
|
||||
android:src="@drawable/footer_dialer"
|
||||
android:contentDescription="@string/content_description_dialer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="15dp"
|
||||
android:layout_centerInParent="true"/>
|
||||
<ImageView
|
||||
android:src="@drawable/footer_dialer"
|
||||
android:contentDescription="@string/content_description_dialer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="15dp"
|
||||
android:layout_centerInParent="true"/>
|
||||
|
||||
<View
|
||||
android:id="@+id/dialer_select"
|
||||
android:background="@color/colorA"
|
||||
android:layout_width="5dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentLeft="true"/>
|
||||
<View
|
||||
android:id="@+id/dialer_select"
|
||||
android:background="@color/colorA"
|
||||
android:layout_width="5dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentLeft="true"/>
|
||||
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/chat"
|
||||
android:background="@drawable/footer_button"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="0dp">
|
||||
<RelativeLayout
|
||||
android:id="@+id/chat"
|
||||
android:background="@drawable/footer_button"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="0dp">
|
||||
|
||||
<ImageView
|
||||
android:src="@drawable/footer_chat"
|
||||
android:contentDescription="@string/content_description_chat_button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="15dp"
|
||||
android:layout_centerInParent="true" />
|
||||
<ImageView
|
||||
android:src="@drawable/footer_chat"
|
||||
android:contentDescription="@string/content_description_chat_button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="15dp"
|
||||
android:layout_centerInParent="true" />
|
||||
|
||||
<View
|
||||
android:id="@+id/chat_select"
|
||||
android:background="@color/colorA"
|
||||
android:visibility="gone"
|
||||
android:layout_width="5dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentLeft="true"/>
|
||||
<View
|
||||
android:id="@+id/chat_select"
|
||||
android:background="@color/colorA"
|
||||
android:visibility="gone"
|
||||
android:layout_width="5dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentLeft="true"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/missed_chats"
|
||||
android:background="@drawable/unread_message_count_bg"
|
||||
style="@style/font18"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:visibility="gone"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"/>
|
||||
<TextView
|
||||
android:id="@+id/missed_chats"
|
||||
android:background="@drawable/unread_message_count_bg"
|
||||
style="@style/font18"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:visibility="gone"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"/>
|
||||
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/fragmentContainer2"
|
||||
android:visibility="gone"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
<LinearLayout
|
||||
android:id="@+id/fragmentContainer2"
|
||||
android:visibility="gone"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
<!-- Side Menu -->
|
||||
<RelativeLayout
|
||||
android:id="@+id/side_menu_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="left">
|
||||
<!-- Side Menu -->
|
||||
<RelativeLayout
|
||||
android:id="@+id/side_menu_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="left">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/side_menu_quit"
|
||||
android:background="@color/colorA"
|
||||
android:gravity="bottom"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp">
|
||||
<RelativeLayout
|
||||
android:id="@+id/side_menu_quit"
|
||||
android:background="@color/colorA"
|
||||
android:gravity="bottom"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/quit_button"
|
||||
android:src="@drawable/quit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="5dp"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_centerVertical="true" />
|
||||
<ImageView
|
||||
android:id="@+id/quit_button"
|
||||
android:src="@drawable/quit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="5dp"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_centerVertical="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/quit"
|
||||
android:text="@string/quit"
|
||||
style="@style/font14"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toRightOf="@id/quit_button"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_centerInParent="true"/>
|
||||
</RelativeLayout>
|
||||
<TextView
|
||||
android:id="@+id/quit"
|
||||
android:text="@string/quit"
|
||||
style="@style/font14"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toRightOf="@id/quit_button"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_centerInParent="true"/>
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/colorH"
|
||||
android:layout_above="@id/side_menu_quit"
|
||||
android:orientation="vertical">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/colorH"
|
||||
android:layout_above="@id/side_menu_quit"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include layout="@layout/side_menu_main_account"/>
|
||||
<include layout="@layout/side_menu_main_account"/>
|
||||
|
||||
<ListView
|
||||
android:id="@+id/accounts_list"
|
||||
android:background="@color/colorH"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:choiceMode="singleChoice"
|
||||
android:cacheColorHint="@color/transparent"
|
||||
android:divider="@android:color/transparent"
|
||||
android:dividerHeight="0dp"/>
|
||||
<ListView
|
||||
android:id="@+id/accounts_list"
|
||||
android:background="@color/colorH"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:choiceMode="singleChoice"
|
||||
android:cacheColorHint="@color/transparent"
|
||||
android:divider="@android:color/transparent"
|
||||
android:dividerHeight="0dp"/>
|
||||
|
||||
<ListView
|
||||
android:id="@+id/item_list"
|
||||
android:background="@color/colorH"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:choiceMode="singleChoice"
|
||||
android:divider="@color/colorE"
|
||||
android:listSelector="@color/colorH"
|
||||
android:footerDividersEnabled="true"
|
||||
android:dividerHeight="1dp"/>
|
||||
<ListView
|
||||
android:id="@+id/item_list"
|
||||
android:background="@color/colorH"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:choiceMode="singleChoice"
|
||||
android:divider="@color/colorE"
|
||||
android:listSelector="@color/colorH"
|
||||
android:footerDividersEnabled="true"
|
||||
android:dividerHeight="1dp"/>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/colorE"/>
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/colorE"/>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
</android.support.v4.widget.DrawerLayout>
|
||||
</androidx.drawerlayout.widget.DrawerLayout>
|
||||
|
||||
</RelativeLayout>
|
|
@ -1,33 +1,33 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<fragment
|
||||
android:id="@+id/status"
|
||||
android:name="org.linphone.fragments.StatusFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="35dp"
|
||||
tools:layout="@layout/status" />
|
||||
<fragment
|
||||
android:id="@+id/status"
|
||||
android:name="org.linphone.fragments.StatusFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="35dp"
|
||||
tools:layout="@layout/status" />
|
||||
|
||||
<android.support.v4.widget.DrawerLayout
|
||||
android:id="@+id/side_menu"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@id/status">
|
||||
<androidx.drawerlayout.widget.DrawerLayout
|
||||
android:id="@+id/side_menu"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@id/status">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/top_bar"
|
||||
android:id="@+id/top_bar"
|
||||
android:visibility="gone"
|
||||
android:orientation="horizontal"
|
||||
android:background="@color/colorF"
|
||||
android:layout_width="match_parent"
|
||||
android:background="@color/colorF"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp">
|
||||
|
||||
<ImageView
|
||||
|
@ -40,267 +40,267 @@
|
|||
android:layout_weight="0.2"
|
||||
android:padding="18dp"/>
|
||||
|
||||
<TextView
|
||||
<TextView
|
||||
android:id="@+id/top_bar_title"
|
||||
style="@style/font1"
|
||||
style="@style/font1"
|
||||
android:maxLines="1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.4"
|
||||
android:gravity="center"
|
||||
android:padding="15dp"/>
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.2"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:layout_below="@id/top_bar" android:layout_toRightOf="@+id/footer"
|
||||
android:layout_toEndOf="@+id/footer">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:layout_below="@id/top_bar" android:layout_toRightOf="@+id/footer"
|
||||
android:layout_toEndOf="@+id/footer">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:baselineAligned="false"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
<LinearLayout
|
||||
android:baselineAligned="false"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/fragmentContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal" />
|
||||
<LinearLayout
|
||||
android:id="@+id/fragmentContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/fragmentContainer2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal">
|
||||
<LinearLayout
|
||||
android:id="@+id/fragmentContainer2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<View
|
||||
android:background="@color/colorE"
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="match_parent"/>
|
||||
</LinearLayout>
|
||||
<View
|
||||
android:background="@color/colorE"
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="match_parent"/>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
</FrameLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/footer"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:orientation="vertical">
|
||||
<LinearLayout
|
||||
android:id="@+id/footer"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/history"
|
||||
android:background="@drawable/footer_button"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="0dp">
|
||||
<RelativeLayout
|
||||
android:id="@+id/history"
|
||||
android:background="@drawable/footer_button"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="0dp">
|
||||
|
||||
<ImageView
|
||||
android:src="@drawable/footer_history"
|
||||
android:contentDescription="@string/content_description_history"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="15dp"
|
||||
android:layout_centerInParent="true"/>
|
||||
<ImageView
|
||||
android:src="@drawable/footer_history"
|
||||
android:contentDescription="@string/content_description_history"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="15dp"
|
||||
android:layout_centerInParent="true"/>
|
||||
|
||||
<View
|
||||
android:id="@+id/history_select"
|
||||
android:background="@color/colorA"
|
||||
android:layout_width="5dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:visibility="gone"/>
|
||||
<View
|
||||
android:id="@+id/history_select"
|
||||
android:background="@color/colorA"
|
||||
android:layout_width="5dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/missed_calls"
|
||||
android:background="@drawable/unread_message_count_bg"
|
||||
style="@style/font18"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:layout_marginRight="5dp"
|
||||
android:visibility="gone"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"/>
|
||||
<TextView
|
||||
android:id="@+id/missed_calls"
|
||||
android:background="@drawable/unread_message_count_bg"
|
||||
style="@style/font18"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:layout_marginRight="5dp"
|
||||
android:visibility="gone"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"/>
|
||||
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/contacts"
|
||||
android:background="@drawable/footer_button"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="0dp">
|
||||
<RelativeLayout
|
||||
android:id="@+id/contacts"
|
||||
android:background="@drawable/footer_button"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="0dp">
|
||||
|
||||
<ImageView
|
||||
android:src="@drawable/footer_contacts"
|
||||
android:contentDescription="@string/content_description_contacts"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="15dp"
|
||||
android:layout_centerInParent="true"/>
|
||||
<ImageView
|
||||
android:src="@drawable/footer_contacts"
|
||||
android:contentDescription="@string/content_description_contacts"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="15dp"
|
||||
android:layout_centerInParent="true"/>
|
||||
|
||||
<View
|
||||
android:id="@+id/contacts_select"
|
||||
android:background="@color/colorA"
|
||||
android:layout_width="5dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:visibility="gone"/>
|
||||
</RelativeLayout>
|
||||
<View
|
||||
android:id="@+id/contacts_select"
|
||||
android:background="@color/colorA"
|
||||
android:layout_width="5dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:visibility="gone"/>
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/dialer"
|
||||
android:background="@drawable/footer_button"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="0dp">
|
||||
<RelativeLayout
|
||||
android:id="@+id/dialer"
|
||||
android:background="@drawable/footer_button"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="0dp">
|
||||
|
||||
<ImageView
|
||||
android:src="@drawable/footer_dialer"
|
||||
android:contentDescription="@string/content_description_dialer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="15dp"
|
||||
android:layout_centerInParent="true"/>
|
||||
<ImageView
|
||||
android:src="@drawable/footer_dialer"
|
||||
android:contentDescription="@string/content_description_dialer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="15dp"
|
||||
android:layout_centerInParent="true"/>
|
||||
|
||||
<View
|
||||
android:id="@+id/dialer_select"
|
||||
android:background="@color/colorA"
|
||||
android:layout_width="5dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentLeft="true"/>
|
||||
<View
|
||||
android:id="@+id/dialer_select"
|
||||
android:background="@color/colorA"
|
||||
android:layout_width="5dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentLeft="true"/>
|
||||
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/chat"
|
||||
android:background="@drawable/footer_button"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="0dp">
|
||||
<RelativeLayout
|
||||
android:id="@+id/chat"
|
||||
android:background="@drawable/footer_button"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="0dp">
|
||||
|
||||
<ImageView
|
||||
android:src="@drawable/footer_chat"
|
||||
android:contentDescription="@string/content_description_chat_button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="15dp"
|
||||
android:layout_centerInParent="true" />
|
||||
<ImageView
|
||||
android:src="@drawable/footer_chat"
|
||||
android:contentDescription="@string/content_description_chat_button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="15dp"
|
||||
android:layout_centerInParent="true" />
|
||||
|
||||
<View
|
||||
android:id="@+id/chat_select"
|
||||
android:background="@color/colorA"
|
||||
android:visibility="gone"
|
||||
android:layout_width="5dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentLeft="true"/>
|
||||
<View
|
||||
android:id="@+id/chat_select"
|
||||
android:background="@color/colorA"
|
||||
android:visibility="gone"
|
||||
android:layout_width="5dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentLeft="true"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/missed_chats"
|
||||
android:background="@drawable/unread_message_count_bg"
|
||||
style="@style/font18"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:layout_marginRight="5dp"
|
||||
android:visibility="gone"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"/>
|
||||
<TextView
|
||||
android:id="@+id/missed_chats"
|
||||
android:background="@drawable/unread_message_count_bg"
|
||||
style="@style/font18"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:layout_marginRight="5dp"
|
||||
android:visibility="gone"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"/>
|
||||
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
<!-- Side Menu -->
|
||||
<RelativeLayout
|
||||
android:id="@+id/side_menu_content"
|
||||
android:layout_width="400dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="left">
|
||||
<!-- Side Menu -->
|
||||
<RelativeLayout
|
||||
android:id="@+id/side_menu_content"
|
||||
android:layout_width="400dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="left">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include layout="@layout/side_menu_main_account"/>
|
||||
<include layout="@layout/side_menu_main_account"/>
|
||||
|
||||
<ListView
|
||||
android:id="@+id/accounts_list"
|
||||
android:background="@color/colorB"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:choiceMode="singleChoice"
|
||||
android:cacheColorHint="@color/transparent"
|
||||
android:divider="@android:color/transparent"
|
||||
android:dividerHeight="0dp"/>
|
||||
<ListView
|
||||
android:id="@+id/accounts_list"
|
||||
android:background="@color/colorB"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:choiceMode="singleChoice"
|
||||
android:cacheColorHint="@color/transparent"
|
||||
android:divider="@android:color/transparent"
|
||||
android:dividerHeight="0dp"/>
|
||||
|
||||
<ListView
|
||||
android:id="@+id/item_list"
|
||||
android:background="@color/colorH"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:choiceMode="singleChoice"
|
||||
android:divider="@color/colorE"
|
||||
android:listSelector="@color/colorH"
|
||||
android:dividerHeight="1dp"/>
|
||||
</LinearLayout>
|
||||
<ListView
|
||||
android:id="@+id/item_list"
|
||||
android:background="@color/colorH"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:choiceMode="singleChoice"
|
||||
android:divider="@color/colorE"
|
||||
android:listSelector="@color/colorH"
|
||||
android:dividerHeight="1dp"/>
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/side_menu_quit"
|
||||
android:background="@color/colorA"
|
||||
android:gravity="bottom"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp">
|
||||
<RelativeLayout
|
||||
android:id="@+id/side_menu_quit"
|
||||
android:background="@color/colorA"
|
||||
android:gravity="bottom"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/quit_button"
|
||||
android:src="@drawable/quit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="5dp"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_centerVertical="true" />
|
||||
<ImageView
|
||||
android:id="@+id/quit_button"
|
||||
android:src="@drawable/quit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="5dp"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_centerVertical="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/quit"
|
||||
android:text="@string/quit"
|
||||
style="@style/font14"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toRightOf="@id/quit_button"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_centerInParent="true"/>
|
||||
<TextView
|
||||
android:id="@+id/quit"
|
||||
android:text="@string/quit"
|
||||
style="@style/font14"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toRightOf="@id/quit_button"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_centerInParent="true"/>
|
||||
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
</android.support.v4.widget.DrawerLayout>
|
||||
</androidx.drawerlayout.widget.DrawerLayout>
|
||||
|
||||
</RelativeLayout>
|
|
@ -1,33 +1,33 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<fragment
|
||||
android:id="@+id/status"
|
||||
android:name="org.linphone.fragments.StatusFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
tools:layout="@layout/status" />
|
||||
<fragment
|
||||
android:id="@+id/status"
|
||||
android:name="org.linphone.fragments.StatusFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
tools:layout="@layout/status" />
|
||||
|
||||
<android.support.v4.widget.DrawerLayout
|
||||
android:id="@+id/side_menu"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@id/status">
|
||||
<androidx.drawerlayout.widget.DrawerLayout
|
||||
android:id="@+id/side_menu"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@id/status">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/top_bar"
|
||||
android:id="@+id/top_bar"
|
||||
android:visibility="gone"
|
||||
android:orientation="horizontal"
|
||||
android:background="@color/colorF"
|
||||
android:layout_width="match_parent"
|
||||
android:background="@color/colorF"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp">
|
||||
|
||||
<ImageView
|
||||
|
@ -40,267 +40,267 @@
|
|||
android:layout_weight="0.2"
|
||||
android:padding="18dp"/>
|
||||
|
||||
<TextView
|
||||
<TextView
|
||||
android:id="@+id/top_bar_title"
|
||||
style="@style/font1"
|
||||
style="@style/font1"
|
||||
android:maxLines="1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.4"
|
||||
android:gravity="center"
|
||||
android:padding="15dp"/>
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.2"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:layout_below="@id/top_bar"
|
||||
android:layout_above="@id/footer">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:layout_below="@id/top_bar"
|
||||
android:layout_above="@id/footer">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:baselineAligned="false"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
<LinearLayout
|
||||
android:baselineAligned="false"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/fragmentContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal" />
|
||||
<LinearLayout
|
||||
android:id="@+id/fragmentContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/fragmentContainer2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal">
|
||||
<LinearLayout
|
||||
android:id="@+id/fragmentContainer2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<View
|
||||
android:background="@color/colorE"
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="match_parent"/>
|
||||
<View
|
||||
android:background="@color/colorE"
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
</FrameLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/footer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:orientation="horizontal">
|
||||
<LinearLayout
|
||||
android:id="@+id/footer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/history"
|
||||
android:background="@drawable/footer_button"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent">
|
||||
<RelativeLayout
|
||||
android:id="@+id/history"
|
||||
android:background="@drawable/footer_button"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/footer_history"
|
||||
android:src="@drawable/footer_history"
|
||||
android:contentDescription="@string/content_description_history"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="15dp"
|
||||
android:layout_centerInParent="true"/>
|
||||
<ImageView
|
||||
android:id="@+id/footer_history"
|
||||
android:src="@drawable/footer_history"
|
||||
android:contentDescription="@string/content_description_history"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="15dp"
|
||||
android:layout_centerInParent="true"/>
|
||||
|
||||
<View
|
||||
android:id="@+id/history_select"
|
||||
android:background="@color/colorA"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="5dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:visibility="gone"/>
|
||||
<View
|
||||
android:id="@+id/history_select"
|
||||
android:background="@color/colorA"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="5dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/missed_calls"
|
||||
android:background="@drawable/unread_message_count_bg"
|
||||
style="@style/font18"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:layout_margin="20dp"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:visibility="visible"/>
|
||||
<TextView
|
||||
android:id="@+id/missed_calls"
|
||||
android:background="@drawable/unread_message_count_bg"
|
||||
style="@style/font18"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:layout_margin="20dp"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:visibility="visible"/>
|
||||
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/contacts"
|
||||
android:background="@drawable/footer_button"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent">
|
||||
<RelativeLayout
|
||||
android:id="@+id/contacts"
|
||||
android:background="@drawable/footer_button"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:src="@drawable/footer_contacts"
|
||||
android:contentDescription="@string/content_description_contacts"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="15dp"
|
||||
android:layout_centerInParent="true"/>
|
||||
<ImageView
|
||||
android:src="@drawable/footer_contacts"
|
||||
android:contentDescription="@string/content_description_contacts"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="15dp"
|
||||
android:layout_centerInParent="true"/>
|
||||
|
||||
<View
|
||||
android:id="@+id/contacts_select"
|
||||
android:background="@color/colorA"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="5dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:visibility="gone"/>
|
||||
</RelativeLayout>
|
||||
<View
|
||||
android:id="@+id/contacts_select"
|
||||
android:background="@color/colorA"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="5dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:visibility="gone"/>
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/dialer"
|
||||
android:background="@drawable/footer_button"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent">
|
||||
<RelativeLayout
|
||||
android:id="@+id/dialer"
|
||||
android:background="@drawable/footer_button"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:src="@drawable/footer_dialer"
|
||||
android:contentDescription="@string/content_description_dialer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="15dp"
|
||||
android:layout_centerInParent="true"/>
|
||||
<ImageView
|
||||
android:src="@drawable/footer_dialer"
|
||||
android:contentDescription="@string/content_description_dialer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="15dp"
|
||||
android:layout_centerInParent="true"/>
|
||||
|
||||
<View
|
||||
android:id="@+id/dialer_select"
|
||||
android:background="@color/colorA"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="5dp"
|
||||
android:layout_alignParentBottom="true"/>
|
||||
<View
|
||||
android:id="@+id/dialer_select"
|
||||
android:background="@color/colorA"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="5dp"
|
||||
android:layout_alignParentBottom="true"/>
|
||||
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/chat"
|
||||
android:background="@drawable/footer_button"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent">
|
||||
<RelativeLayout
|
||||
android:id="@+id/chat"
|
||||
android:background="@drawable/footer_button"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:src="@drawable/footer_chat"
|
||||
android:contentDescription="@string/content_description_chat"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="15dp"
|
||||
android:layout_centerInParent="true" />
|
||||
<ImageView
|
||||
android:src="@drawable/footer_chat"
|
||||
android:contentDescription="@string/content_description_chat"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="15dp"
|
||||
android:layout_centerInParent="true" />
|
||||
|
||||
<View
|
||||
android:id="@+id/chat_select"
|
||||
android:background="@color/colorA"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="5dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:visibility="gone"/>
|
||||
<View
|
||||
android:id="@+id/chat_select"
|
||||
android:background="@color/colorA"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="5dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/missed_chats"
|
||||
android:background="@drawable/unread_message_count_bg"
|
||||
style="@style/font18"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="20dp"
|
||||
android:gravity="center"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:visibility="gone"/>
|
||||
<TextView
|
||||
android:id="@+id/missed_chats"
|
||||
android:background="@drawable/unread_message_count_bg"
|
||||
style="@style/font18"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="20dp"
|
||||
android:gravity="center"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:visibility="gone"/>
|
||||
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
<!-- Side Menu -->
|
||||
<RelativeLayout
|
||||
android:id="@+id/side_menu_content"
|
||||
android:layout_width="400dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="left">
|
||||
<!-- Side Menu -->
|
||||
<RelativeLayout
|
||||
android:id="@+id/side_menu_content"
|
||||
android:layout_width="400dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="left">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include layout="@layout/side_menu_main_account"/>
|
||||
<include layout="@layout/side_menu_main_account"/>
|
||||
|
||||
<ListView
|
||||
android:id="@+id/accounts_list"
|
||||
android:background="@color/colorB"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:choiceMode="singleChoice"
|
||||
android:cacheColorHint="@color/transparent"
|
||||
android:divider="@android:color/transparent"
|
||||
android:dividerHeight="0dp"/>
|
||||
<ListView
|
||||
android:id="@+id/accounts_list"
|
||||
android:background="@color/colorB"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:choiceMode="singleChoice"
|
||||
android:cacheColorHint="@color/transparent"
|
||||
android:divider="@android:color/transparent"
|
||||
android:dividerHeight="0dp"/>
|
||||
|
||||
<ListView
|
||||
android:id="@+id/item_list"
|
||||
android:background="@color/colorH"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:choiceMode="singleChoice"
|
||||
android:divider="@color/colorE"
|
||||
android:listSelector="@color/colorH"
|
||||
android:dividerHeight="1dp"/>
|
||||
</LinearLayout>
|
||||
<ListView
|
||||
android:id="@+id/item_list"
|
||||
android:background="@color/colorH"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:choiceMode="singleChoice"
|
||||
android:divider="@color/colorE"
|
||||
android:listSelector="@color/colorH"
|
||||
android:dividerHeight="1dp"/>
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/side_menu_quit"
|
||||
android:background="@color/colorA"
|
||||
android:gravity="bottom"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp">
|
||||
<RelativeLayout
|
||||
android:id="@+id/side_menu_quit"
|
||||
android:background="@color/colorA"
|
||||
android:gravity="bottom"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/quit_button"
|
||||
android:src="@drawable/quit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="5dp"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_centerVertical="true" />
|
||||
<ImageView
|
||||
android:id="@+id/quit_button"
|
||||
android:src="@drawable/quit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="5dp"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_centerVertical="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/quit"
|
||||
android:text="@string/quit"
|
||||
style="@style/font14"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toRightOf="@id/quit_button"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_centerInParent="true"/>
|
||||
<TextView
|
||||
android:id="@+id/quit"
|
||||
android:text="@string/quit"
|
||||
style="@style/font14"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toRightOf="@id/quit_button"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_centerInParent="true"/>
|
||||
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
</android.support.v4.widget.DrawerLayout>
|
||||
</androidx.drawerlayout.widget.DrawerLayout>
|
||||
|
||||
</RelativeLayout>
|
|
@ -6,7 +6,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<android.support.v4.widget.DrawerLayout
|
||||
<androidx.drawerlayout.widget.DrawerLayout
|
||||
android:id="@+id/side_menu"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
@ -441,7 +441,7 @@
|
|||
|
||||
</RelativeLayout>
|
||||
|
||||
</android.support.v4.widget.DrawerLayout>
|
||||
</androidx.drawerlayout.widget.DrawerLayout>
|
||||
|
||||
<fragment
|
||||
android:id="@+id/status"
|
||||
|
|
|
@ -176,7 +176,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_above="@id/footer"/>
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/chat_message_list"
|
||||
android:divider="@android:color/transparent"
|
||||
android:choiceMode="multipleChoice"
|
||||
|
@ -186,8 +186,6 @@
|
|||
android:layout_above="@id/remote_composing"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_below="@+id/top"/>
|
||||
|
||||
<ImageView
|
||||
|
|
|
@ -1,25 +1,33 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<View
|
||||
android:id="@+id/rightAnchor"
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentTop="true"/>
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/delete_message"
|
||||
android:id="@+id/delete_event"
|
||||
android:button="@drawable/checkbox"
|
||||
android:contentDescription="@string/content_description_delete"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:clickable="false"
|
||||
android:layout_alignParentRight="true"/>
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentTop="true"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/event"
|
||||
android:visibility="gone"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toLeftOf="@id/delete_message"
|
||||
android:layout_toLeftOf="@id/delete_event"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:gravity="center"
|
||||
|
@ -36,176 +44,124 @@
|
|||
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/bubble"
|
||||
android:layout_width="wrap_content"
|
||||
<LinearLayout
|
||||
android:id="@+id/security_event"
|
||||
android:visibility="gone"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toLeftOf="@id/delete_message">
|
||||
android:layout_toLeftOf="@id/delete_event"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/event_decoration_red">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/separator"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="10dp"
|
||||
android:orientation="horizontal"/>
|
||||
<TextView
|
||||
android:id="@+id/security_event_text"
|
||||
android:textAppearance="@style/font_group_chat_security_event"
|
||||
android:background="@color/colorH"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/bubble"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toLeftOf="@id/rightAnchor">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/background"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/separator"
|
||||
android:orientation="horizontal">
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginLeft="45dp"
|
||||
android:layout_marginTop="1dp"
|
||||
android:layout_marginBottom="1dp"
|
||||
android:background="@drawable/chat_bubble_outgoing_full"
|
||||
android:layout_below="@+id/time"
|
||||
android:layout_toLeftOf="@+id/imdn"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingTop="5dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
<com.google.android.flexbox.FlexboxLayout
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/pictures"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingTop="10dp">
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
app:flexWrap="wrap"/>
|
||||
|
||||
<include layout="@layout/contact_avatar"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
<TextView
|
||||
android:id="@+id/message"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingRight="10dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/contact_header"
|
||||
android:maxLines="1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/file_name"
|
||||
style="@style/font26"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="150dp"
|
||||
android:layout_below="@id/file_name"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:adjustViewBounds="true"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/open_file"
|
||||
android:textAppearance="@style/font8"
|
||||
android:text="@string/open"
|
||||
android:background="@drawable/resizable_assistant_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/file_name"
|
||||
android:layout_centerVertical="true"
|
||||
android:visibility="gone"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/message"
|
||||
style="@style/font11"
|
||||
android:autoLink="web"
|
||||
android:linksClickable="true"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/file_transfer_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress_bar"
|
||||
style="@android:style/Widget.ProgressBar.Horizontal"
|
||||
android:paddingRight="5dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="5dp"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/file_transfer_action"
|
||||
android:textAppearance="@style/font8"
|
||||
android:background="@drawable/resizable_assistant_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/progress_bar"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/imdmLayout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginBottom="2dp"
|
||||
android:orientation="horizontal"
|
||||
android:layout_gravity="right"
|
||||
android:gravity="right"
|
||||
android:visibility="invisible">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/imdmText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Displayed"
|
||||
android:textSize="12sp"
|
||||
android:paddingRight="3dp"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imdmIcon"
|
||||
android:layout_width="10dp"
|
||||
android:layout_height="10dp"
|
||||
android:src="@drawable/valid"
|
||||
android:scaleType="fitCenter"
|
||||
android:layout_marginTop="2dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
android:textAppearance="@style/chat_bubble_message_font"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="5dp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_alignRight="@id/background"
|
||||
android:layout_alignTop="@id/background"
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="3dp">
|
||||
android:id="@+id/message_sender_avatar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@id/background">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/status"
|
||||
android:contentDescription="@string/content_description_message_status"
|
||||
android:visibility="invisible"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:paddingRight="5dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:adjustViewBounds="true" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/inprogress"
|
||||
android:progressTint="@color/colorB"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:paddingRight="5dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
<include layout="@layout/contact_avatar"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
<TextView
|
||||
android:id="@id/time"
|
||||
android:textAppearance="@style/chat_bubble_time_font"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="right"
|
||||
android:layout_marginTop="7dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginLeft="45dp"
|
||||
android:layout_toLeftOf="@id/imdn"/>
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/delete_message"
|
||||
android:button="@drawable/checkbox"
|
||||
android:contentDescription="@string/content_description_delete"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:clickable="false"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignTop="@id/background"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@id/imdn"
|
||||
android:layout_width="10dp"
|
||||
android:layout_height="10dp"
|
||||
android:src="@drawable/imdn_received"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignLeft="@id/delete_message"
|
||||
android:layout_alignBottom="@id/background"/>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/send_in_progress"
|
||||
android:layout_width="10dp"
|
||||
android:layout_height="10dp"
|
||||
android:indeterminateTint="@color/colorA"
|
||||
android:src="@drawable/imdn_received"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignBottom="@id/background"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
|
38
app/src/main/res/layout/chat_bubble_content.xml
Normal file
38
app/src/main/res/layout/chat_bubble_content.xml
Normal file
|
@ -0,0 +1,38 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image"
|
||||
android:visibility="gone"
|
||||
android:adjustViewBounds="true"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="100dp"
|
||||
android:layout_margin="5dp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/file"
|
||||
android:visibility="gone"
|
||||
android:textAlignment="center"
|
||||
android:gravity="center"
|
||||
style="@style/chat_bubble_file_name_font"
|
||||
android:background="@color/colorN"
|
||||
android:ellipsize="end"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_margin="5dp"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/download"
|
||||
android:visibility="gone"
|
||||
android:text="@string/download_file"
|
||||
android:background="@drawable/resizable_assistant_button"
|
||||
style="@style/font8"
|
||||
android:ellipsize="end"
|
||||
android:layout_width="137dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_margin="5dp"
|
||||
android:padding="10dp"/>
|
||||
|
||||
</RelativeLayout>
|
|
@ -173,7 +173,7 @@
|
|||
android:layout_height="match_parent"
|
||||
android:id="@+id/relativeLayout">
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/contactsList"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
|
|
@ -53,13 +53,6 @@
|
|||
android:gravity="center_horizontal"
|
||||
android:layout_below="@id/top">
|
||||
|
||||
<include
|
||||
android:id="@+id/bubble"
|
||||
layout="@layout/chat_bubble"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="20dp"/>
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
@ -69,6 +62,13 @@
|
|||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include
|
||||
android:id="@+id/bubble"
|
||||
layout="@layout/chat_bubble"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="20dp"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/read_layout_header"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -80,7 +80,7 @@
|
|||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/font27"
|
||||
style="@style/imdn_read_font"
|
||||
android:text="@string/displayed"/>
|
||||
|
||||
<ImageView
|
||||
|
@ -108,7 +108,7 @@
|
|||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/font28"
|
||||
style="@style/imdn_delivered_sent_font"
|
||||
android:text="@string/delivered"/>
|
||||
|
||||
<ImageView
|
||||
|
@ -136,7 +136,7 @@
|
|||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/font28"
|
||||
style="@style/imdn_delivered_sent_font"
|
||||
android:text="@string/sent"/>
|
||||
|
||||
<ImageView
|
||||
|
@ -165,7 +165,7 @@
|
|||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/font29"
|
||||
style="@style/imdn_undelivered_font"
|
||||
android:text="@string/error"/>
|
||||
|
||||
<ImageView
|
||||
|
|
|
@ -99,7 +99,7 @@
|
|||
|
||||
</RelativeLayout>
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/chat_room_participants"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
@ -107,7 +107,7 @@
|
|||
android:divider="@color/colorE"
|
||||
android:dividerHeight="1dp">
|
||||
|
||||
</android.support.v7.widget.RecyclerView>
|
||||
</androidx.recyclerview.widget.RecyclerView>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/leaveGroupLayout"
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/colorH"
|
||||
android:orientation="vertical" >
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/top_bar"
|
||||
|
@ -65,7 +65,7 @@
|
|||
|
||||
<include layout="@layout/edit_list"/>
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/chatList"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
@ -80,9 +80,9 @@
|
|||
android:text="@string/no_chat_history"
|
||||
style="@style/font6"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"/>
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"/>
|
||||
|
||||
<include layout="@layout/wait_layout" android:id="@+id/waitScreen"/>
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="10dp"
|
||||
android:textAppearance="@style/font33"
|
||||
android:textAppearance="@style/contact_invite_font"
|
||||
android:text="@string/invite_friend" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
|
|
@ -112,7 +112,7 @@
|
|||
android:layout_height="match_parent">
|
||||
|
||||
<!--android:fastScrollAlwaysVisible="true"-->
|
||||
<android.support.v7.widget.RecyclerView
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/contactsList"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.appcompat.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/context_bar"
|
||||
android:background="@color/colorA"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -132,4 +132,4 @@
|
|||
android:padding="15dp"/>
|
||||
<include layout="@layout/edit_list"/>
|
||||
</LinearLayout>
|
||||
</android.support.v7.widget.Toolbar>
|
||||
</androidx.appcompat.widget.Toolbar>
|
|
@ -1,105 +1,113 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/colorH"
|
||||
android:orientation="vertical" >
|
||||
android:background="@color/colorH">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/top_bar"
|
||||
android:orientation="horizontal"
|
||||
android:background="@color/colorF"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/colorH"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.2">
|
||||
<LinearLayout
|
||||
android:id="@+id/top_bar"
|
||||
android:orientation="horizontal"
|
||||
android:background="@color/colorF"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/all_calls"
|
||||
android:src="@drawable/history_all"
|
||||
android:background="@drawable/toolbar_button"
|
||||
android:contentDescription="@string/content_description_all_contacts"
|
||||
android:padding="15dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
<RelativeLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.2">
|
||||
|
||||
<View
|
||||
android:id="@+id/all_calls_select"
|
||||
android:background="@color/colorA"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="5dp"
|
||||
android:layout_alignParentBottom="true"/>
|
||||
</RelativeLayout>
|
||||
<ImageView
|
||||
android:id="@+id/all_calls"
|
||||
android:src="@drawable/history_all"
|
||||
android:background="@drawable/toolbar_button"
|
||||
android:contentDescription="@string/content_description_all_contacts"
|
||||
android:padding="15dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.2">
|
||||
<View
|
||||
android:id="@+id/all_calls_select"
|
||||
android:background="@color/colorA"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="5dp"
|
||||
android:layout_alignParentBottom="true"/>
|
||||
</RelativeLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/missed_calls"
|
||||
android:src="@drawable/history_missed"
|
||||
android:background="@drawable/toolbar_button"
|
||||
android:contentDescription="@string/content_description_linphone_contacts"
|
||||
android:gravity="center"
|
||||
android:padding="15dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
<RelativeLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.2">
|
||||
|
||||
<View
|
||||
android:id="@+id/missed_calls_select"
|
||||
android:background="@color/colorA"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="5dp"
|
||||
android:visibility="gone"
|
||||
android:layout_alignParentBottom="true"/>
|
||||
</RelativeLayout>
|
||||
<ImageView
|
||||
android:id="@+id/missed_calls"
|
||||
android:src="@drawable/history_missed"
|
||||
android:background="@drawable/toolbar_button"
|
||||
android:contentDescription="@string/content_description_linphone_contacts"
|
||||
android:gravity="center"
|
||||
android:padding="15dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.4"/>
|
||||
<View
|
||||
android:id="@+id/missed_calls_select"
|
||||
android:background="@color/colorA"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="5dp"
|
||||
android:visibility="gone"
|
||||
android:layout_alignParentBottom="true"/>
|
||||
</RelativeLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/edit"
|
||||
android:src="@drawable/delete"
|
||||
android:background="@drawable/toolbar_button"
|
||||
android:contentDescription="@string/content_description_edit_list"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.2"
|
||||
android:padding="15dp"/>
|
||||
</LinearLayout>
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.4"/>
|
||||
|
||||
<include layout="@layout/edit_list"/>
|
||||
<ImageView
|
||||
android:id="@+id/edit"
|
||||
android:src="@drawable/delete"
|
||||
android:background="@drawable/toolbar_button"
|
||||
android:contentDescription="@string/content_description_edit_list"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.2"
|
||||
android:padding="15dp"/>
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/history_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:divider="@color/colorE"
|
||||
android:cacheColorHint="@color/transparent"
|
||||
android:dividerHeight="1dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<include layout="@layout/edit_list"/>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/history_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:divider="@color/colorE"
|
||||
android:cacheColorHint="@color/transparent"
|
||||
android:dividerHeight="1dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/no_call_history"
|
||||
android:text="@string/no_call_history"
|
||||
style="@style/font6"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"/>
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/no_missed_call_history"
|
||||
android:text="@string/no_missed_call_history"
|
||||
style="@style/font6"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"/>
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"/>
|
||||
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
|
|
@ -5,29 +5,29 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<fragment
|
||||
android:id="@+id/status"
|
||||
android:name="org.linphone.fragments.StatusFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
tools:layout="@layout/status" />
|
||||
<fragment
|
||||
android:id="@+id/status"
|
||||
android:name="org.linphone.fragments.StatusFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
tools:layout="@layout/status" />
|
||||
|
||||
<android.support.v4.widget.DrawerLayout
|
||||
android:id="@+id/side_menu"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@id/status">
|
||||
<androidx.drawerlayout.widget.DrawerLayout
|
||||
android:id="@+id/side_menu"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@id/status">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/top_bar"
|
||||
android:id="@+id/top_bar"
|
||||
android:visibility="gone"
|
||||
android:orientation="horizontal"
|
||||
android:background="@color/colorF"
|
||||
android:layout_width="match_parent"
|
||||
android:background="@color/colorF"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp">
|
||||
|
||||
<ImageView
|
||||
|
@ -40,256 +40,256 @@
|
|||
android:layout_weight="0.2"
|
||||
android:padding="18dp"/>
|
||||
|
||||
<TextView
|
||||
<TextView
|
||||
android:id="@+id/top_bar_title"
|
||||
style="@style/font1"
|
||||
style="@style/font1"
|
||||
android:maxLines="1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.4"
|
||||
android:gravity="center"
|
||||
android:padding="15dp"/>
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.2"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:layout_above="@id/footer"
|
||||
android:layout_below="@id/top_bar">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:layout_above="@id/footer"
|
||||
android:layout_below="@id/top_bar">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentTop="true">
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentTop="true">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/fragmentContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal" />
|
||||
</FrameLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/fragmentContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal" />
|
||||
</FrameLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/footer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:orientation="horizontal">
|
||||
<LinearLayout
|
||||
android:id="@+id/footer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/history"
|
||||
android:background="@drawable/footer_button"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent">
|
||||
<RelativeLayout
|
||||
android:id="@+id/history"
|
||||
android:background="@drawable/footer_button"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:src="@drawable/footer_history"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:contentDescription="@string/content_description_history"
|
||||
android:padding="15dp"
|
||||
android:layout_centerInParent="true"/>
|
||||
<ImageView
|
||||
android:src="@drawable/footer_history"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:contentDescription="@string/content_description_history"
|
||||
android:padding="15dp"
|
||||
android:layout_centerInParent="true"/>
|
||||
|
||||
<View
|
||||
android:id="@+id/history_select"
|
||||
android:background="@color/colorA"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="5dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:visibility="gone"/>
|
||||
<View
|
||||
android:id="@+id/history_select"
|
||||
android:background="@color/colorA"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="5dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/missed_calls"
|
||||
android:background="@drawable/unread_message_count_bg"
|
||||
style="@style/font18"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="15dp"
|
||||
android:gravity="center"
|
||||
android:visibility="gone"/>
|
||||
<TextView
|
||||
android:id="@+id/missed_calls"
|
||||
android:background="@drawable/unread_message_count_bg"
|
||||
style="@style/font18"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="15dp"
|
||||
android:gravity="center"
|
||||
android:visibility="gone"/>
|
||||
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/contacts"
|
||||
android:background="@drawable/footer_button"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent">
|
||||
<RelativeLayout
|
||||
android:id="@+id/contacts"
|
||||
android:background="@drawable/footer_button"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:src="@drawable/footer_contacts"
|
||||
android:contentDescription="@string/content_description_contacts"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="15dp"
|
||||
android:layout_centerInParent="true"/>
|
||||
<ImageView
|
||||
android:src="@drawable/footer_contacts"
|
||||
android:contentDescription="@string/content_description_contacts"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="15dp"
|
||||
android:layout_centerInParent="true"/>
|
||||
|
||||
<View
|
||||
android:id="@+id/contacts_select"
|
||||
android:background="@color/colorA"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="5dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:visibility="gone"/>
|
||||
</RelativeLayout>
|
||||
<View
|
||||
android:id="@+id/contacts_select"
|
||||
android:background="@color/colorA"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="5dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:visibility="gone"/>
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/dialer"
|
||||
android:background="@drawable/footer_button"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent">
|
||||
<RelativeLayout
|
||||
android:id="@+id/dialer"
|
||||
android:background="@drawable/footer_button"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:src="@drawable/footer_dialer"
|
||||
android:contentDescription="@string/content_description_dialer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="15dp"
|
||||
android:layout_centerInParent="true"/>
|
||||
<ImageView
|
||||
android:src="@drawable/footer_dialer"
|
||||
android:contentDescription="@string/content_description_dialer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="15dp"
|
||||
android:layout_centerInParent="true"/>
|
||||
|
||||
<View
|
||||
android:id="@+id/dialer_select"
|
||||
android:background="@color/colorA"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="5dp"
|
||||
android:layout_alignParentBottom="true"/>
|
||||
<View
|
||||
android:id="@+id/dialer_select"
|
||||
android:background="@color/colorA"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="5dp"
|
||||
android:layout_alignParentBottom="true"/>
|
||||
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/chat"
|
||||
android:background="@drawable/footer_button"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent">
|
||||
<RelativeLayout
|
||||
android:id="@+id/chat"
|
||||
android:background="@drawable/footer_button"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:src="@drawable/footer_chat"
|
||||
android:contentDescription="@string/content_description_chat_button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="15dp"
|
||||
android:layout_centerInParent="true" />
|
||||
<ImageView
|
||||
android:src="@drawable/footer_chat"
|
||||
android:contentDescription="@string/content_description_chat_button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="15dp"
|
||||
android:layout_centerInParent="true" />
|
||||
|
||||
<View
|
||||
android:id="@+id/chat_select"
|
||||
android:background="@color/colorA"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="5dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:visibility="gone"/>
|
||||
<View
|
||||
android:id="@+id/chat_select"
|
||||
android:background="@color/colorA"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="5dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/missed_chats"
|
||||
android:background="@drawable/unread_message_count_bg"
|
||||
style="@style/font18"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="15dp"
|
||||
android:gravity="center"
|
||||
android:visibility="gone"/>
|
||||
<TextView
|
||||
android:id="@+id/missed_chats"
|
||||
android:background="@drawable/unread_message_count_bg"
|
||||
style="@style/font18"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="15dp"
|
||||
android:gravity="center"
|
||||
android:visibility="gone"/>
|
||||
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/fragmentContainer2"
|
||||
android:visibility="gone"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
<LinearLayout
|
||||
android:id="@+id/fragmentContainer2"
|
||||
android:visibility="gone"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
<!-- Side Menu -->
|
||||
<RelativeLayout
|
||||
android:id="@+id/side_menu_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="left">
|
||||
<!-- Side Menu -->
|
||||
<RelativeLayout
|
||||
android:id="@+id/side_menu_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="left">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/side_menu_quit"
|
||||
android:background="@color/colorA"
|
||||
android:gravity="bottom"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp">
|
||||
<RelativeLayout
|
||||
android:id="@+id/side_menu_quit"
|
||||
android:background="@color/colorA"
|
||||
android:gravity="bottom"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/quit_button"
|
||||
android:src="@drawable/quit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="5dp"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_centerVertical="true" />
|
||||
<ImageView
|
||||
android:id="@+id/quit_button"
|
||||
android:src="@drawable/quit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="5dp"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_centerVertical="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/quit"
|
||||
android:text="@string/quit"
|
||||
style="@style/font14"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toRightOf="@id/quit_button"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_centerInParent="true"/>
|
||||
</RelativeLayout>
|
||||
<TextView
|
||||
android:id="@+id/quit"
|
||||
android:text="@string/quit"
|
||||
style="@style/font14"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toRightOf="@id/quit_button"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_centerInParent="true"/>
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/colorH"
|
||||
android:layout_above="@id/side_menu_quit"
|
||||
android:orientation="vertical">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/colorH"
|
||||
android:layout_above="@id/side_menu_quit"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include layout="@layout/side_menu_main_account"/>
|
||||
<include layout="@layout/side_menu_main_account"/>
|
||||
|
||||
<ListView
|
||||
android:id="@+id/accounts_list"
|
||||
android:background="@color/colorH"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:choiceMode="singleChoice"
|
||||
android:cacheColorHint="@color/transparent"
|
||||
android:divider="@android:color/transparent"
|
||||
android:dividerHeight="0dp"/>
|
||||
<ListView
|
||||
android:id="@+id/accounts_list"
|
||||
android:background="@color/colorH"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:choiceMode="singleChoice"
|
||||
android:cacheColorHint="@color/transparent"
|
||||
android:divider="@android:color/transparent"
|
||||
android:dividerHeight="0dp"/>
|
||||
|
||||
<ListView
|
||||
android:id="@+id/item_list"
|
||||
android:background="@color/colorH"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:choiceMode="singleChoice"
|
||||
android:divider="@color/colorE"
|
||||
android:listSelector="@color/colorH"
|
||||
android:footerDividersEnabled="true"
|
||||
android:dividerHeight="1dp"/>
|
||||
<ListView
|
||||
android:id="@+id/item_list"
|
||||
android:background="@color/colorH"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:choiceMode="singleChoice"
|
||||
android:divider="@color/colorE"
|
||||
android:listSelector="@color/colorH"
|
||||
android:footerDividersEnabled="true"
|
||||
android:dividerHeight="1dp"/>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/colorE"/>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/colorE"/>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</android.support.v4.widget.DrawerLayout>
|
||||
</androidx.drawerlayout.widget.DrawerLayout>
|
||||
|
||||
</RelativeLayout>
|
|
@ -12,10 +12,14 @@
|
|||
<color name="colorJ">#ffa645</color>
|
||||
<color name="colorK">#3eb5c0</color>
|
||||
<color name="colorL">#96c11f</color>
|
||||
<color name="colorM">#a2a2a2</color>
|
||||
<color name="colorN">#a1a1a1</color>
|
||||
<color name="notification_color_led">#FF8000</color>
|
||||
<color name="security_green">#96c11f</color>
|
||||
<color name="security_gray">#c2c2c2</color>
|
||||
<color name="security_thumb">#ffffff</color>
|
||||
<color name="chat_bubble_incoming">#f3f3f3</color>
|
||||
<color name="chat_bubble_outgoing">#19ff5e00</color>
|
||||
|
||||
<color name="transparent">#00000000</color>
|
||||
<color name="linphone_launcher_icon_background">@color/colorA</color>
|
||||
|
|
|
@ -87,7 +87,7 @@
|
|||
<bool name="disable_chat_send_file">false</bool>
|
||||
<string name="temp_photo_name">linphone-android-photo-temp</string>
|
||||
<string name="temp_photo_name_with_date">linphone-android-photo-%s</string>
|
||||
<bool name="lower_space_between_chat_bubbles_if_same_person">false</bool>
|
||||
<bool name="lower_space_between_chat_bubbles_if_same_person">true</bool>
|
||||
<bool name="allow_multiple_images_and_text">true</bool>
|
||||
<bool name="send_text_and_images_as_different_messages">true</bool>
|
||||
|
||||
|
|
|
@ -239,6 +239,7 @@
|
|||
<string name="security_level_downgraded">Security level downgraded because of %s</string>
|
||||
<string name="participant_max_count_exceeded">Max participant count exceeded by %s</string>
|
||||
<string name="unexpected_event">Unexpected event %i for %s</string>
|
||||
<string name="download_file">Download</string>
|
||||
|
||||
<!-- Status Bar -->
|
||||
<string name="status_connected">Registered</string>
|
||||
|
|
|
@ -144,30 +144,48 @@
|
|||
<item name="android:textStyle">bold</item>
|
||||
</style>
|
||||
|
||||
<style name="font26" parent="@android:style/TextAppearance.Medium">
|
||||
<item name="android:textColor">@color/colorD</item>
|
||||
<item name="android:textSize">12sp</item>
|
||||
</style>
|
||||
|
||||
<style name="font27" parent="@android:style/TextAppearance.Medium">
|
||||
<style name="imdn_read_font" parent="@android:style/TextAppearance.Medium">
|
||||
<item name="android:textColor">@color/colorK</item>
|
||||
<item name="android:textSize">15sp</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
</style>
|
||||
|
||||
<style name="font28" parent="@android:style/TextAppearance.Medium">
|
||||
<style name="imdn_delivered_sent_font" parent="@android:style/TextAppearance.Medium">
|
||||
<item name="android:textColor">@color/colorD</item>
|
||||
<item name="android:textSize">15sp</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
</style>
|
||||
|
||||
<style name="font29" parent="@android:style/TextAppearance.Medium">
|
||||
<style name="imdn_undelivered_font" parent="@android:style/TextAppearance.Medium">
|
||||
<item name="android:textColor">@color/colorI</item>
|
||||
<item name="android:textSize">15sp</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
</style>
|
||||
|
||||
<style name="font33" parent="@android:style/TextAppearance.Medium">
|
||||
<style name="chat_bubble_time_font" parent="@android:style/TextAppearance.Small">
|
||||
<item name="android:textColor">@color/colorM</item>
|
||||
<item name="android:textSize">13sp</item>
|
||||
<item name="android:fontFamily">sans-serif</item>
|
||||
<item name="android:textStyle">normal</item>
|
||||
<item name="android:lineSpacingExtra">0sp</item>
|
||||
</style>
|
||||
|
||||
<style name="chat_bubble_message_font" parent="@android:style/TextAppearance.Medium">
|
||||
<item name="android:textColor">@color/colorC</item>
|
||||
<item name="android:textSize">15sp</item>
|
||||
<item name="android:fontFamily">sans-serif</item>
|
||||
<item name="android:textStyle">normal</item>
|
||||
<item name="android:lineSpacingExtra">-1.7sp</item>
|
||||
</style>
|
||||
|
||||
<style name="chat_bubble_file_name_font" parent="@android:style/TextAppearance.Medium">
|
||||
<item name="android:textColor">@color/colorH</item>
|
||||
<item name="android:textSize">11.7sp</item>
|
||||
<item name="android:fontFamily">sans-serif</item>
|
||||
<item name="android:textStyle">normal</item>
|
||||
</style>
|
||||
|
||||
<style name="contact_invite_font" parent="@android:style/TextAppearance.Medium">
|
||||
<item name="android:textColor">@color/colorA</item>
|
||||
<item name="android:textSize">16.7sp</item>
|
||||
<item name="android:fontFamily">sans-serif</item>
|
||||
|
@ -205,4 +223,12 @@
|
|||
<item name="android:textStyle">italic</item>
|
||||
</style>
|
||||
|
||||
<style name="font_group_chat_security_event" parent="@android:style/TextAppearance.Medium">
|
||||
<item name="android:textColor">@color/colorI</item>
|
||||
<item name="android:textSize">13sp</item>
|
||||
<item name="android:fontFamily">sans-serif</item>
|
||||
<item name="android:lineSpacingExtra">0sp</item>
|
||||
<item name="android:textStyle">italic</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
|
@ -5,3 +5,5 @@ RELEASE_KEY_ALIAS=
|
|||
RELEASE_KEY_PASSWORD=
|
||||
#source:https://docs.gradle.org/current/userguide/build_environment.html#sec:configuring_jvm_memory
|
||||
org.gradle.jvmargs=-Xmx2g -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
|
||||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
||||
|
|
Loading…
Reference in a new issue