HierarchyView,让你的手机如虎添翼

2017-04-25  本文已影响99人  Nj_第一批老去的90后
public boolean startViewServer ( int port ) {
if ( isSystemSecure() ) {
return false ;
}
if ( !checkCallingPermission( Manifest.permission.DUMP, "startViewServer" ) ) {
return false ;
}
}

  allprojects {
      repositories {
      ...
        maven { url "[https://jitpack.io](https://jitpack.io)" }

          }

      }
dependencies {
        compile 'com.github.romainguy:ViewServer:-SNAPSHOT'
}


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);
      }
}
上一篇下一篇

猜你喜欢

热点阅读