131 lines
4.7 KiB
Java
131 lines
4.7 KiB
Java
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.ImageView;
|
|
import android.widget.TextView;
|
|
import android.widget.Toast;
|
|
import butterknife.ButterKnife;
|
|
import butterknife.Unbinder;
|
|
import com.ubt.jimu.JimuApplication;
|
|
import com.ubt.jimu.R;
|
|
import com.ubtech.view.fragment.BaseFragment;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public class DiyHomeFragment extends BaseFragment {
|
|
private static final String ARG_PARAM1 = "param1";
|
|
private static final String ARG_PARAM2 = "param2";
|
|
protected ImageView imgRight;
|
|
private Unbinder mBind;
|
|
private OnBuildStepFragmentInteractionListener mListener;
|
|
private String mParam1;
|
|
private String mParam2;
|
|
protected TextView tvTitle;
|
|
|
|
public interface OnBuildStepFragmentInteractionListener {
|
|
void onImgRobotAction(View view);
|
|
|
|
void onImgRobotBuildStep(View view);
|
|
|
|
void onImgRobotDescription(View view);
|
|
|
|
void onImgRobotProgram(View view);
|
|
|
|
void onImgRobotShow(View view);
|
|
}
|
|
|
|
public static DiyHomeFragment newInstance(String str, String str2) {
|
|
DiyHomeFragment diyHomeFragment = new DiyHomeFragment();
|
|
Bundle bundle = new Bundle();
|
|
bundle.putString(ARG_PARAM1, str);
|
|
bundle.putString(ARG_PARAM2, str2);
|
|
diyHomeFragment.setArguments(bundle);
|
|
return diyHomeFragment;
|
|
}
|
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
@Override // com.ubtech.view.fragment.BaseFragment, androidx.fragment.app.Fragment
|
|
public void onAttach(Context context) {
|
|
super.onAttach(context);
|
|
if (context instanceof OnBuildStepFragmentInteractionListener) {
|
|
this.mListener = (OnBuildStepFragmentInteractionListener) context;
|
|
}
|
|
}
|
|
|
|
@Override // com.ubtech.view.fragment.BaseFragment, 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 // com.ubtech.view.fragment.BaseFragment, androidx.fragment.app.Fragment
|
|
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
|
|
View inflate = layoutInflater.inflate(R.layout.fragment_diy_home, viewGroup, false);
|
|
this.mBind = ButterKnife.a(this, inflate);
|
|
this.tvTitle.setText("创意小风扇");
|
|
this.imgRight.setBackgroundResource(R.drawable.community_mypublish_icon);
|
|
return inflate;
|
|
}
|
|
|
|
@Override // androidx.fragment.app.Fragment
|
|
public void onDestroyView() {
|
|
super.onDestroyView();
|
|
this.mBind.unbind();
|
|
}
|
|
|
|
@Override // androidx.fragment.app.Fragment
|
|
public void onDetach() {
|
|
super.onDetach();
|
|
this.mListener = null;
|
|
}
|
|
|
|
protected void onImgBack(View view) {
|
|
getActivity().finish();
|
|
}
|
|
|
|
protected void onImgPublish(View view) {
|
|
Toast.makeText(getContext(), JimuApplication.l().getResources().getString(R.string.post), 0).show();
|
|
}
|
|
|
|
protected void onImgRobotAction(View view) {
|
|
OnBuildStepFragmentInteractionListener onBuildStepFragmentInteractionListener = this.mListener;
|
|
if (onBuildStepFragmentInteractionListener != null) {
|
|
onBuildStepFragmentInteractionListener.onImgRobotAction(view);
|
|
}
|
|
}
|
|
|
|
protected void onImgRobotBuildStep(View view) {
|
|
OnBuildStepFragmentInteractionListener onBuildStepFragmentInteractionListener = this.mListener;
|
|
if (onBuildStepFragmentInteractionListener != null) {
|
|
onBuildStepFragmentInteractionListener.onImgRobotBuildStep(view);
|
|
}
|
|
}
|
|
|
|
protected void onImgRobotDescription(View view) {
|
|
OnBuildStepFragmentInteractionListener onBuildStepFragmentInteractionListener = this.mListener;
|
|
if (onBuildStepFragmentInteractionListener != null) {
|
|
onBuildStepFragmentInteractionListener.onImgRobotDescription(view);
|
|
}
|
|
}
|
|
|
|
protected void onImgRobotProgram(View view) {
|
|
OnBuildStepFragmentInteractionListener onBuildStepFragmentInteractionListener = this.mListener;
|
|
if (onBuildStepFragmentInteractionListener != null) {
|
|
onBuildStepFragmentInteractionListener.onImgRobotProgram(view);
|
|
}
|
|
}
|
|
|
|
protected void onImgRobotShow(View view) {
|
|
OnBuildStepFragmentInteractionListener onBuildStepFragmentInteractionListener = this.mListener;
|
|
if (onBuildStepFragmentInteractionListener != null) {
|
|
onBuildStepFragmentInteractionListener.onImgRobotShow(view);
|
|
}
|
|
}
|
|
}
|