Skip to content

Commit

Permalink
Re-Fixing mainlayout
Browse files Browse the repository at this point in the history
  • Loading branch information
c0deslinger committed Aug 25, 2019
1 parent c5b77ee commit 9999975
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public class MyEdittext extends LinearLayout{
Context context;
Activity activity;
LinearLayout formLayout;
LinearLayout mainLayout;
TextView txtTitle;
EditText editTextContent;
View view;
Expand Down Expand Up @@ -193,8 +194,8 @@ public MyEdittext(Builder builder) {
onClickSearchListener.onClickSearch(editTextContent.getText().toString());
});
}
LinearLayout layout = this.view.findViewById(R.id.mainLayoutEdittext);
layout.setOrientation(builder.orientation);
mainLayout = this.view.findViewById(R.id.mainLayoutEdittext);
mainLayout.setOrientation(builder.orientation);
txtTitle = view.findViewById(R.id.item_edittext_title);
editTextContent = view.findViewById(R.id.item_edittext_value);
editTextContent.setMinLines(builder.minLines);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public class MyRadioButton extends LinearLayout{
Context context;
TextView txtTitle;
LinearLayout formLayout;
LinearLayout mainLayout;
RadioGroup radioGroup;
String value = null;
View view;
Expand Down Expand Up @@ -162,8 +163,8 @@ public MyRadioButton(Builder builder){
txtTitle = view.findViewById(R.id.item_textview_title);
txtTitle.setText(title);
radioGroup = view.findViewById(R.id.radioGroup);
LinearLayout layout = this.view.findViewById(R.id.mainLayoutRadioButton);
layout.setOrientation(builder.orientation);
mainLayout = this.view.findViewById(R.id.mainLayoutRadioButton);
mainLayout.setOrientation(builder.orientation);
for (String option : optionListString){
RadioButton radioButton = new RadioButton(context);
radioButton.setText(option);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public class MySpinner extends LinearLayout {
String title;
Context context;
LinearLayout formLayout;
LinearLayout mainLayout;
TextView txtTitle;
Spinner spinnerAnswer;
View view;
Expand Down Expand Up @@ -155,8 +156,8 @@ public MySpinner(Builder builder){
}else {
this.view = LayoutInflater.from(context).inflate(R.layout.form_dropdown, null);
}
LinearLayout layout = this.view.findViewById(R.id.mainLayoutDropdown);
layout.setOrientation(builder.orientation);
mainLayout = view.findViewById(R.id.mainLayoutDropdown);
mainLayout.setOrientation(builder.orientation);
txtTitle = view.findViewById(R.id.item_spinner_title);
txtTitle.setText(title);
spinnerAnswer = view.findViewById(R.id.item_spinner_list);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public class MyTextView extends LinearLayout{
String title;
Context context;
LinearLayout formLayout;
LinearLayout mainLayout;
Activity activity;
TextView textViewTitle;
TextView textViewContent;
Expand Down Expand Up @@ -129,11 +130,11 @@ public MyTextView(Builder builder) {
this.activity = builder.activity;
this.title = builder.title;
this.view = LayoutInflater.from(context).inflate(R.layout.form_textview, null);
LinearLayout layout = (LinearLayout) this.view.findViewById(R.id.mainLayoutTextview);
layout.setOrientation(builder.orientation);
textViewTitle = (TextView)view.findViewById(R.id.item_textview_title);
mainLayout = this.view.findViewById(R.id.mainLayoutTextview);
mainLayout.setOrientation(builder.orientation);
textViewTitle = view.findViewById(R.id.item_textview_title);
textViewTitle.setText(builder.title);
textViewContent = (TextView)view.findViewById(R.id.item_textview_value);
textViewContent = view.findViewById(R.id.item_textview_value);
textViewContent.setText(builder.content);
if(builder.titleFont!=null){
Typeface face = Typeface.createFromAsset(context.getAssets(),
Expand Down

0 comments on commit 9999975

Please sign in to comment.