Create a white floating button, use '+'-Symbol for creating new chats and/or messages.
@@ -30,6 +30,7 @@ import android.view.View;
|
||||
import android.view.ViewOutlineProvider;
|
||||
import android.view.ViewTreeObserver;
|
||||
//import android.view.animation.AccelerateDecelerateInterpolator;
|
||||
import android.view.animation.AccelerateDecelerateInterpolator;
|
||||
import android.widget.EditText;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
@@ -83,15 +84,15 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
|
||||
//private ProgressBar progressView; // EDIT BY MR
|
||||
private LinearLayout emptyView;
|
||||
private ActionBarMenuItem passcodeItem;
|
||||
//private ImageView floatingButton;
|
||||
private ImageView floatingButton;
|
||||
|
||||
private AlertDialog permissionDialog;
|
||||
|
||||
//private int prevPosition;
|
||||
//private int prevTop;
|
||||
//private boolean scrollUpdated;
|
||||
//private boolean floatingHidden;
|
||||
//private final AccelerateDecelerateInterpolator floatingInterpolator = new AccelerateDecelerateInterpolator();
|
||||
private int prevPosition;
|
||||
private int prevTop;
|
||||
private boolean scrollUpdated;
|
||||
private boolean floatingHidden;
|
||||
private final AccelerateDecelerateInterpolator floatingInterpolator = new AccelerateDecelerateInterpolator();
|
||||
|
||||
private boolean checkPermission = true;
|
||||
|
||||
@@ -207,9 +208,9 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
|
||||
//progressView.setVisibility(View.GONE); // EDIT BY MR
|
||||
emptyView.setVisibility(View.GONE);
|
||||
}
|
||||
/*if (!onlySelect) {
|
||||
if (!onlySelect) {
|
||||
floatingButton.setVisibility(View.GONE);
|
||||
}*/
|
||||
}
|
||||
}
|
||||
updatePasscodeButton();
|
||||
}
|
||||
@@ -239,12 +240,12 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
|
||||
//progressView.setVisibility(View.GONE); // EDIT BY MR
|
||||
listView.setEmptyView(emptyView);
|
||||
}
|
||||
/*if (!onlySelect) {
|
||||
if (!onlySelect) {
|
||||
floatingButton.setVisibility(View.VISIBLE);
|
||||
floatingHidden = true;
|
||||
floatingButton.setTranslationY(AndroidUtilities.dp(100));
|
||||
hideFloatingButton(false);
|
||||
}*/
|
||||
}
|
||||
if (listView.getAdapter() != dialogsAdapter) {
|
||||
listView.setAdapter(dialogsAdapter);
|
||||
dialogsAdapter.notifyDataSetChanged();
|
||||
@@ -501,7 +502,7 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
|
||||
frameLayout.addView(progressView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.CENTER));
|
||||
*/
|
||||
|
||||
/*floatingButton = new ImageView(context);
|
||||
floatingButton = new ImageView(context);
|
||||
floatingButton.setVisibility(onlySelect ? View.GONE : View.VISIBLE);
|
||||
floatingButton.setScaleType(ImageView.ScaleType.CENTER);
|
||||
floatingButton.setBackgroundResource(R.drawable.floating_states);
|
||||
@@ -527,7 +528,7 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
|
||||
args.putBoolean("destroyAfterSelect", true);
|
||||
presentFragment(new ContactsActivity(args));
|
||||
}
|
||||
});*/
|
||||
});
|
||||
|
||||
listView.setOnScrollListener(new RecyclerView.OnScrollListener() {
|
||||
@Override
|
||||
@@ -555,7 +556,7 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
|
||||
}
|
||||
}
|
||||
|
||||
/*if (floatingButton.getVisibility() != View.GONE) {
|
||||
if (floatingButton.getVisibility() != View.GONE) {
|
||||
final View topChild = recyclerView.getChildAt(0);
|
||||
int firstViewTop = 0;
|
||||
if (topChild != null) {
|
||||
@@ -576,7 +577,7 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
|
||||
prevPosition = firstVisibleItem;
|
||||
prevTop = firstViewTop;
|
||||
scrollUpdated = true;
|
||||
}*/
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -750,7 +751,6 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
|
||||
@Override
|
||||
public void onConfigurationChanged(Configuration newConfig) {
|
||||
super.onConfigurationChanged(newConfig);
|
||||
/*
|
||||
if (!onlySelect && floatingButton != null) {
|
||||
floatingButton.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
|
||||
@Override
|
||||
@@ -767,7 +767,6 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
|
||||
}
|
||||
});
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -901,7 +900,6 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
private void hideFloatingButton(boolean hide) {
|
||||
if (floatingHidden == hide) {
|
||||
return;
|
||||
@@ -912,7 +910,6 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
|
||||
floatingButton.setClickable(!hide);
|
||||
animator.start();
|
||||
}
|
||||
*/
|
||||
|
||||
private void updateVisibleRows(int mask) {
|
||||
if (listView == null) {
|
||||
|
||||
|
Before Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 454 B |
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 503 B After Width: | Height: | Size: 466 B |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 395 B |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 372 B After Width: | Height: | Size: 406 B |
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="#ff4c8cc4">
|
||||
<item android:drawable="@drawable/floating_m"/>
|
||||
</ripple>
|
||||
|
Before Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 517 B |
|
Before Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 622 B After Width: | Height: | Size: 578 B |
|
Before Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 6.6 KiB |
|
Before Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 711 B |
|
Before Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 847 B After Width: | Height: | Size: 748 B |
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@drawable/floating_pressed" android:state_pressed="true" />
|
||||
<item android:drawable="@drawable/floating_pressed" android:state_selected="true" />
|
||||
<item android:drawable="@drawable/floating" />
|
||||
<item android:drawable="@drawable/floating3_profile" android:state_pressed="true" />
|
||||
<item android:drawable="@drawable/floating3_profile" android:state_selected="true" />
|
||||
<item android:drawable="@drawable/floating3_profile_pressed" />
|
||||
</selector>
|
||||