~singpolyma/cheogram-android

c5e8ca47289b480d128ab95f572d2ca1d44300cb — Stephen Paul Weber 4 months ago 4ba4e7a
Spinner when loading list of commands
A src/cheogram/res/layout/command_progress_bar.xml => src/cheogram/res/layout/command_progress_bar.xml +13 -0
@@ 0,0 1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto">

        <ProgressBar
            android:id="@+id/progressbar"
            android:layout_width="match_parent"
            android:layout_height="130dp"
            android:paddingLeft="8dp"
            android:paddingRight="8dp"
            android:paddingBottom="16dp" />

</layout>

M src/main/java/eu/siacs/conversations/ui/ConversationFragment.java => src/main/java/eu/siacs/conversations/ui/ConversationFragment.java +1 -0
@@ 2543,6 2543,7 @@ public class ConversationFragment extends XmppFragment

                activity.runOnUiThread(() -> {
                    if (iq.getType() == IqPacket.TYPE.RESULT) {
                        binding.commandsViewProgressbar.setVisibility(View.GONE);
                        commandAdapter.clear();
                        for (Element child : iq.query().getChildren()) {
                            if (!"item".equals(child.getName()) || !Namespace.DISCO_ITEMS.equals(child.getNamespace())) continue;

M src/main/res/layout/fragment_conversation.xml => src/main/res/layout/fragment_conversation.xml +23 -9
@@ 191,16 191,30 @@
                </RelativeLayout>
		        </RelativeLayout>

            <ListView
                android:id="@+id/commands_view"
            <RelativeLayout
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_alignParentStart="true"
                android:layout_alignParentLeft="true"
                android:layout_alignParentTop="true"
                android:background="?attr/color_background_secondary"
                android:divider="@android:color/transparent"
                android:dividerHeight="0dp"></ListView>
                android:layout_height="fill_parent">

                <ListView
                    android:id="@+id/commands_view"
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:layout_alignParentStart="true"
                    android:layout_alignParentLeft="true"
                    android:layout_alignParentTop="true"
                    android:background="?attr/color_background_secondary"
                    android:divider="@android:color/transparent"
                    android:dividerHeight="0dp"></ListView>

                <ProgressBar
                    android:id="@+id/commands_view_progressbar"
                    android:layout_width="match_parent"
                    android:layout_height="130dp"
                    android:paddingLeft="8dp"
                    android:paddingRight="8dp"
                    android:paddingBottom="16dp" />

            </RelativeLayout>

        </androidx.viewpager.widget.ViewPager>