| 22 | import cc.ioctl.tmoe.ui.Theme; |
| 23 | |
| 24 | public abstract class BaseProxyFragment { |
| 25 | |
| 26 | private Bundle mArgs; |
| 27 | private boolean mIsPaused = true; |
| 28 | private final ProxyFragmentRttiHandler mProxyRttiHandler; |
| 29 | |
| 30 | protected BaseProxyFragment() { |
| 31 | this(null); |
| 32 | } |
| 33 | |
| 34 | protected BaseProxyFragment(@Nullable Bundle args) { |
| 35 | mArgs = args; |
| 36 | mProxyRttiHandler = new ProxyFragmentRttiHandler(this); |
| 37 | } |
| 38 | |
| 39 | public ProxyFragmentRttiHandler getProxyRttiHandler() { |
| 40 | return mProxyRttiHandler; |
| 41 | } |
| 42 | |
| 43 | public Object getProxyObject() { |
| 44 | return mProxyRttiHandler.getProxyInstance(); |
| 45 | } |
| 46 | |
| 47 | public interface ActionBarWrapper { |
| 48 | void setBackButtonImage(int resource); |
| 49 | |
| 50 | @Nullable |
| 51 | ImageView getBackButton(); |
| 52 | |
| 53 | void setActionBarMenuOnItemClick(View.OnClickListener listener); |
| 54 | |
| 55 | void setTitle(CharSequence value); |
| 56 | |
| 57 | String getTitle(); |
| 58 | |
| 59 | String getSubtitle(); |
| 60 | |
| 61 | void setSubtitle(CharSequence value); |
| 62 | } |
| 63 | |
| 64 | @Nullable |
| 65 | public ViewGroup getActionBar() { |
| 66 | return mProxyRttiHandler.getActionBar(); |
| 67 | } |
| 68 | |
| 69 | @Nullable |
| 70 | public ActionBarWrapper getActionBarWrapper() { |
| 71 | return mProxyRttiHandler.getActionBarWrapper(); |
| 72 | } |
| 73 | |
| 74 | public abstract View onCreateView(@NonNull Context context); |
| 75 | |
| 76 | public Bundle getArguments() { |
| 77 | return mArgs; |
| 78 | } |
| 79 | |
| 80 | public boolean isSwipeBackEnabled(MotionEvent event) { |
| 81 | return true; |
nothing calls this directly
no outgoing calls
no test coverage detected