@Test public void testVisibilityOfView() { mGuidanceStreetLabelView.setCurrentStreetData(null); assertEquals(mGuidanceStreetLabelView.getVisibility(), View.GONE); }
public void setCurrentStreetData(@Nullable final GuidanceStreetLabelData currentStreetData) { mGuidanceStreetLabelData = currentStreetData; if (currentStreetData == null || currentStreetData.getCurrentStreetName() == null || currentStreetData.getCurrentStreetName().isEmpty()) { setVisibility(GONE); return; } else { setVisibility(VISIBLE); } final TextView currentStreetLabelView = findViewById(R.id.guidance_current_street_text); currentStreetLabelView.setText(currentStreetData.getCurrentStreetName()); refresh(); }
GuidanceStreetLabelView extends LinearLayout { public void setCurrentStreetData(@Nullable final GuidanceStreetLabelData currentStreetData) { mGuidanceStreetLabelData = currentStreetData; if (currentStreetData == null || currentStreetData.getCurrentStreetName() == null || currentStreetData.getCurrentStreetName().isEmpty()) { setVisibility(GONE); return; } else { setVisibility(VISIBLE); } final TextView currentStreetLabelView = findViewById(R.id.guidance_current_street_text); currentStreetLabelView.setText(currentStreetData.getCurrentStreetName()); refresh(); } }
GuidanceStreetLabelView extends LinearLayout { public void setCurrentStreetData(@Nullable final GuidanceStreetLabelData currentStreetData) { mGuidanceStreetLabelData = currentStreetData; if (currentStreetData == null || currentStreetData.getCurrentStreetName() == null || currentStreetData.getCurrentStreetName().isEmpty()) { setVisibility(GONE); return; } else { setVisibility(VISIBLE); } final TextView currentStreetLabelView = findViewById(R.id.guidance_current_street_text); currentStreetLabelView.setText(currentStreetData.getCurrentStreetName()); refresh(); } GuidanceStreetLabelView(Context context);  GuidanceStreetLabelView(Context context, @Nullable AttributeSet attrs);  GuidanceStreetLabelView(Context context, @Nullable AttributeSet attrs, int defStyleAttr); @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)  GuidanceStreetLabelView(Context context, @Nullable AttributeSet attrs, int defStyleAttr, int defStyleRes); }
GuidanceStreetLabelView extends LinearLayout { public void setCurrentStreetData(@Nullable final GuidanceStreetLabelData currentStreetData) { mGuidanceStreetLabelData = currentStreetData; if (currentStreetData == null || currentStreetData.getCurrentStreetName() == null || currentStreetData.getCurrentStreetName().isEmpty()) { setVisibility(GONE); return; } else { setVisibility(VISIBLE); } final TextView currentStreetLabelView = findViewById(R.id.guidance_current_street_text); currentStreetLabelView.setText(currentStreetData.getCurrentStreetName()); refresh(); } GuidanceStreetLabelView(Context context);  GuidanceStreetLabelView(Context context, @Nullable AttributeSet attrs);  GuidanceStreetLabelView(Context context, @Nullable AttributeSet attrs, int defStyleAttr); @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)  GuidanceStreetLabelView(Context context, @Nullable AttributeSet attrs, int defStyleAttr, int defStyleRes); void setCurrentStreetData(@Nullable final GuidanceStreetLabelData currentStreetData); void refresh(); GuidanceStreetLabelData getGuidanceCurrentStreetData(); @Override void onRestoreInstanceState(Parcelable state); }
GuidanceStreetLabelView extends LinearLayout { public void setCurrentStreetData(@Nullable final GuidanceStreetLabelData currentStreetData) { mGuidanceStreetLabelData = currentStreetData; if (currentStreetData == null || currentStreetData.getCurrentStreetName() == null || currentStreetData.getCurrentStreetName().isEmpty()) { setVisibility(GONE); return; } else { setVisibility(VISIBLE); } final TextView currentStreetLabelView = findViewById(R.id.guidance_current_street_text); currentStreetLabelView.setText(currentStreetData.getCurrentStreetName()); refresh(); } GuidanceStreetLabelView(Context context);  GuidanceStreetLabelView(Context context, @Nullable AttributeSet attrs);  GuidanceStreetLabelView(Context context, @Nullable AttributeSet attrs, int defStyleAttr); @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)  GuidanceStreetLabelView(Context context, @Nullable AttributeSet attrs, int defStyleAttr, int defStyleRes); void setCurrentStreetData(@Nullable final GuidanceStreetLabelData currentStreetData); void refresh(); GuidanceStreetLabelData getGuidanceCurrentStreetData(); @Override void onRestoreInstanceState(Parcelable state);  }