Results 1 to 4 of 4

Thread: Images are not show on Android

  1. #1
    Sencha User
    Join Date
    May 2017
    Posts
    39

    Default Images are not show on Android

    It works on iOS but not on Andorid. The images are not show up on android. I can't figure out what's going on here!

    Code:
    Ext.define('Test.view.Feed', {
        extend: 'Ext.Container',
    
    
        xtype: 'feed',
    
    
        requires: [
          'Ext.Label',
          'Ext.dataview.List'
        ],
    
    
        initialize: function(){
          this.items.items[0].setHtml(this.config.title)
          this.callParent()
        },
    
    
        config: {
          items:[{
              xtype: 'label'
            },
            {
              xtype: 'dataview',
              cls: Ext.baseCSSPrefix + 'feed',
              itemCls: Ext.baseCSSPrefix + 'feed-item',
              data: [
                {username:'aa',src:'http://res.cloudinary.com/hy2jntlyv/image/upload/v1482164023/msdctybsj198jh0tfb5p.jpg'},
                {username:'bb',src:'http://res.cloudinary.com/hy2jntlyv/image/upload/v1479932189/ikqbp38nihucscsx8dli.jpg'},
                {username:'cc',src:'http://res.cloudinary.com/hy2jntlyv/image/upload/v1492891684/luxxxew4fzkwsmdbhflm.jpg'}
              ],
              itemTpl: new Ext.XTemplate("<div class='preview'><img class='preview-user-img' src='{src}' style='display:inline'/><p class='preview-user-name'>{username}</p></div>"),
              inline: {wrap: false},
              scrollable: 'horizontal'
            },
            {
              xtype:'video',
              cls: Ext.baseCSSPrefix + 'feed-item-video',
              posterUrl:'http://res.cloudinary.com/hy2jntlyv/video/upload/v1493949147/cznyh7vbhbuxluyhsvzg.jpg',
              url:['http://res.cloudinary.com/hy2jntlyv/video/upload/v1493949147/cznyh7vbhbuxluyhsvzg.mp4'],
              width:'100%',
              height:'350px'
            }
          ]
        }
    
    
        /*template: [{
        }],*/
    });

    Code:
    .x-feed {
      margin-top:15px;
      height:100px;
    }
    
    
    //feed item style
    .x-feed-item{
    }
    
    
    .x-feed-item .preview{
      margin-right:10px;
    }
    
    
    .x-feed-item .preview-user-img{
      width:64px;
      height:64px;
      object-fit:cover;
      border-radius:50%;
      border:1px solid #eee;
    }
    
    
    .x-feed-item .preview-user-name{
      text-overflow: clip;
      text-align:center;
      font-size:10px;
      font-color:#777;
    }
    
    
    .x-feed-item-video{
      margin-bottom:30px;
      border-radius:6px;
    }
    
    
    .x-feed-item-video .x-video-ghost{
      border-radius:6px;
    }

  2. #2
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985

    Default

    So the photos remotely stored? How odd. Are you using Cordova and if so which version?

  3. #3
    Sencha User
    Join Date
    May 2017
    Posts
    39

    Default

    So the photos remotely stored? Stored on cdns
    How odd. Are you using Cordova and if so which version? Cordova/Phonegap

    I fixed it up doing:

    • cordova plugin rm cordova-plugin-whitelist
    • cordova plugin add cordova-plugin-whitelist
    • cordova plugin add cordova-plugin-crosswalk-webview


    I got as whitelist problem (suggestion found at stackoverflow). Remove and re-add the plugin. To fix some css issues I added crosswalk-webview.



  4. #4
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985

    Default

    Glad to hear that you found a solution, and thanks for sharing it here with the community.

Similar Threads

  1. [FIXED] Images are not clickable in android
    By meze in forum Sencha Touch 2.x: Bugs
    Replies: 18
    Last Post: 21 Jun 2012, 2:17 AM
  2. Show server images
    By sarah_77 in forum Sencha Touch 2.x: Discussion
    Replies: 2
    Last Post: 18 May 2012, 7:56 AM
  3. [FIXED] Bottom Tabs - no images (Android 4.0.3 Browser)
    By neutr0n in forum Sencha Touch 2.x: Bugs
    Replies: 11
    Last Post: 2 May 2012, 8:52 AM
  4. Images do not show for iconCls
    By nadeemyasin in forum Sencha Touch 2.x: Q&A
    Replies: 6
    Last Post: 25 Nov 2011, 2:20 AM
  5. Replies: 0
    Last Post: 2 Aug 2011, 5:37 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •