Address review feedback.

This commit is contained in:
akwizgran
2022-10-31 14:46:22 +00:00
parent ba83290fcd
commit 9f039ff0b8
4 changed files with 12 additions and 3 deletions

View File

@@ -94,8 +94,7 @@ public class AddNearbyContactFragment extends BaseFragment
statusView = view.findViewById(R.id.status_container);
status = view.findViewById(R.id.connect_status);
infoView = view.findViewById(R.id.info_view);
TextView info = view.findViewById(R.id.info_text);
info.setText(R.string.info_both_must_scan);
infoView.setText(R.string.info_both_must_scan);
qrCodeView = view.findViewById(R.id.qr_code_view);
qrCodeView.setFullscreenListener(this);

View File

@@ -16,6 +16,7 @@ import com.google.android.material.textfield.TextInputLayout;
import org.briarproject.briar.R;
import org.briarproject.briar.android.activity.ActivityComponent;
import org.briarproject.briar.android.fragment.BaseFragment;
import org.briarproject.briar.android.view.InfoView;
import org.briarproject.nullsafety.MethodsNotNullByDefault;
import org.briarproject.nullsafety.ParametersNotNullByDefault;
@@ -122,7 +123,7 @@ public class LinkExchangeFragment extends BaseFragment {
.startChooser());
shareButton.setEnabled(true);
TextView infoText = v.findViewById(R.id.info_text);
InfoView infoText = v.findViewById(R.id.infoView);
infoText.setText(R.string.info_both_must_enter_links);
Button continueButton = v.findViewById(R.id.addButton);

View File

@@ -3,11 +3,13 @@ package org.briarproject.briar.android.view;
import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.widget.TextView;
import org.briarproject.briar.R;
import org.briarproject.nullsafety.InterfaceNotNullByDefault;
import androidx.annotation.Nullable;
import androidx.annotation.StringRes;
import androidx.cardview.widget.CardView;
import static android.content.Context.LAYOUT_INFLATER_SERVICE;
@@ -30,4 +32,9 @@ public class InfoView extends CardView {
context.getSystemService(LAYOUT_INFLATER_SERVICE);
inflater.inflate(R.layout.info_view, this, true);
}
public void setText(@StringRes int resId) {
TextView infoText = findViewById(R.id.info_text);
infoText.setText(resId);
}
}

View File

@@ -13,6 +13,8 @@
android:layout_margin="@dimen/margin_medium"
android:contentDescription="@string/info"
android:drawablePadding="@dimen/margin_medium"
android:drawableTint="?attr/colorControlNormal"
android:gravity="center_vertical"
app:drawableLeftCompat="@drawable/ic_info_dark"
app:drawableStartCompat="@drawable/ic_info_dark"
tools:text="Did you know that if you took all the veins out of your body and laid them out end to end, you would die?" />