Show header in empty tables.

This commit is contained in:
Przemek Grondek 2014-07-30 14:55:05 +02:00
parent e54ae0367f
commit 26a9181a44

View file

@ -1,5 +1,6 @@
package info.nerull7.mysqlbrowser; package info.nerull7.mysqlbrowser;
import android.app.ActionBar;
import android.app.Fragment; import android.app.Fragment;
import android.graphics.Typeface; import android.graphics.Typeface;
import android.os.Bundle; import android.os.Bundle;
@ -157,7 +158,7 @@ public class EntriesFragment extends Fragment implements AsyncDatabaseConnector.
} }
entriesTable.addView(newRow); entriesTable.addView(newRow);
syncWidths(); // please don't crash syncWidths();
fakeScroll(); fakeScroll();
} }
} else { } else {
@ -166,7 +167,8 @@ public class EntriesFragment extends Fragment implements AsyncDatabaseConnector.
errorMessage.setTypeface(null, Typeface.ITALIC); errorMessage.setTypeface(null, Typeface.ITALIC);
errorMessage.setClickable(false); errorMessage.setClickable(false);
entriesScrollView.removeView(entriesTable); entriesScrollView.removeView(entriesTable);
rootView.addView(errorMessage); headerFrame.setVisibility(View.VISIBLE);
entriesScrollView.addView(errorMessage);
} }
setLoading(false); setLoading(false);