use of com.davemorrissey.labs.subscaleview.sample.extension.views.FreehandView in project subsampling-scale-image-view by davemorrissey.
the class ExtensionFreehandFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View rootView = inflater.inflate(layout.extension_freehand_fragment, container, false);
rootView.findViewById(id.previous).setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
((ExtensionActivity) getActivity()).previous();
}
});
final FreehandView imageView = (FreehandView) rootView.findViewById(id.imageView);
imageView.setImage(ImageSource.asset("squirrel.jpg"));
rootView.findViewById(id.reset).setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
imageView.reset();
}
});
return rootView;
}
Aggregations