Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- myRef.child("Oportunidad").child(user.getUid()).addChildEventListener(new ChildEventListener() {
- @Override
- public void onChildAdded(@NonNull DataSnapshot dataSnapshot, @Nullable String s) {
- ListaIDOportunidad.add(dataSnapshot.getKey());
- for(int i=0;i<ListaIDOportunidad.size();i++) {
- modulosActivos.setModulo(ListaIDOportunidad.get(i));
- if (ListaIDOportunidad.get(i).equals(modulosActivos.getModulo())){
- System.out.println("Modulo " + i);
- }
- button.setText(modulosActivos.getModulo());
- button.setVisibility(View.VISIBLE);
- }
- }
- <LinearLayout
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="wrap_content" app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintStart_toStartOf="parent" android:layout_marginStart="8dp"
- android:layout_marginTop="8dp" app:layout_constraintEnd_toEndOf="parent" android:layout_marginEnd="8dp"
- >
- <LinearLayout
- android:orientation="horizontal"
- android:layout_width="match_parent"
- android:layout_height="match_parent">
- <Button
- android:text="Button"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content" android:id="@+id/button" android:layout_weight="1"
- android:visibility="invisible"/>
- <Button
- android:text="Button"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content" android:id="@+id/button2" android:layout_weight="1"
- android:visibility="invisible"/>
- <Button
- android:text="Button"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content" android:id="@+id/button3" android:layout_weight="1"
- android:visibility="invisible"/>
- </LinearLayout>
- </LinearLayout>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement