Skip to content

Commit

Permalink
Rename classes
Browse files Browse the repository at this point in the history
  • Loading branch information
atoami committed Feb 19, 2019
1 parent 24e6f22 commit 959e1e7
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import android.view.MotionEvent;
import android.view.View;

public class ColorHueSatView extends View {
public class RNColorHueSatView extends View {
public static final int TILE_DEFAULT_COUNT = 20;
public static final int TILE_GAP = 2;
public static final int MARGIN = 10;
Expand All @@ -32,15 +32,15 @@ public class ColorHueSatView extends View {

private RNColorPanel mainColorPanel;

public ColorHueSatView(Context context) {
public RNColorHueSatView(Context context) {
this(context, null);
}

public ColorHueSatView(Context context, AttributeSet attrs) {
public RNColorHueSatView(Context context, AttributeSet attrs) {
this(context, attrs, 0);
}

public ColorHueSatView(Context context, AttributeSet attrs, int defStyle) {
public RNColorHueSatView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);

selectedPaint.setStyle(Paint.Style.STROKE);
Expand Down
12 changes: 6 additions & 6 deletions android/src/main/java/com/ato/reactlibrary/RNColorPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@

public class RNColorPanel extends LinearLayout {

public ColorHueSatView hueSatView;
public ColorValView valView;
public SelectedColorView selectedColorView;
public RNColorHueSatView hueSatView;
public RNColorValView valView;
public RNSelectedColorView selectedColorView;
public TextView rvalueTxt;
public TextView gvalueTxt;
public TextView bvalueTxt;
Expand All @@ -29,13 +29,13 @@ public RNColorPanel(Context context)
View mainContentView = inflater.inflate(R.layout.color_select_layout, null);
addView(mainContentView);

hueSatView = (ColorHueSatView)mainContentView.findViewById(R.id.color_huesat_view);
hueSatView = (RNColorHueSatView)mainContentView.findViewById(R.id.color_huesat_view);
hueSatView.setMainPanel(this);

valView = (ColorValView)mainContentView.findViewById(R.id.color_val_view);
valView = (RNColorValView)mainContentView.findViewById(R.id.color_val_view);
valView.setMainPanel(this);

selectedColorView = (SelectedColorView)mainContentView.findViewById(R.id.selected_color_view);
selectedColorView = (RNSelectedColorView)mainContentView.findViewById(R.id.selected_color_view);
selectedColorView.setMainPanel(this);

rvalueTxt = (TextView)mainContentView.findViewById(R.id.rvalue_txt);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import android.view.MotionEvent;
import android.view.View;

public class ColorValView extends View {
public class RNColorValView extends View {
public static final int MARGIN_TOP = 5;
public static final int MARGIN_BOTTOM = 5;
public static final int MARGIN_LEFT = 15;
Expand All @@ -28,15 +28,15 @@ public class ColorValView extends View {

private RNColorPanel mainColorPanel;

public ColorValView(Context context) {
public RNColorValView(Context context) {
this(context, null);
}

public ColorValView(Context context, AttributeSet attrs) {
public RNColorValView(Context context, AttributeSet attrs) {
this(context, attrs, 0);
}

public ColorValView(Context context, AttributeSet attrs, int defStyle) {
public RNColorValView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);

hsv[0] = 0.f;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import android.util.AttributeSet;
import android.view.View;

public class SelectedColorView extends View {
public class RNSelectedColorView extends View {
public static final int MARGIN = 5;

private float[] hsv = {0.f, 1.f, 1.f};
Expand All @@ -17,15 +17,15 @@ public class SelectedColorView extends View {

private RNColorPanel mainColorPanel;

public SelectedColorView(Context context) {
public RNSelectedColorView(Context context) {
this(context, null);
}

public SelectedColorView(Context context, AttributeSet attrs) {
public RNSelectedColorView(Context context, AttributeSet attrs) {
this(context, attrs, 0);
}

public SelectedColorView(Context context, AttributeSet attrs, int defStyle) {
public RNSelectedColorView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);

paint.setStyle(Paint.Style.FILL);
Expand Down
6 changes: 3 additions & 3 deletions android/src/main/res/layout/color_select_layout.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
android:layout_height="70dp"
android:gravity="center_vertical">

<com.ato.reactlibrary.SelectedColorView
<com.ato.reactlibrary.RNSelectedColorView
android:id="@+id/selected_color_view"
android:layout_marginTop="10dp"
android:layout_marginBottom="15dp"
Expand Down Expand Up @@ -56,7 +56,7 @@

</LinearLayout>

<com.ato.reactlibrary.ColorValView
<com.ato.reactlibrary.RNColorValView
android:id="@+id/color_val_view"
android:layout_width="match_parent"
android:layout_height="50dp"
Expand All @@ -65,7 +65,7 @@
android:layout_toRightOf="@id/view_container2"/>
</RelativeLayout>

<com.ato.reactlibrary.ColorHueSatView
<com.ato.reactlibrary.RNColorHueSatView
android:id="@+id/color_huesat_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
Expand Down

0 comments on commit 959e1e7

Please sign in to comment.