Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/romainguy/ViewServer
Local server for Android's HierarchyViewer
https://github.com/romainguy/ViewServer
Last synced: 2 months ago
JSON representation
Local server for Android's HierarchyViewer
- Host: GitHub
- URL: https://github.com/romainguy/ViewServer
- Owner: romainguy
- Archived: true
- Created: 2011-07-07T20:48:14.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2021-04-29T19:37:03.000Z (over 3 years ago)
- Last Synced: 2024-09-27T03:41:34.700Z (3 months ago)
- Language: Java
- Size: 167 KB
- Stars: 2,495
- Watchers: 160
- Forks: 583
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-android-person - ViewServer
README
**NOTE**: This library is not necessary anymore. Newer versions of
Android provide a new tool called Layout Inspector that should be
used instead.ViewServer is a simple class you can use in your Android application
to use the HierarchyViewer inspection tool.ViewServer requires the Android SDK r12 or higher.
http://developer.android.com/sdk/index.htmlQuick Start
-----
* Verify that you need this library([newer versions of Android don't][setup])
If you do need this library then follow these directions:
* Include the ViewServer library(easy directions found [here][jitpack])
* Your application __must__ require the INTERNET permission
* The recommended way to use this API is to register activities when they are created, and to unregister them when they get destroyed:```java
public class MyActivity extends Activity {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Set content view, etc.
ViewServer.get(this).addWindow(this);
}public void onDestroy() {
super.onDestroy();
ViewServer.get(this).removeWindow(this);
}public void onResume() {
super.onResume();
ViewServer.get(this).setFocusedWindow(this);
}
}
```
[setup]:http://developer.android.com/intl/es/tools/performance/hierarchy-viewer/setup.html
[jitpack]: https://jitpack.io/#romainguy/ViewServerPlease refer to the documentation in ViewServer.java for more info.