Advertisement
Guest User

Untitled

a guest
Dec 6th, 2016
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. <FrameLayout
  2. android:id="@+id/framelayout"
  3. android:layout_marginTop="30dip"
  4. android:layout_height="fill_parent"
  5. android:layout_width="fill_parent">
  6.  
  7. <ImageView
  8. android:id="@+id/ImageView01"
  9. android:layout_height="wrap_content"
  10. android:layout_width="wrap_content"/>
  11.  
  12. <TextView android:id="@+id/text_view"
  13. android:layout_marginTop="30dip"
  14. android:layout_width="wrap_content"
  15. android:maxLines="20"
  16. android:scrollbars="vertical"
  17. android:layout_height="wrap_content"/>
  18.  
  19. </FrameLayout>
  20.  
  21. FrameLayout view = (FrameLayout)findViewById(R.id.framelayout);
  22.  
  23. view.setDrawingCacheEnabled(true);
  24.  
  25. view.buildDrawingCache();
  26.  
  27. Bitmap bm = view.getDrawingCache();
  28.  
  29. FrameLayout view = (FrameLayout)findViewById(R.id.framelayout);
  30. Bitmap bitmap = Bitmap.createBitmap(view.getWidth(), view.getHeight(),
  31. Bitmap.Config.ARGB_8888);
  32. Canvas canvas = new Canvas(bitmap);
  33. view.draw(canvas);
  34.  
  35. mView.setDrawingCacheEnabled(true);
  36. mView.getDrawingCache();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement