diff --git a/code/src/app/src/main/java/com/fitbot/fitbot/TextSetter.java b/code/src/app/src/main/java/com/fitbot/fitbot/TextSetter.java new file mode 100644 index 0000000..7bb7f93 --- /dev/null +++ b/code/src/app/src/main/java/com/fitbot/fitbot/TextSetter.java @@ -0,0 +1,18 @@ +package com.fitbot.fitbot; + +import android.app.Activity; +import android.widget.TextView; + +public class TextSetter { + public static void setCustomText(Activity activity, int textViewId, String text) { + TextView textView = (TextView) activity.findViewById(textViewId); + textView.setText(text); + } +} + +// usage: +// TextSetter.setCustomText(this, R.id.testText, "Bruh"); +// r.id.testText is the id of the textview in the layout file +// "Bruh" is the text to be set + +// make sure you have the right layout set in MainActivity.java with the setContentView method \ No newline at end of file