mirror of
https://github.com/Team4388/RidgeScout.git
synced 2026-06-09 00:37:59 -06:00
Work on Field Editor, Improve capitalization of classes
This commit is contained in:
@@ -15,7 +15,7 @@ import androidx.annotation.Nullable;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
|
||||
import com.ridgebotics.ridgescout.R;
|
||||
import com.ridgebotics.ridgescout.types.input.inputType;
|
||||
import com.ridgebotics.ridgescout.types.input.FieldType;
|
||||
|
||||
public class FieldDisplay extends ConstraintLayout {
|
||||
public FieldDisplay(Context context, @Nullable AttributeSet attrs) {
|
||||
@@ -28,7 +28,7 @@ public class FieldDisplay extends ConstraintLayout {
|
||||
init(context);
|
||||
}
|
||||
|
||||
private inputType field;
|
||||
private FieldType field;
|
||||
|
||||
public Button editButton;
|
||||
|
||||
@@ -46,13 +46,15 @@ public class FieldDisplay extends ConstraintLayout {
|
||||
box = findViewById(R.id.field_box);
|
||||
coloredBackground = findViewById(R.id.field_background);
|
||||
|
||||
editButton = findViewById(R.id.button_edit);
|
||||
|
||||
titleText = findViewById(R.id.field_title);
|
||||
typeText = findViewById(R.id.field_description);
|
||||
|
||||
buttonBox = findViewById(R.id.buttons);
|
||||
}
|
||||
|
||||
public void setInputType(inputType field){
|
||||
public void setInputType(FieldType field){
|
||||
this.field = field;
|
||||
|
||||
titleText.setText(field.name);
|
||||
@@ -87,6 +89,10 @@ public class FieldDisplay extends ConstraintLayout {
|
||||
findViewById(R.id.buttons).setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
public FieldType getField(){
|
||||
return field;
|
||||
}
|
||||
|
||||
public void setColor(int color){
|
||||
Drawable drawable = box.getBackground();
|
||||
drawable.mutate();
|
||||
|
||||
Reference in New Issue
Block a user