mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-15 04:18:53 +01:00
phase 1: Activities and Fragments
This commit is contained in:
@@ -5,9 +5,6 @@ import org.briarproject.api.event.EventListener;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
/**
|
||||
* Created by Ernir Erlingsson (ernir@ymirmobile.com) on 8.1.2016.
|
||||
*/
|
||||
public abstract class BaseEventFragment extends BaseFragment implements
|
||||
EventListener {
|
||||
|
||||
|
||||
@@ -28,15 +28,13 @@ public abstract class BaseFragment extends Fragment {
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
BriarApplication application =
|
||||
(BriarApplication) getActivity().getApplication();
|
||||
injectActivity(application.getApplicationComponent());
|
||||
// AndroidComponent component =
|
||||
// ((BriarApplication) getActivity().getApplication())
|
||||
// .getApplicationComponent();
|
||||
// injectActivity(component);
|
||||
}
|
||||
|
||||
public abstract void injectActivity(AndroidComponent component);
|
||||
|
||||
public interface BaseFragmentListener {
|
||||
|
||||
void showLoadingScreen(boolean isBlocking, int stringId);
|
||||
|
||||
void hideLoadingScreen();
|
||||
@@ -45,4 +43,5 @@ public abstract class BaseFragment extends Fragment {
|
||||
|
||||
void runOnDbThread(Runnable runnable);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,67 +0,0 @@
|
||||
package org.briarproject.android.fragment;
|
||||
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.GridView;
|
||||
|
||||
import org.briarproject.R;
|
||||
import org.briarproject.android.AndroidComponent;
|
||||
import org.briarproject.api.event.Event;
|
||||
import org.briarproject.api.plugins.PluginManager;
|
||||
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
public class DashboardFragment extends BaseEventFragment {
|
||||
|
||||
public final static String TAG = "DashboardFragment";
|
||||
|
||||
private static final Logger LOG =
|
||||
Logger.getLogger(DashboardFragment.class.getName());
|
||||
|
||||
@Inject
|
||||
protected PluginManager pluginManager;
|
||||
|
||||
public static DashboardFragment newInstance() {
|
||||
|
||||
Bundle args = new Bundle();
|
||||
|
||||
DashboardFragment fragment = new DashboardFragment();
|
||||
fragment.setArguments(args);
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
View contentView =
|
||||
inflater.inflate(R.layout.fragment_dashboard, container, false);
|
||||
return contentView;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewCreated(View view, Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUniqueTag() {
|
||||
return TAG;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void injectActivity(AndroidComponent component) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void eventOccurred(Event e) {
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user