2 semi circle seekarc around a button

2 semi circle seekarc around a button

By : user2948357
Date : November 14 2020, 04:51 PM
This might help you The suggestion by @corsair992 is very good. However, reimplementing onTouchEvent() in a FrameLayout descendant is not as easy at it sounds, since it's a very complex method with many special conditions.
In this particular case, the problem is that the FrameLayout contains two SeekArc views, and the one in the foreground is consuming all touch events. Therefore, altering SeekArc itself to ignore events that do not belong to it seems like a much simpler alternative. If SeekArc.ounTouchEvent() returns false for these "unwanted" touches, then its FrameLayout parent will attempt passing the event to its other child -- exactly what we want.
code :
public boolean onTouchEvent(MotionEvent event) {

    if (isUnwantedTouch(event))
        return false;

    switch (event.getAction()) {
    // ... same as before
protected boolean isUnwantedTouch(MotionEvent event)
    return (ignoreTouch(event.getX(), event.getY()) ||
            getProgressForAngle(getTouchDegrees(event.getX(), event.getY())) == INVALID_PROGRESS_VALUE);

Share : facebook icon twitter icon
Draw a semi-circle button iOS

Draw a semi-circle button iOS

By : sreekanth
Date : March 29 2020, 07:55 AM
will help you The problem is that your shape layer is positioned way outside the buttons bounds. If you just add the shape layer as a subview of your button's layer you'll see the problem:
code :
let circlePath = UIBezierPath.init(arcCenter: CGPointMake(button.bounds.size.width / 2, 0), radius: button.bounds.size.height, startAngle: 0.0, endAngle: CGFloat(M_PI), clockwise: true)
let circleShape = CAShapeLayer()
circleShape.path = circlePath.CGPath
button.layer.mask = circleShape
How to create a semi circle inside a div or a button inline with text

How to create a semi circle inside a div or a button inline with text

By : user2734788
Date : March 29 2020, 07:55 AM
around this issue I'm having trouble creating a semi circle inside a button that is inline/centered with the text, please help.. , Just use :after pseudo elements to achieve the desired result.
code :
.btn-default {
    border: 1px solid #c7c7c7;
    padding: 12px 35px;
    border-radius: 3px;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.12);
    position: relative;
    background: #fff;
.btn-default:after {
    content: "";
    position: absolute;
    width: 10px;
    background: #f00;
    right: 0;
    top: 50%;
    transform: translate(0, -50%);
    border-top-left-radius: 5px;
    z-index: 99;
    height: 20px;
    border-bottom-left-radius: 5px;
<button class="btn-default">Demo</button>
How to draw circle with semi line in middle with swift UI for a button background?

How to draw circle with semi line in middle with swift UI for a button background?

By : Acid Serg
Date : March 29 2020, 07:55 AM
With these it helps You can make your own Shape using Path and then use this shape as background for other view:
code :
struct ButtonWithSpecialRing: View {

    var body: some View {

        Button(action: {
            print("signed in")
        }) {

            Text("Sign up!")



struct CircleWithSemiLine: Shape {

    func path(in rect: CGRect) -> Path {

        var path = Path()
        let radius = rect.size.width / 2

        path.addArc(center: CGPoint(x: radius, y: radius / 2), radius: radius, startAngle: .degrees(0), endAngle: .degrees(360), clockwise: false)

        path.addLine(to: CGPoint(x: radius , y: radius / 2)) // you may play with radius to fit text

        return path


SeekArc is always circle

SeekArc is always circle

By : Gilotto S.
Date : March 29 2020, 07:55 AM
To fix the issue you can do I believe I got the solution after the long time thinking,
In your SeekArc file there is method called
semi-circle button android

semi-circle button android

By : So Gif
Date : March 29 2020, 07:55 AM
this one helps. I have two buttons and I want to change the shape of them to be semi-circles. Then place them beside each other to make a full circle. An image has been attached to show how I want the buttons to look. Any help would be greatly appreciated. Thank you. , You have to create one drawable xml file.
Related Posts Related Posts :
  • Repeating for loop in menu
  • Can Java garbage collector randomly delete objects in the On-Heap tier?
  • Apache CXF Exception: SSL connection unexpectedly closed
  • Add properties to ArrayList<Object> in Java
  • Multiple Adapters or One Adapter for different lists and objects - Code Performance
  • Is it good practice in Java for a class's method to redundantly return a modified global field of the class?
  • How to change the color of the background in libgdx labels?
  • direct file path not working
  • ClassFileTransformer + Javassist: no such field
  • How do I change and instance variable for an object which the user selects from a combobox?
  • reading and updating a large xml file in java
  • ActionListener and Thread.sleep
  • What is the maximum of number of arguments for varargs in java?
  • When I compile I get an error as "ask" cannot be resolved or is not a field"
  • What is the best way to check if 4 integer variables are equal to 0?
  • Storing constant webdriver elements in an enum
  • Java: Why main class does not extend Thread class
  • Java - how to find out if a directory is being used by another process?
  • How can I get a method to print?
  • Java unknown exceptions
  • BufferedReader,StreamWriter crash
  • found raw type: JComboBox
  • Java Generics -> Function return type
  • how to refresh contents of jtable on event of action listener?
  • Why does List interface extend Collection interface?
  • Pros and Cons of Clojure http client libraries
  • use final inside a for each loop
  • Convert java data object to service object
  • Unsupported major.minor version 51.0 while executing JSP
  • How do I display a word diagonally in Java?
  • making sure one task completes before another starts in java
  • My program gives an index out of bounds error
  • Removing duplicate characters in a String (user inputted keyword)
  • Jersey 2.0 Content-Length not set
  • AWS.SimpleQueueService.NonExistentQueue Exception thrown when Accessing Existing SQS queue
  • Where can I find the source code for the com.sun.jdi package?
  • How can I get path of resource under WEB-INF/class folder (java ee web dynamic project)
  • convert a hexadecimal into a decimal via string convert in java
  • error populating a table using jstl
  • If Singletons are bad then how do you store global state for a framework
  • input system where the user inputs the array position of the object followed by a # to indiacte quantity but it gives me
  • Java: when would I ever want to use static methods when I can use a singleton instead?
  • Extracting RSA public key modulus and exponent stored in unsigned char arrays
  • What does "cannot be resolved to a type" mean, and how can I fix it? Java Android 4.0
  • How can I have a callback on stdout/stderr readiness instead of busy polling?
  • How to report AWT/Swing event queue length programmatically?
  • What is the difference between different for loops in Java?
  • Java arrays effective use/alternative
  • EasyMock chained method call producing null pointer exception
  • Installing Java on Windows 8
  • Java: Is it bad practice to write methods that start with "get" when they aren't getters?
  • Can Iterable.filter() skip processing with "constant" (including short circuited) Predicates?
  • How to save edited JTable data to database?
  • Java Packet Sniffer
  • I have a getText error
  • Reading bytestream and writing to file
  • dat file is not get created by buffered writer
  • Converting a pdf to word document using java
  • Measuring memory use of a piece of code at runtime in Java as an on-going functionality of a service
  • What is Matrix.frustumM(mProjMatrix, 0, -ratio, ratio, -1, 1, 3, 7); in OpenGL ES 20?
  • shadow
    Privacy Policy - Terms - Contact Us © ourworld-yourmove.org