move small tablet stuff detection to CommonActivity
use small tablet UI on screens up to 9"
This commit is contained in:
parent
1f831645ee
commit
bcd4b562a4
@ -31,7 +31,7 @@ public class CommonActivity extends FragmentActivity {
|
||||
m_smallScreenMode = smallScreen;
|
||||
}
|
||||
|
||||
protected void setupSmallTabletFlag() {
|
||||
protected void detectSmallTablet() {
|
||||
|
||||
DisplayMetrics displayMetrics = new DisplayMetrics();
|
||||
getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);
|
||||
@ -45,7 +45,7 @@ public class CommonActivity extends FragmentActivity {
|
||||
m_smallTablet = true;
|
||||
}
|
||||
|
||||
Log.d(TAG, "m_smallTabletMode=" + m_smallTablet);
|
||||
Log.d(TAG, "m_smallTabletMode=" + m_smallTablet + " " + inDiag);
|
||||
}
|
||||
|
||||
private void initDatabase() {
|
||||
@ -80,6 +80,8 @@ public class CommonActivity extends FragmentActivity {
|
||||
|
||||
Log.d(TAG, "m_compatMode=" + m_compatMode);
|
||||
|
||||
detectSmallTablet();
|
||||
|
||||
super.onCreate(savedInstanceState);
|
||||
}
|
||||
|
||||
|
@ -645,8 +645,6 @@ public class MainActivity extends CommonActivity implements OnlineServices {
|
||||
setContentView(R.layout.main);
|
||||
|
||||
setSmallScreen(findViewById(R.id.headlines_fragment) == null);
|
||||
|
||||
setupSmallTabletFlag();
|
||||
|
||||
IntentFilter filter = new IntentFilter();
|
||||
filter.addAction(OfflineDownloadService.INTENT_ACTION_SUCCESS);
|
||||
|
@ -291,8 +291,6 @@ public class OfflineActivity extends CommonActivity implements
|
||||
setContentView(R.layout.main);
|
||||
|
||||
setSmallScreen(findViewById(R.id.headlines_fragment) == null);
|
||||
|
||||
setupSmallTabletFlag();
|
||||
|
||||
if (!isCompatMode()) {
|
||||
if (!isSmallScreen()) {
|
||||
|
Loading…
Reference in New Issue
Block a user