This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this is retrofit response | |
Eventlist eventlist = response.body(); | |
List<Website> websites = eventlist.getWebsites(); // website is POJO class for even as per api | |
List<Website> filteredWebsite = new ArrayList<Website>(); // empty list new | |
for(Website temp:websites){ | |
if(temp.getCategory().equalsIgnoreCase(sortType.name())){ | |
filteredWebsite.add(temp); // sortType.name() is BOT or Competitive or whichever selected | |
} | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
public class QueueSample{ | |
public static void main(String args[]){ | |
Queue<Character> queVar = new LinkList<Character>(); | |
System.out.println("Adding new character to queue."); | |
queVar.add('A'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public int numOfColumnsForOrientation() { | |
Display display = getActivity().getWindowManager().getDefaultDisplay(); | |
int width = display.getWidth(); | |
int height = display.getHeight(); | |
int numOfColoums = 0; | |
if (width < height) { | |
// portrait mode | |
numOfColoums = 2; | |
if (width > 600) { // for tablet sw600 | |
numOfColoums = 3; |