Skip to content

Commit

Permalink
Add help button to receive ui
Browse files Browse the repository at this point in the history
  • Loading branch information
ShortDevelopment committed Oct 29, 2023
1 parent 10e5204 commit 492c6a6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 19 deletions.
5 changes: 1 addition & 4 deletions Nearby Sharing Windows/ReceiveActivity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ public sealed class ReceiveActivity : AppCompatActivity, INearSharePlatformHandl
{
BluetoothAdapter? _btAdapter;

[AllowNull] TextView debugLogTextView;

[AllowNull] AdapterDescriptor<TransferToken> adapterDescriptor;
[AllowNull] RecyclerView notificationsRecyclerView;
readonly List<TransferToken> _notifications = new();
Expand All @@ -54,8 +52,7 @@ protected override void OnCreate(Bundle? savedInstanceState)
notificationsRecyclerView = FindViewById<RecyclerView>(Resource.Id.notificationsRecyclerView)!;
notificationsRecyclerView.SetLayoutManager(new LinearLayoutManager(this));

debugLogTextView = FindViewById<TextView>(Resource.Id.debugLogTextView)!;
debugLogTextView.SetTextIsSelectable(true);
FindViewById<Button>(Resource.Id.openFAQButton)!.Click += (s, e) => UIHelper.OpenFAQ(this);

adapterDescriptor = new(
Resource.Layout.item_transfer_notification,
Expand Down
23 changes: 8 additions & 15 deletions Nearby Sharing Windows/Resources/layout/activity_receive.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@
android:text="@string/visible_as_template"
android:paddingBottom="10dp" />

<Button
style="@style/Widget.Material3.Button.TonalButton"
android:id="@+id/openFAQButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/open_faq_title"
app:icon="@drawable/ic_fluent_question_circle_24_regular" />

<TextView
style="@style/TextAppearance.AppCompat.Title"
android:layout_width="match_parent"
Expand All @@ -51,21 +59,6 @@
android:paddingTop="10dp"
android:paddingBottom="10dp"/>

<TextView
style="@style/TextAppearance.AppCompat.Title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginBottom="3dp"
android:text="@string/debug_log" />

<TextView
android:id="@+id/debugLogTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="10dp"
android:paddingBottom="10dp" />

</LinearLayout>

</androidx.core.widget.NestedScrollView>
Expand Down

0 comments on commit 492c6a6

Please sign in to comment.