Tabnine Logo
ViewHolder
Code IndexAdd Tabnine to your IDE (free)

How to use
ViewHolder
in
com.orhanobut.dialogplus

Best Java code snippets using com.orhanobut.dialogplus.ViewHolder (Showing top 5 results out of 315)

origin: orhanobut/dialogplus

@Override @NonNull
public View getView(@NonNull LayoutInflater inflater, ViewGroup parent) {
 View view = inflater.inflate(R.layout.dialog_view, parent, false);
 View outMostView = view.findViewById(R.id.dialogplus_outmost_container);
 outMostView.setBackgroundResource(backgroundResource);
 ViewGroup contentContainer = view.findViewById(R.id.dialogplus_view_container);
 contentContainer.setOnKeyListener(new View.OnKeyListener() {
  @Override public boolean onKey(View v, int keyCode, KeyEvent event) {
   if (keyListener == null) {
    throw new NullPointerException("keyListener should not be null");
   }
   return keyListener.onKey(v, keyCode, event);
  }
 });
 addContent(inflater, parent, contentContainer);
 headerContainer = view.findViewById(R.id.dialogplus_header_container);
 footerContainer = view.findViewById(R.id.dialogplus_footer_container);
 return view;
}
origin: orhanobut/dialogplus

@Override public void addFooter(@NonNull View view) {
 addFooter(view, false);
}
origin: orhanobut/dialogplus

@Override public void addHeader(@NonNull View view) {
 addHeader(view, false);
}
origin: liuyanggithub/SuperMvp

/**
 * 显示当前天气弹窗
 */
public void showNowWeatherDialog(ShowApiWeather weather) {
  ll_dialog_holder = (LinearLayout) getActivity().getLayoutInflater().inflate(R.layout.dialog_weather, null);
  Holder holder = new ViewHolder(ll_dialog_holder);
  findHolderChildView(holder);
  GlideUtil.loadImage(getActivity(), weather.now.weather_pic, iv_weather);
  tv_weather.setText(weather.now.weather);
  tv_temperature.setText(weather.now.temperature + "℃");
  tv_temperature_time.setText(weather.now.temperature_time);
  tv_aqi.setText(String.format(getActivity().getResources().getString(R.string.weather_dialog_aqi),
      weather.now.aqi));
  tv_sd.setText(String.format(getActivity().getResources().getString(R.string.weather_dialog_sd),
      weather.now.sd));
  tv_wind_direction.setText(String.format(getActivity().getResources().getString(R.string.weather_dialog_wind_direction),
      weather.now.wind_direction));
  tv_wind_power.setText(String.format(getActivity().getResources().getString(R.string.weather_dialog_wind_power),
      weather.now.wind_power));
  showOnlyContentDialog(holder, Gravity.BOTTOM, false);
}
origin: liuyanggithub/SuperMvp

public void showDialog(String imgUrl) {
  ll_dialog_holder = (LinearLayout) getActivity().getLayoutInflater().inflate(R.layout.dialog_image_preview, null);
  Holder holder = new ViewHolder(ll_dialog_holder);
  PhotoView photo_view = (PhotoView) holder.getInflatedView().findViewById(R.id.photo_view);
  photo_view.enable();//启动缩放功能
  GlideUtil.loadImage(getActivity(), imgUrl, photo_view);
  photo_view.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {
      mDialog.dismiss();
    }
  });
  showOnlyContentDialog(holder, Gravity.TOP, false);
}
com.orhanobut.dialogplusViewHolder

Most used methods

  • <init>
  • addContent
  • addFooter
  • addHeader

Popular in Java

  • Start an intent from android
  • startActivity (Activity)
  • getResourceAsStream (ClassLoader)
  • scheduleAtFixedRate (Timer)
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now