picker layout

This commit is contained in:
Thomas 2020-09-17 07:28:52 +02:00
parent 7f4c6faa1d
commit b23686ab64
4 changed files with 67 additions and 55 deletions

View File

@ -228,4 +228,5 @@
<string name="followers_instance">%1$s followers instances</string>
<string name="help">Help</string>
<string name="sensitive_video"> Sensitive videos</string>
<string name="pickup_categories">Pickup categories</string>
</resources>

View File

@ -245,4 +245,6 @@
<string name="sensitive_content">Sensitive content: %1$s</string>
<string name="followers_instance">%1$s followers instances</string>
<string name="help">Help</string>
<string name="pickup_categories">Pickup categories</string>
</resources>

View File

@ -66,7 +66,7 @@ public class InstancePickerActivity extends AppCompatActivity {
textviewNoAction = findViewById(R.id.no_action);
mainLoader.setVisibility(View.VISIBLE);
RelativeLayout checkbox_container = findViewById(R.id.checkbox_container);
/*RelativeLayout checkbox_container = findViewById(R.id.checkbox_container);
LinkedHashMap<Integer, String> categories = peertubeInformation.getCategories();
if (categories != null && categories.size() > 0) {
Iterator<Map.Entry<Integer, String>> it = categories.entrySet().iterator();
@ -77,7 +77,7 @@ public class InstancePickerActivity extends AppCompatActivity {
checkbox_container.addView(cb);
it.remove();
}
}
}*/
mainLoader.setVisibility(View.VISIBLE);

View File

@ -18,6 +18,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="@dimen/fab_margin"
android:fitsSystemWindows="true">
<androidx.coordinatorlayout.widget.CoordinatorLayout
@ -30,15 +31,24 @@
android:layout_height="wrap_content"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/checkbox_container"
<Button
android:id="@+id/pickup_categories"
style="@style/Base.Widget.AppCompat.Button.Colored"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/pickup_categories" />
<TextView
android:id="@+id/categories"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
android:orientation="horizontal"
android:showDividers="end">
<TextView
android:layout_width="wrap_content"
@ -52,62 +62,61 @@
android:layout_marginStart="10dp" />
</LinearLayout>
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="@dimen/fab_margin">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/lv_instances"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scrollbars="none" />
<RelativeLayout
android:id="@+id/no_action"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone">
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:padding="10dp"
android:text="@string/action_instance_empty_content"
android:textSize="25sp" />
</RelativeLayout>
<!-- Main Loader -->
<RelativeLayout
android:id="@+id/loader"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:visibility="gone">
android:orientation="vertical"
android:padding="@dimen/fab_margin">
<ProgressBar
android:layout_width="wrap_content"
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/lv_instances"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:indeterminate="true" />
</RelativeLayout>
<!-- Loader for next status -->
<RelativeLayout
android:id="@+id/loading_next_status"
android:layout_width="match_parent"
android:layout_height="20dp"
android:layout_alignParentBottom="true"
android:layout_gravity="bottom|center_horizontal"
android:gravity="bottom|center_horizontal"
android:visibility="gone">
android:scrollbars="none" />
<ProgressBar
<RelativeLayout
android:id="@+id/no_action"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone">
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:padding="10dp"
android:text="@string/action_instance_empty_content"
android:textSize="25sp" />
</RelativeLayout>
<!-- Main Loader -->
<RelativeLayout
android:id="@+id/loader"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:indeterminate="true" />
</RelativeLayout>
</RelativeLayout>
android:gravity="center"
android:visibility="gone">
<ProgressBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:indeterminate="true" />
</RelativeLayout>
<!-- Loader for next status -->
<RelativeLayout
android:id="@+id/loading_next_status"
android:layout_width="match_parent"
android:layout_height="20dp"
android:layout_gravity="bottom|center_horizontal"
android:gravity="bottom|center_horizontal"
android:visibility="gone">
<ProgressBar
android:layout_width="match_parent"
android:layout_height="match_parent"
android:indeterminate="true" />
</RelativeLayout>
</LinearLayout>
</LinearLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</androidx.drawerlayout.widget.DrawerLayout>