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;
|
m_smallScreenMode = smallScreen;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void setupSmallTabletFlag() {
|
protected void detectSmallTablet() {
|
||||||
|
|
||||||
DisplayMetrics displayMetrics = new DisplayMetrics();
|
DisplayMetrics displayMetrics = new DisplayMetrics();
|
||||||
getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);
|
getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);
|
||||||
@ -45,7 +45,7 @@ public class CommonActivity extends FragmentActivity {
|
|||||||
m_smallTablet = true;
|
m_smallTablet = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
Log.d(TAG, "m_smallTabletMode=" + m_smallTablet);
|
Log.d(TAG, "m_smallTabletMode=" + m_smallTablet + " " + inDiag);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initDatabase() {
|
private void initDatabase() {
|
||||||
@ -80,6 +80,8 @@ public class CommonActivity extends FragmentActivity {
|
|||||||
|
|
||||||
Log.d(TAG, "m_compatMode=" + m_compatMode);
|
Log.d(TAG, "m_compatMode=" + m_compatMode);
|
||||||
|
|
||||||
|
detectSmallTablet();
|
||||||
|
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -646,8 +646,6 @@ public class MainActivity extends CommonActivity implements OnlineServices {
|
|||||||
|
|
||||||
setSmallScreen(findViewById(R.id.headlines_fragment) == null);
|
setSmallScreen(findViewById(R.id.headlines_fragment) == null);
|
||||||
|
|
||||||
setupSmallTabletFlag();
|
|
||||||
|
|
||||||
IntentFilter filter = new IntentFilter();
|
IntentFilter filter = new IntentFilter();
|
||||||
filter.addAction(OfflineDownloadService.INTENT_ACTION_SUCCESS);
|
filter.addAction(OfflineDownloadService.INTENT_ACTION_SUCCESS);
|
||||||
filter.addAction(OfflineUploadService.INTENT_ACTION_SUCCESS);
|
filter.addAction(OfflineUploadService.INTENT_ACTION_SUCCESS);
|
||||||
|
@ -292,8 +292,6 @@ public class OfflineActivity extends CommonActivity implements
|
|||||||
|
|
||||||
setSmallScreen(findViewById(R.id.headlines_fragment) == null);
|
setSmallScreen(findViewById(R.id.headlines_fragment) == null);
|
||||||
|
|
||||||
setupSmallTabletFlag();
|
|
||||||
|
|
||||||
if (!isCompatMode()) {
|
if (!isCompatMode()) {
|
||||||
if (!isSmallScreen()) {
|
if (!isSmallScreen()) {
|
||||||
findViewById(R.id.feeds_fragment).setVisibility(m_selectedArticleId != 0 && (isPortrait() || isSmallTablet()) ? View.GONE : View.VISIBLE);
|
findViewById(R.id.feeds_fragment).setVisibility(m_selectedArticleId != 0 && (isPortrait() || isSmallTablet()) ? View.GONE : View.VISIBLE);
|
||||||
|
Loading…
Reference in New Issue
Block a user