-1

Ok so I'm trying to use the custom textview from here: https://stackoverflow.com/a/7875656/938541

Now I need to have a textswitcher (would viewswitcher be a better choice) to switch between 2 textviews (custom textviews in this case) while always writing new text.

When adding a view to the textswitcher this worked for me so far:

new TextView();

I tried something like this for the custom textview:

TextView tv = (TextView) findViewById(R.layout.customtxtview);

With a xml file:

<com.seelenkalender.FontFitTextView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="wrap_content" />

This setup and other similar approaches that I tried forceclose...

Thanks guys!!

Community
  • 1
  • 1

1 Answers1

1

You must add id not layout is Eg. TextView tv = (TextView) findViewById(R.id.stringA);

Taryn
  • 242,637
  • 56
  • 362
  • 405
I Yeu C
  • 636
  • 2
  • 7
  • 13