xamarin/Xamarin.Forms

Android: ImageSource.FromFile does not pick up images if they are stored in a mipmap folder

开放

#3,244 创建于 2018年7月9日

 (1 条评论) (2 个反应) (0 位负责人)C# (1,926 个派生)batch import
help wantedin-progressp/Androidup-for-grabs

仓库指标

星标
 (5,644 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

Description

If Android images are stored in mipmap folders (see attached screenshot), then ImageSource.FromFile does not pick the images up, since the associated resource lies in the Resources.Mipmap type as opposed to the Resources.Drawable type.

Steps to Reproduce

  1. Create a Xamarin Forms project using File -> New Project
  2. Check that image resources are held in mipmap files, as per the attached screenshot. The F# template certainly does this.
  3. Load an image using ImageSource.FromFile

Expected Behavior

The image should be visible.

Actual Behavior

The image is not visible.

Basic Information

  • Version with issue:
  • Last known good version:
  • IDE:
  • Platform Target Frameworks:
    • iOS:
    • Android:
    • UWP:
  • Android Support Library Version:
  • Nuget Packages:
  • Affected Devices:

Screenshots

image

Reproduction Link

贡献者指南