Fix LogDisplayFragment

This commit is contained in:
Dominik Schürmann 2014-09-21 22:56:16 +02:00
parent 65c3d69d9a
commit f50c0e1905
3 changed files with 14 additions and 13 deletions

View File

@ -26,13 +26,16 @@ public class ConsolidateResult extends OperationResult {
super(result, log);
}
/**
* Construct from a parcel - trivial because we have no extra data.
*/
/** Construct from a parcel - trivial because we have no extra data. */
public ConsolidateResult(Parcel source) {
super(source);
}
@Override
public void writeToParcel(Parcel dest, int flags) {
super.writeToParcel(dest, flags);
}
public static Creator<ConsolidateResult> CREATOR = new Creator<ConsolidateResult>() {
public ConsolidateResult createFromParcel(final Parcel source) {
return new ConsolidateResult(source);

View File

@ -67,7 +67,11 @@ public class SingletonResult extends OperationResult {
toast.setIndeterminate(false);
toast.setSwipeToDismiss(true);
return toast;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
super.writeToParcel(dest, flags);
}
public static Creator<SingletonResult> CREATOR = new Creator<SingletonResult>() {

View File

@ -57,11 +57,11 @@ public class LogDisplayFragment extends ListFragment implements OnTouchListener
public static final String EXTRA_RESULT = "log";
@Override
public void onCreate(Bundle savedInstanceState) {
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
Intent intent = getActivity().getIntent();
if (intent.getExtras() == null || !intent.getExtras().containsKey(EXTRA_RESULT)) {
if (intent == null) {
getActivity().finish();
return;
}
@ -90,7 +90,8 @@ public class LogDisplayFragment extends ListFragment implements OnTouchListener
});
getListView().setFastScrollEnabled(true);
getListView().setDividerHeight(0);
getListView().setOnTouchListener(this);
}
public void decreaseLogLevel() {
@ -119,13 +120,6 @@ public class LogDisplayFragment extends ListFragment implements OnTouchListener
*/
}
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
getListView().setDividerHeight(0);
getListView().setOnTouchListener(this);
}
@Override
public boolean onTouch(View v, MotionEvent event) {
mDetector.onTouchEvent(event);