Commit a906c68f authored by Lucio Maciel's avatar Lucio Maciel Committed by GitHub

Merge pull request #412 from RocketChat/improvement/ui-fixes

Minor UI fixes
parents 81ef4d99 3915de3d
......@@ -107,6 +107,7 @@ public class MainActivity extends AbstractAuthedActivity implements MainContract
@Override
public void onPanelClosed(View panel) {
drawerArrowDrawable.setVerticalMirror(false);
closeUserActionContainer();
}
});
}
......@@ -161,6 +162,14 @@ public class MainActivity extends AbstractAuthedActivity implements MainContract
.commit();
}
private void closeUserActionContainer() {
SidebarMainFragment sidebarFragment = (SidebarMainFragment) getSupportFragmentManager()
.findFragmentById(R.id.sidebar_fragment_container);
if (sidebarFragment != null) {
sidebarFragment.closeUserActionContainer();
}
}
@Override
protected void onRoomIdUpdated() {
super.onRoomIdUpdated();
......
......@@ -89,11 +89,11 @@ public class TwoStepAuthFragment extends AbstractServerConfigFragment
protected void onSetupView() {
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.setOnClickListener(view -> {
presenter.onCode(twoStepCodeTextView.getText().toString());
});
submitButton.setOnClickListener(v -> presenter.onCode(twoStepCodeTextView.getText().toString()));
}
}
......@@ -166,12 +166,16 @@ public class SidebarMainFragment extends AbstractFragment implements SidebarMain
RxCompoundButton.checkedChanges(toggleUserAction)
.compose(bindToLifecycle())
.subscribe(
aBoolean -> rootView.findViewById(R.id.user_action_outer_container)
.setVisibility(aBoolean ? View.VISIBLE : View.GONE),
this::showUserActionContainer,
Logger::report
);
}
private void showUserActionContainer(boolean show) {
rootView.findViewById(R.id.user_action_outer_container)
.setVisibility(show ? View.VISIBLE : View.GONE);
}
@Override
public void showScreen() {
rootView.setVisibility(View.VISIBLE);
......@@ -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);
if (toggleUserAction != null && toggleUserAction.isChecked()) {
toggleUserAction.setChecked(false);
......
......@@ -32,6 +32,7 @@ public class MessageListAdapter extends ExtModelListAdapter<Message, PairedMessa
public MessageListAdapter(Context context, String hostname) {
super(context);
this.hostname = hostname;
this.hasNext = true;
}
public void setAbsoluteUrl(AbsoluteUrl absoluteUrl) {
......
......@@ -5,6 +5,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="@android:color/white"
android:theme="@style/AppTheme">
<include layout="@layout/list_item_message_newday" />
......@@ -63,6 +64,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:enabled="false"
android:textColor="@color/color_timestamp"
tools:text="12:34" />
<View
......
......@@ -5,6 +5,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="@android:color/white"
android:theme="@style/AppTheme">
<include layout="@layout/list_item_message_newday" />
......@@ -50,6 +51,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:enabled="false"
android:textColor="@color/color_timestamp"
tools:text="12:34" />
<View
......
......@@ -36,6 +36,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:layout_marginBottom="2dp"
android:textColor="@color/color_embed_hostname"
android:enabled="false" />
<TextView
......
......@@ -3,4 +3,6 @@
<color name="color_accent">#FF2D91FA</color>
<color name="color_shadow">#FFE6E6E7</color>
<color name="color_icon_composer">#FFA8A8A8</color>
<color name="color_timestamp">#FFA8A8A8</color>
<color name="color_embed_hostname">@color/color_timestamp</color>
</resources>
\ No newline at end of file
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