xamarin/Xamarin.Forms

Toolbar button not shown on App startup

オープン

#2,118 opened on 2018/03/16

 (9 件のコメント) (3 件のリアクション) (0 人の担当者)C# (1,926 件のフォーク)batch import
e/5 :clock5:help wantedm/high impact :black_large_square:p/Androidt/bug :bug:up-for-grabs

Repository metrics

Stars
 (5,644 個のスター)
PR merge metrics
 (30d に merged PR はありません)

説明

Description

On Android "SetSupportActionBar()" has to be set to be able to intercept "OnOptionsItemSelected()". When not setting "SetSupportActionBar()" the function "OnOptionsItemSelected()" in MainActivity will not be triggered.

Unfortunately after adding this line of code the toolbar item is not shown at the first page after startup (MainPage). The toolbar item will appear after navigating to a different page and back to MainPage.

Steps to Reproduce

  1. Start App. Expected: Toolbar item "About" should be present Actual: No toolbar item is present

  2. Navigate to second page via button

  3. Navigate back via toolbar. This works and "OnOptionsItemSelected()" is triggered. Expected and Actual: Toolbar item "About" is now shown on MainPage and is working.

Basic Information

  • Version with issue: 2.5.0.280555

  • Last known good version:

  • IDE:

  • Platform Target Frameworks:

    • Android: 8.1 (but bug was in earlier releases, too
  • Android Support Library Version: 27.0.2

  • Affected Devices: Tested on Samsung Galaxy Tab S2 (Android 7.0), Google Pixel (Android 8.0)

Reproduction Link

https://github.com/TheSprigg/Toolbarbutton_not_shown/

コントリビューターガイド