Why do text inside a button having an ion-item not showing full text height in android view


#1

Please I’ve been having this very problem.

Each time I use ion-item inside a button in my ionic app like this text

When I run it in android view. It doesn’t show the full text height it cuts the text a little from top when viewed. How do I correct this for Android view. This is an example. C and O broke a bit from top. Please how do I correct this. Thanks pls!


#2

Hi @amcee8
It will be good if you can share your code :smiley:


#4

how do i make my code a plain text. if i put the code. this browser tags off the tags. help please so i could paste it


#5

select preformatted text from the menu or press ctrl+shift+c and paste yourcode here


#6
 <ion-list>
      <ion-item-sliding *ngFor="let message of messages; let i = index" #itemSliding>
        <button icon-left ion-item style="background:inherit !important" (click)="gotoMessage(message,message.inboxmsgs,message.msg_id)">
          <ion-icon [name]="message.msg_status == false ? 'mail' : 'mail-open'" style="color:#81007F" item-left></ion-icon>
          <h2 style="color:#81007F">{{ message.inboxmsgs.fname }} {{ message.inboxmsgs.lname }}</h2>
          <p> {{ message.msg_body }} </p>
          <p>{{ message.created_at }}</p>
        </button>
        <ion-item-options>
          <button ion-button color="alternate" icon-left (click)="deleteMsg(message.msg_id, i, 1, itemSliding)"><ion-icon name="trash"></ion-icon>Delete</button>
        </ion-item-options>
      </ion-item-sliding>
    </ion-list>

#7

Hi @amcee8
do you applied padding for ion-item.This is due to some styling issue on your ion-item
Check your style.scss


#8

thanks man i really did appreciate