Question: can i get the whole `linearlayout` or other layouts converted to bitmap.
my code is this :

```
LinearLayout view = (LinearLayout)findViewById(R.id.linear_parent);
view.setDrawingCacheEnabled(true);

view.buildDrawingCache();

Bitmap bm = view.getDrawingCache();

ByteArrayOutputStream bytes = new ByteArrayOutputStream();
bm.compress(Bitmap.CompressFormat.JPEG, 40, bytes);

```

the problem is if layout is larger than the screen size only i get whats on screen & not the whole contents e.g. textview etc. which are currently not on screen but are part of layout.

Any suggestions geeks out there.
this is way to urgent and important.

Answer: 
After lot of googling, I found a good solution of my problem 

```
TextView textView =new TextView(this);
                SpannableStringBuilder ssb = new SpannableStringBuilder( "Here's a smiley how are you " );
                Bitmap smiley = BitmapFactory.decodeResource( getResources(), R.drawable.movie_add );
                ssb.setSpan( new ImageSpan( smiley ), ssb.length()-1,  ssb.length(), Spannable.SPAN_INCLUSIVE_INCLUSIVE );  
                textView.setText( ssb, BufferType.SPANNABLE );

```

**With the help of above code, you can add image any where in Textview.**
Use the following layout 

```
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="center"
    android:gravity="center"
     android:padding="2dp"
    android:background="@android:color/transparent"
    >
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
     android:gravity="left"
     android:padding="1dp"
    android:layout_gravity="left"
     android:orientation="horizontal" >

    <TextView
        android:id="@+id/contentText1"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="Medium T"
          android:gravity="center"
            android:minLines="2"
         android:layout_gravity="center"
         android:textColor="@color/white"
          android:padding="5dp"
          android:visibility="invisible"
        android:textAppearance="?android:attr/textAppearanceMedium" />
    <ImageView
        android:id="@+id/contentImage1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:gravity="center"
        android:padding="5dp"
        android:visibility="invisible"
        android:src="@drawable/browse_product_thumbnail" />

</LinearLayout>

</LinearLayout>

```

-Preeya