Try popular Android Application by Feliz-Droid

Try popular Android Application by Feliz-Droid

Speaking Caller logo
Speaking Caller
   
Battery temperature logo
Battery Temperature
   
Dual Photo logo
Dual Photo
   
Ganesh Wallpapersl ogo
Lord Ganesh Wallpaper
   
Girly Pink Keyboard l ogo
Girly Pink Keyboard

Thursday, September 22, 2011

show multiline text inside spinner

Dear all.

To show multiline text inside the spinner follow few steps below and get working.

Step 1: Create a new Layout file name as textview.xml. and overwrite the code with below  one.


<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
    android:text="@+id/TextView01"
    android:id="@+id/TextView01"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:textSize="17sp"></TextView>

Step 2: After that save this file and open the code file (.java)  file where spinner is used. If 
you have used Array Adapter to fill spinner. Then just write below code instead of that.

      ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this, R.array.plans,     R.layout.textview);
        spinnername.setAdapter(adapter);


In above code, R.array.plans is the string array which i have used to fill spinner. I you have to fill spinner from the database then just try below code.

adapter = new ArrayAdapter<String>(this,android.R.layout.textview,aLst);

adapter.setDropDownViewResource(R.layout.textview);
spinnername.setAdapter(adapter);  
 
Now you have done with. Enjoy it.
 
Thanks...... 


   

10 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. I tested it on Android 7.1.2 and it did not work.

    ReplyDelete
  3. THANK U VEEEEERY MUCH =D LOOOOOOOOOVE YOU

    ReplyDelete
  4. Woori Casino Login - Play on Mobile or Desktop
    The Woori Casino App will ventureberg.com/ be available at Woori Casino on a mobile หาเงินออนไลน์ or desktop basis. To play on our mobile https://febcasino.com/review/merit-casino/ or desktop, you can also play with your https://octcasino.com/ desktop browser,

    ReplyDelete
  5. This tutorial was exactly what I needed to get Facebook deep linking working in my app. The part about generating an app access token and using it to create the App Link object was where I was stuck—Facebook's official docs can be overwhelming. Your cURL example made it click. I also ran into an issue where my intent filter wasn't triggering, but your manifest example helped me spot my mistake.

    For anyone just starting out, combining mobile development with automation and deployment skills can really boost your job prospects. To build a more well-rounded foundation, I recently started exploring DevOps Course for Freshers in Electronic City. Thanks again for this practical, beginner-friendly post.

    ReplyDelete