Changeset 1745 for trunk/autoquest-androidmonitor/src/de/ugoe/cs/autoquest/androidmonitor/Androidmonitor.java
- Timestamp:
- 09/15/14 11:02:48 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-androidmonitor/src/de/ugoe/cs/autoquest/androidmonitor/Androidmonitor.java
r1728 r1745 100 100 * 101 101 * @param view 102 * to be monitored 102 103 */ 103 104 public void addLogListenerToView(View view) { 105 addLogListenerToView(view, 0); 106 } 107 108 /** 109 * replace the listener of each view with a composite listener which 110 * collects several listeners for one view. 111 * 112 * @param view 113 * to be monitored 114 * @param parentHash 115 * hash of the parent view element 116 */ 117 private void addLogListenerToView(View view, int parentHash) { 118 119 logFile.addComponent(view, parentHash, activityName); 120 121 // hash code of the actual view element. Problem in using 122 // view.getParent().hashCode() is described in 123 // de.ugoe.cs.autoquest.androidmonitor addComponent() 124 parentHash = view.hashCode(); 104 125 // traverse all views of the activity 105 logFile.addComponent(view, activityName);106 126 if (view instanceof ViewGroup) { 107 127 ViewGroup group = (ViewGroup) view; 108 128 for (int i = 0; i < group.getChildCount(); i++) { 109 129 View child = group.getChildAt(i); 110 addLogListenerToView(child );130 addLogListenerToView(child, parentHash); 111 131 } 112 132 }
Note: See TracChangeset
for help on using the changeset viewer.