Fix merge
This commit is contained in:
parent
6c2c9266e0
commit
690cfecbba
5 changed files with 29 additions and 31 deletions
|
@ -7,7 +7,6 @@
|
|||
android:gravity="left"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/contact_picture"
|
||||
android:layout_width="40dp"
|
||||
|
@ -40,12 +39,21 @@
|
|||
|
||||
<ImageView
|
||||
android:id="@+id/image"
|
||||
android:visibility="gone"
|
||||
android:adjustViewBounds="true"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxWidth="250dp"
|
||||
android:maxHeight="250dp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/download"
|
||||
android:visibility="gone"
|
||||
android:text="@string/download_image"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ProgressBar
|
||||
|
|
|
@ -52,7 +52,6 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/date"
|
||||
android:text="09:12"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/contact_picture"
|
||||
|
|
|
@ -22,6 +22,7 @@ import java.io.ByteArrayInputStream;
|
|||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.File;
|
||||
|
||||
import android.app.Fragment;
|
||||
import android.graphics.Matrix;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
@ -60,7 +61,6 @@ import android.os.Bundle;
|
|||
import android.os.Environment;
|
||||
import android.os.Parcelable;
|
||||
import android.provider.MediaStore;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.text.Editable;
|
||||
import android.text.InputType;
|
||||
import android.text.TextWatcher;
|
||||
|
@ -296,7 +296,7 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
|
|||
if (isOrientationLandscape && topBar != null) {
|
||||
topBar.setVisibility(View.GONE);
|
||||
}
|
||||
contactPicture.setVisibility(View.GONE);
|
||||
//contactPicture.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
public void hideKeyboardVisibleMode() {
|
||||
|
|
|
@ -51,6 +51,9 @@ import org.linphone.ui.AddressText;
|
|||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Activity;
|
||||
import android.app.Fragment;
|
||||
import android.app.FragmentManager;
|
||||
import android.app.FragmentTransaction;
|
||||
import android.app.SearchManager;
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
|
@ -63,13 +66,6 @@ import android.graphics.BitmapFactory;
|
|||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.provider.ContactsContract;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.app.Fragment.SavedState;
|
||||
import android.support.v4.app.FragmentActivity;
|
||||
import android.support.v4.app.FragmentManager;
|
||||
import android.support.v4.app.FragmentTransaction;
|
||||
import android.support.v4.app.ActionBarDrawerToggle;
|
||||
import android.support.v4.view.GravityCompat;
|
||||
import android.view.Gravity;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.LayoutInflater;
|
||||
|
@ -100,7 +96,7 @@ import android.support.v4.view.GravityCompat;
|
|||
/**
|
||||
* @author Sylvain Berfini
|
||||
*/
|
||||
public class LinphoneActivity extends FragmentActivity implements OnClickListener, ContactPicked {
|
||||
public class LinphoneActivity extends Activity implements OnClickListener, ContactPicked {
|
||||
public static final String PREF_FIRST_LAUNCH = "pref_first_launch";
|
||||
private static final int SETTINGS_ACTIVITY = 123;
|
||||
private static final int FIRST_LOGIN_ACTIVITY = 101;
|
||||
|
@ -119,7 +115,7 @@ public class LinphoneActivity extends FragmentActivity implements OnClickListene
|
|||
private List<FragmentsAvailable> fragmentsHistory;
|
||||
private Fragment dialerFragment, messageListFragment, friendStatusListenerFragment;
|
||||
private ChatFragment chatFragment;
|
||||
private SavedState dialerSavedState;
|
||||
private Fragment.SavedState dialerSavedState;
|
||||
private boolean newProxyConfig;
|
||||
private boolean isAnimationDisabled = false, preferLinphoneContacts = false;
|
||||
private OrientationEventListener mOrientationHelper;
|
||||
|
@ -198,7 +194,7 @@ public class LinphoneActivity extends FragmentActivity implements OnClickListene
|
|||
if (findViewById(R.id.fragmentContainer) != null) {
|
||||
dialerFragment = new DialerFragment();
|
||||
dialerFragment.setArguments(getIntent().getExtras());
|
||||
getSupportFragmentManager().beginTransaction().add(R.id.fragmentContainer, dialerFragment, currentFragment.toString()).commit();
|
||||
getFragmentManager().beginTransaction().add(R.id.fragmentContainer, dialerFragment, currentFragment.toString()).commit();
|
||||
selectMenu(FragmentsAvailable.DIALER);
|
||||
}
|
||||
}
|
||||
|
@ -575,7 +571,7 @@ public class LinphoneActivity extends FragmentActivity implements OnClickListene
|
|||
|
||||
if (currentFragment == FragmentsAvailable.DIALER) {
|
||||
try {
|
||||
dialerSavedState = getSupportFragmentManager().saveFragmentInstanceState(dialerFragment);
|
||||
dialerSavedState = getFragmentManager().saveFragmentInstanceState(dialerFragment);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}
|
||||
|
@ -661,7 +657,7 @@ public class LinphoneActivity extends FragmentActivity implements OnClickListene
|
|||
}*/
|
||||
|
||||
|
||||
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
|
||||
FragmentTransaction transaction = getFragmentManager().beginTransaction();
|
||||
|
||||
if (!withoutAnimation && !isAnimationDisabled && currentFragment.shouldAnimate()) {
|
||||
if (newFragmentType.isRightOf(currentFragment)) {
|
||||
|
@ -687,7 +683,7 @@ public class LinphoneActivity extends FragmentActivity implements OnClickListene
|
|||
}
|
||||
transaction.replace(R.id.fragmentContainer, newFragment, newFragmentType.toString());
|
||||
transaction.commitAllowingStateLoss();
|
||||
getSupportFragmentManager().executePendingTransactions();
|
||||
getFragmentManager().executePendingTransactions();
|
||||
|
||||
currentFragment = newFragmentType;
|
||||
}
|
||||
|
@ -706,7 +702,7 @@ public class LinphoneActivity extends FragmentActivity implements OnClickListene
|
|||
|
||||
LinearLayout ll = (LinearLayout) findViewById(R.id.fragmentContainer2);
|
||||
|
||||
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
|
||||
FragmentTransaction transaction = getFragmentManager().beginTransaction();
|
||||
if (newFragmentType.shouldAddItselfToTheRightOf(currentFragment)) {
|
||||
ll.setVisibility(View.VISIBLE);
|
||||
|
||||
|
@ -735,7 +731,7 @@ public class LinphoneActivity extends FragmentActivity implements OnClickListene
|
|||
transaction.replace(R.id.fragmentContainer, newFragment);
|
||||
}
|
||||
transaction.commitAllowingStateLoss();
|
||||
getSupportFragmentManager().executePendingTransactions();
|
||||
getFragmentManager().executePendingTransactions();
|
||||
|
||||
currentFragment = newFragmentType;
|
||||
if (newFragmentType == FragmentsAvailable.DIALER
|
||||
|
@ -746,7 +742,7 @@ public class LinphoneActivity extends FragmentActivity implements OnClickListene
|
|||
|| newFragmentType == FragmentsAvailable.CHATLIST
|
||||
|| newFragmentType == FragmentsAvailable.HISTORY) {
|
||||
try {
|
||||
getSupportFragmentManager().popBackStackImmediate(null, FragmentManager.POP_BACK_STACK_INCLUSIVE);
|
||||
getFragmentManager().popBackStackImmediate(null, FragmentManager.POP_BACK_STACK_INCLUSIVE);
|
||||
} catch (java.lang.IllegalStateException e) {
|
||||
|
||||
}
|
||||
|
@ -781,7 +777,7 @@ public class LinphoneActivity extends FragmentActivity implements OnClickListene
|
|||
String callTime = secondsToDisplayableString(log.getCallDuration());
|
||||
String callDate = String.valueOf(log.getTimestamp());
|
||||
|
||||
Fragment fragment2 = getSupportFragmentManager().findFragmentById(R.id.fragmentContainer2);
|
||||
Fragment fragment2 = getFragmentManager().findFragmentById(R.id.fragmentContainer2);
|
||||
if (fragment2 != null && fragment2.isVisible() && currentFragment == FragmentsAvailable.HISTORY_DETAIL) {
|
||||
HistoryDetailFragment historyDetailFragment = (HistoryDetailFragment) fragment2;
|
||||
historyDetailFragment.changeDisplayedHistory(sipUri, displayName, pictureUri, status, callTime, callDate);
|
||||
|
@ -809,7 +805,7 @@ public class LinphoneActivity extends FragmentActivity implements OnClickListene
|
|||
}
|
||||
|
||||
public void displayContact(Contact contact, boolean chatOnly) {
|
||||
Fragment fragment2 = getSupportFragmentManager().findFragmentById(R.id.fragmentContainer2);
|
||||
Fragment fragment2 = getFragmentManager().findFragmentById(R.id.fragmentContainer2);
|
||||
if (fragment2 != null && fragment2.isVisible() && currentFragment == FragmentsAvailable.CONTACT) {
|
||||
ContactFragment contactFragment = (ContactFragment) fragment2;
|
||||
contactFragment.changeDisplayedContact(contact);
|
||||
|
@ -881,7 +877,7 @@ public class LinphoneActivity extends FragmentActivity implements OnClickListene
|
|||
|
||||
if (isTablet()){
|
||||
if (currentFragment == FragmentsAvailable.CHATLIST || currentFragment == FragmentsAvailable.CHAT){
|
||||
Fragment fragment2 = getSupportFragmentManager().findFragmentById(R.id.fragmentContainer2);
|
||||
Fragment fragment2 = getFragmentManager().findFragmentById(R.id.fragmentContainer2);
|
||||
if (fragment2 != null && fragment2.isVisible() && currentFragment == FragmentsAvailable.CHAT) {
|
||||
ChatFragment chatFragment = (ChatFragment) fragment2;
|
||||
chatFragment.changeDisplayedChat(sipUri, displayName, pictureUri);
|
||||
|
|
|
@ -84,18 +84,13 @@ public class BubbleChat implements LinphoneChatMessage.LinphoneChatMessageListen
|
|||
}
|
||||
nativeMessage = message;
|
||||
mContext = context;
|
||||
layoutParams.setMargins(10, 0, 10, 0);
|
||||
view.setBackgroundResource(R.drawable.resizable_chat_bubble_outgoing);
|
||||
layoutParams.setMargins(10, 0, 10, 0);
|
||||
view.setBackgroundResource(R.drawable.resizable_chat_bubble_incoming);
|
||||
|
||||
|
||||
if (message.isOutgoing()) {
|
||||
view = (LinearLayout) LayoutInflater.from(context).inflate(R.layout.chat_bubble_outgoing, null);
|
||||
view.setBackgroundResource(R.drawable.chat_bubble_outgoing);
|
||||
view.setBackgroundResource(R.drawable.resizable_chat_bubble_outgoing);
|
||||
} else {
|
||||
view = (LinearLayout) LayoutInflater.from(context).inflate(R.layout.chat_bubble_incoming, null);
|
||||
view.setBackgroundResource(R.drawable.chat_bubble_incoming);
|
||||
view.setBackgroundResource(R.drawable.resizable_chat_bubble_incoming);
|
||||
}
|
||||
|
||||
view.setId(message.getStorageId());
|
||||
|
@ -156,7 +151,7 @@ public class BubbleChat implements LinphoneChatMessage.LinphoneChatMessageListen
|
|||
}
|
||||
}
|
||||
|
||||
TextView contact = (TextView) layout.findViewById(R.id.contact_header);
|
||||
TextView contact = (TextView) view.findViewById(R.id.contact_header);
|
||||
contact.setText(timestampToHumanDate(context, message.getTime()) + " - " + LinphoneUtils.getUsernameFromAddress(message.getFrom().asStringUriOnly()));
|
||||
|
||||
LinphoneChatMessage.State status = message.getStatus();
|
||||
|
|
Loading…
Reference in a new issue