Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Create Class Package

$
0
0

Is it possible to create a class package like in java, and the to use it inside layout?

package circlegraph.velmurugan.com.infinitycircle;//something like this line

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.RectF;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.view.View;

public class CircleView extends View {
  //rest of class code

And then to use it inside layout

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
 xmlns:app="http://schemas.android.com/apk/res-auto"
 xmlns:tools="http://schemas.android.com/tools"
 android:layout_width="match_parent"
 android:layout_height="match_parent">
 <circlegraph.velmurugan.com.infinitycircle
    android:id="@+id/circleView"
    android:layout_width="200dp"
    android:layout_height="200dp"
    android:layout_centerInParent="true" />
</RelativeLayout>

Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>