Skip to content

Commit 2655a8b

Browse files
authored
Use alt DDG logo when height is prohibitively small to use main one (#225)
1 parent 5729aa2 commit 2655a8b

File tree

12 files changed

+17
-12
lines changed

12 files changed

+17
-12
lines changed

app/src/main/java/com/duckduckgo/app/browser/BrowserTabFragment.kt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import android.arch.lifecycle.Observer
2222
import android.arch.lifecycle.ViewModelProviders
2323
import android.content.Context
2424
import android.content.Intent
25+
import android.content.res.Configuration
2526
import android.net.Uri
2627
import android.os.Bundle
2728
import android.support.annotation.StringRes
@@ -611,6 +612,14 @@ class BrowserTabFragment : Fragment(), FindListener {
611612
}
612613
}
613614

615+
/**
616+
* We don't destroy the activity on config changes like orientation, so we need to ensure we update resources which might change based on config
617+
*/
618+
override fun onConfigurationChanged(newConfig: Configuration) {
619+
super.onConfigurationChanged(newConfig)
620+
ddgLogo.setImageResource(R.drawable.full_logo)
621+
}
622+
614623
private fun resetTabState() {
615624
omnibarTextInput.text.clear()
616625
viewModel.resetView()
21.6 KB
Loading
13.5 KB
Loading
30.7 KB
Loading
49.3 KB
Loading
69.5 KB
Loading
-2.4 KB
Loading
-1.3 KB
Loading
-4.26 KB
Loading
-7.1 KB
Loading

0 commit comments

Comments
 (0)