scrollview - Android: Scroll or resize Canvas on a CustomView -


i have custom view there canvas drawn circles , lines. problem once transferred tablet cropped image , not real. there way resize customview , fit screen automatically, or scroll image. bit of code:

public class customview extends view {      paint ppaint;     paint cpaint;     paint textpaint;      int w,h;     int px=150,py=150;     int cx=450,cy=150;     public customview(context context, attributeset attrs) {         super(context, attrs);           ppaint=new paint(); // pennello         ppaint.setcolor(color.red);           ppaint.setantialias(true);           cpaint=new paint(); // pennello         cpaint.setcolor(color.cyan);              cpaint.setantialias(true);          textpaint=new paint(); // pennello         textpaint.setcolor(color.black);              textpaint.setantialias(true);      }    <relativelayout xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:tools="http://schemas.android.com/tools"     android:layout_width="match_parent"     android:layout_height="match_parent"     android:paddingbottom="@dimen/activity_vertical_margin"     android:paddingleft="@dimen/activity_horizontal_margin"     android:paddingright="@dimen/activity_horizontal_margin"     android:paddingtop="@dimen/activity_vertical_margin"     tools:context=".mainactivity" >      <linearlayout         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:orientation="vertical" >          <com.abstractargument.customview             android:id="@+id/customview"             android:layout_width="fill_parent"             android:layout_height="fill_parent" />     </linearlayout>  </relativelayout> 


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -