BaseFragment.java 970 B

12345678910111213141516171819202122232425262728293031323334
  1. package com.ynstkz.shitu.android.base;
  2. import android.content.Context;
  3. import android.graphics.Color;
  4. import android.os.Bundle;
  5. import android.support.annotation.Nullable;
  6. import android.support.v4.app.Fragment;
  7. import android.view.LayoutInflater;
  8. import android.view.View;
  9. import android.view.ViewGroup;
  10. import com.muddzdev.styleabletoastlibrary.StyleableToast;
  11. /**
  12. * 作者:fuchangle on 2018/1/29 11:38
  13. */
  14. public class BaseFragment extends Fragment{
  15. @Nullable
  16. @Override
  17. public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
  18. return super.onCreateView(inflater, container, savedInstanceState);
  19. }
  20. protected void showToast(Context context, String content){
  21. new StyleableToast
  22. .Builder(context)
  23. .text(content)
  24. .textColor(Color.WHITE)
  25. .backgroundColor(Color.BLACK)
  26. .show();
  27. }
  28. }