package com.ubt.jimu.diy.view.fragment; import android.content.Context; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; import android.widget.EditText; import android.widget.ImageView; import android.widget.TextView; import androidx.fragment.app.Fragment; import butterknife.ButterKnife; import butterknife.Unbinder; import com.ubt.jimu.R; /* loaded from: classes2.dex */ public class DiyDescriptionFragment extends Fragment { private static final String ARG_PARAM1 = "param1"; private static final String ARG_PARAM2 = "param2"; protected Button btnComplete; protected EditText edtRobotDescription; protected EditText edtRobotName; protected ImageView imgRight; private Unbinder mBind; private OnDiyDescriptionFragmentInteractionListener mListener; private String mParam1; private String mParam2; protected TextView tvTitle; public interface OnDiyDescriptionFragmentInteractionListener { void onDiyDescriptionBack(View view); void onDiyDescriptionComplete(String str, String str2); void onDiyDescriptionHelp(View view); } public static DiyDescriptionFragment newInstance(String str, String str2) { DiyDescriptionFragment diyDescriptionFragment = new DiyDescriptionFragment(); Bundle bundle = new Bundle(); bundle.putString(ARG_PARAM1, str); bundle.putString(ARG_PARAM2, str2); diyDescriptionFragment.setArguments(bundle); return diyDescriptionFragment; } /* JADX WARN: Multi-variable type inference failed */ @Override // androidx.fragment.app.Fragment public void onAttach(Context context) { super.onAttach(context); if (context instanceof OnDiyDescriptionFragmentInteractionListener) { this.mListener = (OnDiyDescriptionFragmentInteractionListener) context; } } protected void onBack(View view) { OnDiyDescriptionFragmentInteractionListener onDiyDescriptionFragmentInteractionListener = this.mListener; if (onDiyDescriptionFragmentInteractionListener != null) { onDiyDescriptionFragmentInteractionListener.onDiyDescriptionBack(view); } } protected void onComplete(View view) { OnDiyDescriptionFragmentInteractionListener onDiyDescriptionFragmentInteractionListener = this.mListener; if (onDiyDescriptionFragmentInteractionListener != null) { onDiyDescriptionFragmentInteractionListener.onDiyDescriptionComplete(this.edtRobotName.getText().toString(), this.edtRobotDescription.getText().toString()); } } @Override // androidx.fragment.app.Fragment public void onCreate(Bundle bundle) { super.onCreate(bundle); if (getArguments() != null) { this.mParam1 = getArguments().getString(ARG_PARAM1); this.mParam2 = getArguments().getString(ARG_PARAM2); } } @Override // androidx.fragment.app.Fragment public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) { View inflate = layoutInflater.inflate(R.layout.fragment_diy_description, viewGroup, false); this.mBind = ButterKnife.a(this, inflate); this.tvTitle.setText(R.string.title_diy_description); this.imgRight.setBackgroundResource(R.drawable.community_mypublish_icon); return inflate; } @Override // androidx.fragment.app.Fragment public void onDestroyView() { this.mBind.unbind(); super.onDestroyView(); } @Override // androidx.fragment.app.Fragment public void onDetach() { super.onDetach(); this.mListener = null; } protected void onHelp(View view) { OnDiyDescriptionFragmentInteractionListener onDiyDescriptionFragmentInteractionListener = this.mListener; if (onDiyDescriptionFragmentInteractionListener != null) { onDiyDescriptionFragmentInteractionListener.onDiyDescriptionHelp(view); } } }