Tabnine Logo
PendIntentCompat.getRect
Code IndexAdd Tabnine to your IDE (free)

How to use
getRect
method
in
com.lody.virtual.server.notification.PendIntentCompat

Best Java code snippets using com.lody.virtual.server.notification.PendIntentCompat.getRect (Showing top 9 results out of 315)

origin: android-hacker/VirtualXposed

private Rect getRect(View view) {
  Rect rect = new Rect();
  rect.top = view.getTop();
  rect.left = view.getLeft();
  rect.right = view.getRight();
  rect.bottom = view.getBottom();
  ViewParent viewParent = view.getParent();
  if (viewParent != null) {
    if (viewParent instanceof ViewGroup) {
      Rect prect = getRect((ViewGroup) viewParent);
      rect.top += prect.top;
      rect.left += prect.left;
      rect.right += prect.left;
      rect.bottom += prect.top;
    }
  }
  return rect;
}
origin: android-hacker/VirtualXposed

/**
 *
 * @param remoteViews notification's old remoteViews
 * @param remoteview notification's old remoteViews view
 * @param oldRemoteView notification's new remoteViews view
 */
public void setPendIntent(RemoteViews remoteViews, View remoteview, View oldRemoteView) {
  if (findPendIntents() > 0) {
    Iterator<Map.Entry<Integer, PendingIntent>> set = clickIntents.entrySet().iterator();
    List<RectInfo> list = new ArrayList<>();
    int index = 0;
    VLog.v(TAG, "start find intent");
    while (set.hasNext()) {
      Map.Entry<Integer, PendingIntent> e = set.next();
      View view = oldRemoteView.findViewById(e.getKey());
      if (view != null) {
        Rect rect = getRect(view);
        list.add(new RectInfo(rect, e.getValue(), index));
        index++;
      }
    }
    VLog.v(TAG, "find:" + list);
    if (remoteview instanceof ViewGroup) {
      setIntentByViewGroup(remoteViews, (ViewGroup) remoteview, list);
    }
  }
}
origin: android-hacker/VirtualXposed

  private void setIntentByViewGroup(RemoteViews remoteViews, ViewGroup viewGroup, List<RectInfo> list) {
    int count = viewGroup.getChildCount();
    Rect p = new Rect();
    viewGroup.getHitRect(p);
    for (int i = 0; i < count; i++) {
      View v = viewGroup.getChildAt(i);
      if (v instanceof ViewGroup) {
        // linearlayout
        setIntentByViewGroup(remoteViews, (ViewGroup) v, list);
      } else if (v instanceof TextView || v instanceof ImageView) {
        // textview
        Rect rect = getRect(v);
        RectInfo next = findIntent(rect, list);
        if (next != null) {
//                    VLog.d(TAG, next.rect+":setPendIntent:"+i);
//                    remoteViews.setImageViewBitmap(v.getId(), next.testBg);
          remoteViews.setOnClickPendingIntent(v.getId(), next.mPendingIntent);
        }
      }
    }
  }

origin: bzsome/VirtualApp-x326

private Rect getRect(View view) {
  Rect rect = new Rect();
  rect.top = view.getTop();
  rect.left = view.getLeft();
  rect.right = view.getRight();
  rect.bottom = view.getBottom();
  ViewParent viewParent = view.getParent();
  if (viewParent != null) {
    if (viewParent instanceof ViewGroup) {
      Rect prect = getRect((ViewGroup) viewParent);
      rect.top += prect.top;
      rect.left += prect.left;
      rect.right += prect.left;
      rect.bottom += prect.top;
    }
  }
  return rect;
}
origin: darkskygit/VirtualApp

private Rect getRect(View view) {
  Rect rect = new Rect();
  rect.top = view.getTop();
  rect.left = view.getLeft();
  rect.right = view.getRight();
  rect.bottom = view.getBottom();
  ViewParent viewParent = view.getParent();
  if (viewParent != null) {
    if (viewParent instanceof ViewGroup) {
      Rect prect = getRect((ViewGroup) viewParent);
      rect.top += prect.top;
      rect.left += prect.left;
      rect.right += prect.left;
      rect.bottom += prect.top;
    }
  }
  return rect;
}
origin: bzsome/VirtualApp-x326

/**
 *
 * @param remoteViews notification's old remoteViews
 * @param remoteview notification's old remoteViews view
 * @param oldRemoteView notification's new remoteViews view
 */
public void setPendIntent(RemoteViews remoteViews, View remoteview, View oldRemoteView) {
  if (findPendIntents() > 0) {
    Iterator<Map.Entry<Integer, PendingIntent>> set = clickIntents.entrySet().iterator();
    List<RectInfo> list = new ArrayList<>();
    int index = 0;
    VLog.v(TAG, "start find intent");
    while (set.hasNext()) {
      Map.Entry<Integer, PendingIntent> e = set.next();
      View view = oldRemoteView.findViewById(e.getKey());
      if (view != null) {
        Rect rect = getRect(view);
        list.add(new RectInfo(rect, e.getValue(), index));
        index++;
      }
    }
    VLog.v(TAG, "find:" + list);
    if (remoteview instanceof ViewGroup) {
      setIntentByViewGroup(remoteViews, (ViewGroup) remoteview, list);
    }
  }
}
origin: darkskygit/VirtualApp

  private void setIntentByViewGroup(RemoteViews remoteViews, ViewGroup viewGroup, List<RectInfo> list) {
    int count = viewGroup.getChildCount();
    Rect p = new Rect();
    viewGroup.getHitRect(p);
    for (int i = 0; i < count; i++) {
      View v = viewGroup.getChildAt(i);
      if (v instanceof ViewGroup) {
        // linearlayout
        setIntentByViewGroup(remoteViews, (ViewGroup) v, list);
      } else if (v instanceof TextView || v instanceof ImageView) {
        // textview
        Rect rect = getRect(v);
        RectInfo next = findIntent(rect, list);
        if (next != null) {
//                    VLog.d(TAG, next.rect+":setPendIntent:"+i);
//                    remoteViews.setImageViewBitmap(v.getId(), next.testBg);
          remoteViews.setOnClickPendingIntent(v.getId(), next.mPendingIntent);
        }
      }
    }
  }

origin: darkskygit/VirtualApp

/**
 *
 * @param remoteViews notification's old remoteViews
 * @param remoteview notification's old remoteViews view
 * @param oldRemoteView notification's new remoteViews view
 */
public void setPendIntent(RemoteViews remoteViews, View remoteview, View oldRemoteView) {
  if (findPendIntents() > 0) {
    Iterator<Map.Entry<Integer, PendingIntent>> set = clickIntents.entrySet().iterator();
    List<RectInfo> list = new ArrayList<>();
    int index = 0;
    VLog.v(TAG, "start find intent");
    while (set.hasNext()) {
      Map.Entry<Integer, PendingIntent> e = set.next();
      View view = oldRemoteView.findViewById(e.getKey());
      if (view != null) {
        Rect rect = getRect(view);
        list.add(new RectInfo(rect, e.getValue(), index));
        index++;
      }
    }
    VLog.v(TAG, "find:" + list);
    if (remoteview instanceof ViewGroup) {
      setIntentByViewGroup(remoteViews, (ViewGroup) remoteview, list);
    }
  }
}
origin: bzsome/VirtualApp-x326

  private void setIntentByViewGroup(RemoteViews remoteViews, ViewGroup viewGroup, List<RectInfo> list) {
    int count = viewGroup.getChildCount();
    Rect p = new Rect();
    viewGroup.getHitRect(p);
    for (int i = 0; i < count; i++) {
      View v = viewGroup.getChildAt(i);
      if (v instanceof ViewGroup) {
        // linearlayout
        setIntentByViewGroup(remoteViews, (ViewGroup) v, list);
      } else if (v instanceof TextView || v instanceof ImageView) {
        // textview
        Rect rect = getRect(v);
        RectInfo next = findIntent(rect, list);
        if (next != null) {
//                    VLog.d(TAG, next.rect+":setPendIntent:"+i);
//                    remoteViews.setImageViewBitmap(v.getId(), next.testBg);
          remoteViews.setOnClickPendingIntent(v.getId(), next.mPendingIntent);
        }
      }
    }
  }

com.lody.virtual.server.notificationPendIntentCompatgetRect

Popular methods of PendIntentCompat

  • <init>
  • findIntent
  • findPendIntents
  • getClickIntents
  • getOverlapArea
  • setIntentByViewGroup
  • setPendIntent

Popular in Java

  • Running tasks concurrently on multiple threads
  • getExternalFilesDir (Context)
  • getSupportFragmentManager (FragmentActivity)
  • notifyDataSetChanged (ArrayAdapter)
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now