@@ -33,6 +33,8 @@ public class LinkingValidatorDialogRowItem extends LinearLayout {
3333 String routingValue ;
3434 String canonicalIdentifier ;
3535 Context context ;
36+ Button debugButton ;
37+ String debugText ;
3638
3739 public LinkingValidatorDialogRowItem (Context context , AttributeSet attrs ) {
3840 super (context , attrs );
@@ -44,15 +46,17 @@ public LinkingValidatorDialogRowItem(Context context, AttributeSet attrs, int de
4446 this .context = context ;
4547 }
4648
47- public void InitializeRow (String title , String infoText , String routingKey , String routingValue , String canonicalIdentifier , String ... params ) {
49+ public void InitializeRow (String title , String infoText , String debugText , String routingKey , String routingValue , String canonicalIdentifier , String ... params ) {
4850 View view = LayoutInflater .from (getContext ()).inflate (R .layout .linking_validator_dialog_row_item , null );
4951 this .addView (view );
5052 titleText = view .findViewById (R .id .linkingValidatorRowTitleText );
5153 infoButton = view .findViewById (R .id .linkingValidatorRowInfoButton );
5254 shareButton = view .findViewById (R .id .linkingValidatorRowShareButton );
55+ debugButton = view .findViewById (R .id .linkingValidatorRowDebugButton );
5356
5457 titleText .setText (title );
5558 this .infoText = infoText ;
59+ this .debugText = debugText ;
5660 this .routingKey = routingKey ;
5761 this .routingValue = routingValue ;
5862 this .canonicalIdentifier = canonicalIdentifier ;
@@ -70,6 +74,10 @@ public void InitializeRow(String title, String infoText, String routingKey, Stri
7074 shareButton .setOnClickListener (view2 -> {
7175 HandleShareButtonClicked ();
7276 });
77+
78+ debugButton .setOnClickListener (view2 -> {
79+ HandleDebugButtonClicked ();
80+ });
7381 }
7482
7583 private void HandleInfoButtonClicked () {
@@ -100,6 +108,13 @@ public void onChannelSelected(String channelName) {
100108 }
101109 }
102110
111+ private void HandleDebugButtonClicked () {
112+ AlertDialog .Builder builder = new AlertDialog .Builder (context );
113+ builder .setMessage (debugText ).setTitle (titleText .getText () + " not working?" );
114+ AlertDialog dialog = builder .create ();
115+ dialog .show ();
116+ }
117+
103118 public Activity getActivity (Context context ) {
104119 if (context == null ) {
105120 return null ;
0 commit comments