This file contains hidden or 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
| /** | |
| * Enter the symbols found in a list of parse trees. | |
| * As a side-effect, this puts elements on the "todo" list. | |
| * Also stores a list of all top level classes in rootClasses. | |
| */ | |
| public List<JCCompilationUnit> enterTrees(List<JCCompilationUnit> roots) { | |
| //enter symbols for all files | |
| if (!taskListener.isEmpty()) { | |
| for (JCCompilationUnit unit: roots) { | |
| TaskEvent e = new TaskEvent(TaskEvent.Kind.ENTER, unit); |
This file contains hidden or 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 class Main{ | |
| private void adjustPositionByVertical(List<PreDrawText> preDrawTexts) { | |
| Collections.sort(preDrawTexts, new Comparator<PreDrawText>() { | |
| @Override | |
| public int compare(PreDrawText o1, PreDrawText o2) { | |
| if (o1.getDrawY() < o2.getDrawY()) return -1; // getDrawY() 从小到大排序 | |
| if (o1.getDrawY() > o2.getDrawY()) return 1; | |
| return 0; | |
| } | |
| }); |
This file contains hidden or 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 class ScreenAdaptUtil { | |
| private static final int STANDER_SCREEN_WIDTH_IN_DP = 360; | |
| private static float sNonCompatDensity; | |
| private static float sNonCompatScaleDensity; | |
| public static void setCustomDensity(Activity activity, Application application) { | |
| final DisplayMetrics appDisplayMetrics = application.getResources().getDisplayMetrics(); | |
| if (sNonCompatDensity == 0) { |