mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
parent
c04cb8cb9f
commit
ada67e012c
2 changed files with 35 additions and 0 deletions
|
|
@ -9,6 +9,7 @@ import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
import android.support.annotation.Nullable;
|
import android.support.annotation.Nullable;
|
||||||
|
import android.support.constraint.ConstraintLayout;
|
||||||
import android.support.design.widget.BottomSheetBehavior;
|
import android.support.design.widget.BottomSheetBehavior;
|
||||||
import android.support.design.widget.Snackbar;
|
import android.support.design.widget.Snackbar;
|
||||||
import android.support.v4.app.FragmentTransaction;
|
import android.support.v4.app.FragmentTransaction;
|
||||||
|
|
@ -16,6 +17,7 @@ import android.support.v7.app.AlertDialog;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.FrameLayout;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
import android.widget.ProgressBar;
|
import android.widget.ProgressBar;
|
||||||
|
|
||||||
|
|
@ -64,6 +66,10 @@ public class NearbyFragment extends CommonsDaggerSupportFragment
|
||||||
LinearLayout bottomSheetDetails;
|
LinearLayout bottomSheetDetails;
|
||||||
@BindView(R.id.transparentView)
|
@BindView(R.id.transparentView)
|
||||||
View transparentView;
|
View transparentView;
|
||||||
|
@BindView(R.id.container_sheet)
|
||||||
|
FrameLayout frameLayout;
|
||||||
|
@BindView(R.id.loading_nearby_list)
|
||||||
|
ConstraintLayout loading_nearby_layout;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
LocationServiceManager locationManager;
|
LocationServiceManager locationManager;
|
||||||
|
|
@ -547,6 +553,8 @@ public class NearbyFragment extends CommonsDaggerSupportFragment
|
||||||
* Calls fragment for list view.
|
* Calls fragment for list view.
|
||||||
*/
|
*/
|
||||||
private void setListFragment() {
|
private void setListFragment() {
|
||||||
|
loading_nearby_layout.setVisibility(View.GONE);
|
||||||
|
frameLayout.setVisibility(View.VISIBLE);
|
||||||
FragmentTransaction fragmentTransaction = getChildFragmentManager().beginTransaction();
|
FragmentTransaction fragmentTransaction = getChildFragmentManager().beginTransaction();
|
||||||
nearbyListFragment = new NearbyListFragment();
|
nearbyListFragment = new NearbyListFragment();
|
||||||
nearbyListFragment.setArguments(bundle);
|
nearbyListFragment.setArguments(bundle);
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,32 @@
|
||||||
app:behavior_peekHeight="0dp"
|
app:behavior_peekHeight="0dp"
|
||||||
app:behavior_hideable="true"
|
app:behavior_hideable="true"
|
||||||
>
|
>
|
||||||
|
<android.support.constraint.ConstraintLayout
|
||||||
|
android:id="@+id/loading_nearby_list"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:visibility="visible">
|
||||||
|
|
||||||
|
<ProgressBar
|
||||||
|
android:id="@+id/progress_bar"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
/>
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:textSize="20sp"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/progress_bar"
|
||||||
|
android:text="Loading..."
|
||||||
|
/>
|
||||||
|
</android.support.constraint.ConstraintLayout>
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/container_sheet"
|
android:id="@+id/container_sheet"
|
||||||
|
|
@ -20,6 +46,7 @@
|
||||||
android:layout_marginRight="16dp"
|
android:layout_marginRight="16dp"
|
||||||
android:layout_marginBottom="8dp"
|
android:layout_marginBottom="8dp"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
|
android:visibility="gone"
|
||||||
></FrameLayout>
|
></FrameLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue