Skip to content

Commit

Permalink
Fix libtaskbar compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
farmerbb committed Dec 14, 2021
1 parent 43e48cd commit 460d741
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
19 changes: 19 additions & 0 deletions app/src/lib/res/values/ids.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2021 Braden Farmer
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<resources>
<item type="id" name="toolbar" />
</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,13 @@ private void proceedWithAppLaunch(Bundle savedInstanceState) {
setContentView(R.layout.tb_main);
}

setSupportActionBar(findViewById(R.id.toolbar));
if(!U.isLibrary(this)) {
setSupportActionBar(findViewById(R.id.toolbar));

ActionBar actionBar = getSupportActionBar();
if(actionBar != null && !U.isLibrary(this)) {
actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_TITLE);
ActionBar actionBar = getSupportActionBar();
if(actionBar != null) {
actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_TITLE);
}
}

theSwitch = findViewById(R.id.the_switch);
Expand Down

0 comments on commit 460d741

Please sign in to comment.