'How to resize the application display on android after building from Ionic Web

Please click here to View My application when run on Web This Image is the view when the Application runs on Android Device

This is how my application looks (img is sample home page) but after the APK is generated the top section/header of the application is trimmed with the display in all the pages of my application



Solution 1:[1]

Here's a one-liner solution using Linq:

var filtered = myList.Select(kvp => kvp.Value).Distinct().Select(v => myList.First(kvp => kvp.Value == v)).ToList();

Keep in mind, this solution is O(N^2), and the problem can easily be solved O(N) but that shouldn't matter given the size of your list.

Here is a more human-readable solution that is O(N):

    var dictionary = new Dictionary<int, Room>();
    foreach (var (key,value) in myList)
    {
        if (!dictionary.ContainsKey(value)) dictionary[value] = key;
    }

    var filtered = dictionary.Select(kvp => new KeyValuePair<Room, int>(kvp.Value, kvp.Key)).ToList();

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1