Commit 1483458f authored by Lucio Maciel's avatar Lucio Maciel Committed by GitHub

Merge branch 'develop' into userstatus-on-toolbar

parents 78b7b4e2 a906c68f
...@@ -85,6 +85,25 @@ public class MainActivity extends AbstractAuthedActivity implements MainContract ...@@ -85,6 +85,25 @@ public class MainActivity extends AbstractAuthedActivity implements MainContract
pane.openPane(); pane.openPane();
} }
}); });
//ref: ActionBarDrawerToggle#setProgress
pane.setPanelSlideListener(new SlidingPaneLayout.PanelSlideListener() {
@Override
public void onPanelSlide(View panel, float slideOffset) {
drawerArrowDrawable.setProgress(slideOffset);
}
@Override
public void onPanelOpened(View panel) {
drawerArrowDrawable.setVerticalMirror(true);
}
@Override
public void onPanelClosed(View panel) {
drawerArrowDrawable.setVerticalMirror(false);
closeUserActionContainer();
}
});
} }
private boolean closeSidebarIfNeeded() { private boolean closeSidebarIfNeeded() {
...@@ -137,6 +156,14 @@ public class MainActivity extends AbstractAuthedActivity implements MainContract ...@@ -137,6 +156,14 @@ public class MainActivity extends AbstractAuthedActivity implements MainContract
.commit(); .commit();
} }
private void closeUserActionContainer() {
SidebarMainFragment sidebarFragment = (SidebarMainFragment) getSupportFragmentManager()
.findFragmentById(R.id.sidebar_fragment_container);
if (sidebarFragment != null) {
sidebarFragment.closeUserActionContainer();
}
}
@Override @Override
protected void onRoomIdUpdated() { protected void onRoomIdUpdated() {
super.onRoomIdUpdated(); super.onRoomIdUpdated();
......
...@@ -89,11 +89,11 @@ public class TwoStepAuthFragment extends AbstractServerConfigFragment ...@@ -89,11 +89,11 @@ public class TwoStepAuthFragment extends AbstractServerConfigFragment
protected void onSetupView() { protected void onSetupView() {
waitingView = rootView.findViewById(R.id.waiting); waitingView = rootView.findViewById(R.id.waiting);
final TextView twoStepCodeTextView = (TextView) rootView.findViewById(R.id.two_step_code); final TextView twoStepCodeTextView = rootView.findViewById(R.id.two_step_code);
twoStepCodeTextView.requestFocus();
submitButton = rootView.findViewById(R.id.btn_two_step_login); submitButton = rootView.findViewById(R.id.btn_two_step_login);
submitButton.setOnClickListener(view -> { submitButton.setOnClickListener(v -> presenter.onCode(twoStepCodeTextView.getText().toString()));
presenter.onCode(twoStepCodeTextView.getText().toString());
});
} }
} }
...@@ -166,12 +166,16 @@ public class SidebarMainFragment extends AbstractFragment implements SidebarMain ...@@ -166,12 +166,16 @@ public class SidebarMainFragment extends AbstractFragment implements SidebarMain
RxCompoundButton.checkedChanges(toggleUserAction) RxCompoundButton.checkedChanges(toggleUserAction)
.compose(bindToLifecycle()) .compose(bindToLifecycle())
.subscribe( .subscribe(
aBoolean -> rootView.findViewById(R.id.user_action_outer_container) this::showUserActionContainer,
.setVisibility(aBoolean ? View.VISIBLE : View.GONE),
Logger::report Logger::report
); );
} }
private void showUserActionContainer(boolean show) {
rootView.findViewById(R.id.user_action_outer_container)
.setVisibility(show ? View.VISIBLE : View.GONE);
}
@Override @Override
public void showScreen() { public void showScreen() {
rootView.setVisibility(View.VISIBLE); rootView.setVisibility(View.VISIBLE);
...@@ -256,7 +260,7 @@ public class SidebarMainFragment extends AbstractFragment implements SidebarMain ...@@ -256,7 +260,7 @@ public class SidebarMainFragment extends AbstractFragment implements SidebarMain
}); });
} }
private void closeUserActionContainer() { public void closeUserActionContainer() {
final CompoundButton toggleUserAction = rootView.findViewById(R.id.toggle_user_action); final CompoundButton toggleUserAction = rootView.findViewById(R.id.toggle_user_action);
if (toggleUserAction != null && toggleUserAction.isChecked()) { if (toggleUserAction != null && toggleUserAction.isChecked()) {
toggleUserAction.setChecked(false); toggleUserAction.setChecked(false);
......
...@@ -32,6 +32,7 @@ public class MessageListAdapter extends ExtModelListAdapter<Message, PairedMessa ...@@ -32,6 +32,7 @@ public class MessageListAdapter extends ExtModelListAdapter<Message, PairedMessa
public MessageListAdapter(Context context, String hostname) { public MessageListAdapter(Context context, String hostname) {
super(context); super(context);
this.hostname = hostname; this.hostname = hostname;
this.hasNext = true;
} }
public void setAbsoluteUrl(AbsoluteUrl absoluteUrl) { public void setAbsoluteUrl(AbsoluteUrl absoluteUrl) {
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
android:background="@android:color/white"
android:theme="@style/AppTheme"> android:theme="@style/AppTheme">
<include layout="@layout/list_item_message_newday" /> <include layout="@layout/list_item_message_newday" />
...@@ -63,6 +64,7 @@ ...@@ -63,6 +64,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:enabled="false" android:enabled="false"
android:textColor="@color/color_timestamp"
tools:text="12:34" /> tools:text="12:34" />
<View <View
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
android:background="@android:color/white"
android:theme="@style/AppTheme"> android:theme="@style/AppTheme">
<include layout="@layout/list_item_message_newday" /> <include layout="@layout/list_item_message_newday" />
...@@ -50,6 +51,7 @@ ...@@ -50,6 +51,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:enabled="false" android:enabled="false"
android:textColor="@color/color_timestamp"
tools:text="12:34" /> tools:text="12:34" />
<View <View
......
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="2dp" android:layout_marginTop="2dp"
android:layout_marginBottom="2dp" android:layout_marginBottom="2dp"
android:textColor="@color/color_embed_hostname"
android:enabled="false" /> android:enabled="false" />
<TextView <TextView
......
...@@ -4,6 +4,9 @@ ...@@ -4,6 +4,9 @@
<color name="color_shadow">#FFE6E6E7</color> <color name="color_shadow">#FFE6E6E7</color>
<color name="color_icon_composer">#FFA8A8A8</color> <color name="color_icon_composer">#FFA8A8A8</color>
<color name="color_timestamp">#FFA8A8A8</color>
<color name="color_embed_hostname">@color/color_timestamp</color>
<!-- User status colors--> <!-- User status colors-->
<color name="color_user_status_online">#FF4CAF50</color> <!-- Green 500 --> <color name="color_user_status_online">#FF4CAF50</color> <!-- Green 500 -->
<color name="color_user_status_busy">#FFF44336</color> <!-- Red 500--> <color name="color_user_status_busy">#FFF44336</color> <!-- Red 500-->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment