forked from nextcloud/android
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
List divider added for tablet and landscape mode.
- Loading branch information
1 parent
e625f45
commit a9f2f1f
Showing
11 changed files
with
437 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.nmc.android.utils | ||
|
||
import android.content.res.Configuration | ||
import com.owncloud.android.MainApp | ||
import com.owncloud.android.R | ||
|
||
object DisplayUtils { | ||
|
||
@JvmStatic | ||
fun isShowDividerForList(): Boolean = isTablet() || isLandscapeOrientation() | ||
|
||
@JvmStatic | ||
fun isTablet(): Boolean = MainApp.getAppContext().resources.getBoolean(R.bool.isTablet) | ||
|
||
@JvmStatic | ||
fun isLandscapeOrientation(): Boolean = | ||
MainApp.getAppContext().resources.configuration.orientation == Configuration.ORIENTATION_LANDSCAPE | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.