Srat Refactoring To Santoku

This commit is contained in:
Dark98
2026-01-30 04:28:58 +00:00
parent 5f2f0829dd
commit d692d3e061
140 changed files with 1117 additions and 1117 deletions
@@ -0,0 +1,62 @@
package com.dark98.santoku.navigation;
import android.content.Context;
import android.view.View;
import androidx.annotation.CallSuper;
import com.dark98.santoku.theme.ThemesRepo;
public abstract class Fragment {
private View mView;
private Context context;
public Context getContext() {
return context;
}
void setContext(Context context) {
this.context = context;
}
@CallSuper
public void onCreate() {}
@CallSuper
public void onResume() {}
@CallSuper
public void onPause() {}
@CallSuper
public void onDestroy() {
mView = null;
}
public void onApplyTheme() {
mView.setBackgroundColor(ThemesRepo.getColor(android.R.attr.windowBackground));
}
public abstract View onCreateView(Context ctx);
@CallSuper
public void onViewCreated(View v) {
mView = v;
}
public View getView() {
return mView;
}
public boolean onBackPressed() {
return false;
}
public SlotChangeCallback onCheckDelayForSlotChange() {
return null;
}
public interface SlotChangeCallback {
boolean needDelay(Runnable callback);
}
}