/*
* Copyright (C) 2017 MINDORKS NEXTGEN PRIVATE LIMITED
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://mindorks.com/license/apache-v2
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License
*/
package com.mindorks.framework.mvp.ui.about;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.mindorks.framework.mvp.R;
import com.mindorks.framework.mvp.ui.base.BaseFragment;
import javax.inject.Inject;
import butterknife.ButterKnife;
import butterknife.OnClick;
/**
* Created by janisharali on 27/01/17.
*/
public class AboutFragment extends BaseFragment implements AboutMvpView {
public static final String TAG = "AboutFragment";
@Inject
AboutMvpPresenter<AboutMvpView> mPresenter;
public static AboutFragment newInstance() {
Bundle args = new Bundle();
AboutFragment fragment = new AboutFragment();
fragment.setArguments(args);
return fragment;
}
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
@Nullable Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_about, container, false);
getActivityComponent().inject(this);
setUnBinder(ButterKnife.bind(this, view));
mPresenter.onAttach(this);
return view;
}
@Override
protected void setUp(View view) {
view.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
}
});
}
@OnClick(R.id.nav_back_btn)
void onNavBackClick() {
getBaseActivity().onFragmentDetached(AboutFragment.class.getSimpleName());
}
@Override
public void onDestroyView() {
mPresenter.onDetach();
super.onDestroyView();
}
}