mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 02:39:05 +01:00
WIP
This commit is contained in:
@@ -21,7 +21,7 @@ import org.briarproject.briar.android.blog.RssFeedImportActivity;
|
||||
import org.briarproject.briar.android.blog.RssFeedManageActivity;
|
||||
import org.briarproject.briar.android.blog.WriteBlogPostActivity;
|
||||
import org.briarproject.briar.android.bluetoothsetup.BluetoothSetupActivity;
|
||||
import org.briarproject.briar.android.bluetoothsetup.BluetoothSetupDiscoveryFragment;
|
||||
import org.briarproject.briar.android.bluetoothsetup.BluetoothSetupChooseFragment;
|
||||
import org.briarproject.briar.android.bluetoothsetup.BluetoothSetupPendingFragment;
|
||||
import org.briarproject.briar.android.bluetoothsetup.BluetoothSetupStartFragment;
|
||||
import org.briarproject.briar.android.contact.ContactListFragment;
|
||||
@@ -250,7 +250,7 @@ public interface ActivityComponent {
|
||||
|
||||
void inject(BluetoothSetupStartFragment fragment);
|
||||
|
||||
void inject(BluetoothSetupDiscoveryFragment fragment);
|
||||
void inject(BluetoothSetupChooseFragment fragment);
|
||||
|
||||
void inject(BluetoothSetupPendingFragment fragment);
|
||||
|
||||
|
||||
@@ -19,9 +19,9 @@ import androidx.lifecycle.ViewModelProvider;
|
||||
|
||||
@MethodsNotNullByDefault
|
||||
@ParametersNotNullByDefault
|
||||
public class BluetoothSetupDiscoveryFragment extends BaseFragment {
|
||||
public class BluetoothSetupChooseFragment extends BaseFragment {
|
||||
private static final String TAG =
|
||||
BluetoothSetupDiscoveryFragment.class.getName();
|
||||
BluetoothSetupChooseFragment.class.getName();
|
||||
|
||||
@Inject
|
||||
ViewModelProvider.Factory viewModelFactory;
|
||||
@@ -49,7 +49,7 @@ public class BluetoothSetupDiscoveryFragment extends BaseFragment {
|
||||
.get(BluetoothSetupViewModel.class);
|
||||
|
||||
View v =
|
||||
inflater.inflate(R.layout.fragment_bluetooth_setup_discovery,
|
||||
inflater.inflate(R.layout.fragment_bluetooth_setup_choose,
|
||||
container, false);
|
||||
|
||||
// TODO to enable when user picks a device from list
|
||||
@@ -60,6 +60,13 @@ public class BluetoothSetupDiscoveryFragment extends BaseFragment {
|
||||
});
|
||||
continueButton.setEnabled(true);
|
||||
|
||||
// RecyclerView devices = v.findViewById(R.id.devices);
|
||||
// devices.setHasFixedSize(true);
|
||||
// final LinearLayoutManager layoutManager =
|
||||
// new LinearLayoutManager(getActivity(),
|
||||
// LinearLayoutManager.VERTICAL, false);
|
||||
// devices.setLayoutManager(layoutManager);
|
||||
|
||||
return v;
|
||||
}
|
||||
}
|
||||
@@ -54,7 +54,6 @@ public class BluetoothSetupPendingFragment extends BaseFragment {
|
||||
}
|
||||
|
||||
private void onContinueButtonClicked() {
|
||||
// showNextFragment(BluetoothSetupDiscoveryFragment.newInstance());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ public class BluetoothSetupStartFragment extends BaseFragment {
|
||||
|
||||
Button startButton = v.findViewById(R.id.startButton);
|
||||
startButton.setOnClickListener(view -> {
|
||||
showNextFragment(new BluetoothSetupDiscoveryFragment());
|
||||
showNextFragment(new BluetoothSetupChooseFragment());
|
||||
});
|
||||
startButton.setEnabled(true);
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
android:text="Pick contact's device"
|
||||
android:text="Pick contact"
|
||||
app:layout_constraintEnd_toStartOf="@+id/guideline"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/stepOne" />
|
||||
@@ -67,7 +67,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
android:alpha="0.5"
|
||||
android:text="Wait for contact"
|
||||
android:text="Wait for setup"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/guideline"
|
||||
app:layout_constraintTop_toBottomOf="@+id/stepTwo" />
|
||||
@@ -80,14 +80,14 @@
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:textSize="16sp"
|
||||
android:text="Please pick your contact's device below"
|
||||
app:layout_constraintBottom_toTopOf="@id/devices"
|
||||
android:text="Pick the nearby contact to perform the setup with."
|
||||
app:layout_constraintBottom_toTopOf="@id/contacts"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/stepOneText" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/devices"
|
||||
android:id="@+id/contacts"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginVertical="32dp"
|
||||
@@ -109,5 +109,14 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:enabled="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/commentTextView2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="list of all [contact-name-and-avatar]"
|
||||
android:textColor="@color/briar_red_500"
|
||||
tools:layout_editor_absoluteX="72dp"
|
||||
tools:layout_editor_absoluteY="189dp" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</ScrollView>
|
||||
@@ -33,7 +33,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
android:text="Pick contact's device"
|
||||
android:text="Pick contact"
|
||||
app:layout_constraintEnd_toStartOf="@+id/guideline"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/stepOne" />
|
||||
@@ -65,20 +65,20 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
android:text="Wait for contact"
|
||||
android:text="Wait for setup"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/guideline"
|
||||
app:layout_constraintTop_toBottomOf="@+id/stepTwo" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/discoveryText"
|
||||
android:id="@+id/pendingText"
|
||||
android:layout_marginTop="32dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:textSize="16sp"
|
||||
android:text="Waiting for your contact to pick your device"
|
||||
android:text="Waiting for a connection to be established with:\n\n[chosen contact-name-and-avatar]"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/stepOneText" />
|
||||
|
||||
Reference in New Issue
Block a user