问:
making a post request to a rest api in camunda
I have a bpmn process/file where i intend to pass data in json format to a rest api via a post request. I have included the xml for the workflow below,

```<code><?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions
    xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL"
    xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
    xmlns:dc="http://www.omg.org/spec/DD/20100524/DC"
    xmlns:zeebe="http://camunda.org/schema/zeebe/1.0"
    xmlns:di="http://www.omg.org/spec/DD/20100524/DI"
    xmlns:modeler="http://camunda.org/schema/modeler/1.0" id="Definitions_0wl4do2" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="5.6.0" modeler:executionPlatform="Camunda Cloud" modeler:executionPlatformVersion="8.1.0">
    <bpmn:process id="Process_06dpeub" isExecutable="true">
        <bpmn:sequenceFlow id="Flow_16ic7a9" sourceRef="StartEvent_1" targetRef="Activity_0nfsr66" />
        <bpmn:endEvent id="Event_0q8baf4">
            <bpmn:incoming>Flow_1gchegt</bpmn:incoming>
        </bpmn:endEvent>
        <bpmn:startEvent id="StartEvent_1" name="Employee record">
            <bpmn:extensionElements />
            <bpmn:outgoing>Flow_16ic7a9</bpmn:outgoing>
            <bpmn:messageEventDefinition id="MessageEventDefinition_0lrekv7" messageRef="Message_1bc80bb" />
        </bpmn:startEvent>
        <bpmn:serviceTask id="Activity_16u939z" name="Add employee">
            <bpmn:extensionElements>
                <zeebe:ioMapping>
                    <zeebe:input source="=body" target="payload" />
                    <zeebe:output source="= result" target="employeeResult" />
                </zeebe:ioMapping>
                <zeebe:taskDefinition type="legacy" />
                <zeebe:taskHeaders>
                    <zeebe:header key="url" value="/add/employee" />
                    <zeebe:header key="method" value="post" />
                </zeebe:taskHeaders>
            </bpmn:extensionElements>
            <bpmn:incoming>Flow_09bylzt</bpmn:incoming>
            <bpmn:outgoing>Flow_1gchegt</bpmn:outgoing>
        </bpmn:serviceTask>
        <bpmn:sequenceFlow id="Flow_1gchegt" sourceRef="Activity_16u939z" targetRef="Event_0q8baf4" />
        <bpmn:serviceTask id="Activity_0nfsr66" name="Generate Payload">
            <bpmn:extensionElements>
                <zeebe:taskDefinition type="script" retries="2" />
                <zeebe:taskHeaders>
                    <zeebe:header key="script" value="{   "employmentType": "LIMITED",   "onboardingCheck": "false",   "middleName": "ALI",   "permittedDependents": "0",   "personalEmail": "ayub_a@outlook.com",   "businessRoleId": "1",   "lastName": "Gama",   "gradeId": "",   "leaveGroupId": "1",   "businessPhone": "0523308810",   "leaveAllowance": "0",   "personalAddress": "DUBAI",   "employeeCode": "234234",   "dateOfBirth": "1978-08-08",   "firstName": "Alpha4",   "citizenship_countryId": "1",   "nationality": "Afghan",   "salutation": "Mr",   "personalPhone": "0523308810",   "maritalStatus": "SINGLE",   "leaveApprover": "1",   "residencyVisaLocation": "DUBAI",   "workingPatternId": "1",   "businessEmail": "Alpha7@gmail.com",   "preferredName": "Alpha4",   "projectedEmploymentDate": "1978-08-08",   "startDate": "2021-05-30",   "currentYearLeaveAllocation": "0",   "gender": "M" }" />
                    <zeebe:header key="language" value="mustache" />
                </zeebe:taskHeaders>
                <zeebe:ioMapping>
                    <zeebe:output source="=result" target="body" />
                </zeebe:ioMapping>
            </bpmn:extensionElements>
            <bpmn:incoming>Flow_16ic7a9</bpmn:incoming>
            <bpmn:outgoing>Flow_09bylzt</bpmn:outgoing>
        </bpmn:serviceTask>
        <bpmn:sequenceFlow id="Flow_09bylzt" sourceRef="Activity_0nfsr66" targetRef="Activity_16u939z" />
    </bpmn:process>
    <bpmn:message id="Message_1bc80bb" name="payload" />
    <bpmndi:BPMNDiagram id="BPMNDiagram_1">
        <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_06dpeub">
            <bpmndi:BPMNShape id="Event_0q8baf4_di" bpmnElement="Event_0q8baf4">
                <dc:Bounds x="572" y="99" width="36" height="36" />
            </bpmndi:BPMNShape>
            <bpmndi:BPMNShape id="Event_1ovhyfk_di" bpmnElement="StartEvent_1">
                <dc:Bounds x="162" y="99" width="36" height="36" />
                <bpmndi:BPMNLabel>
                    <dc:Bounds x="138" y="142" width="84" height="14" />
                </bpmndi:BPMNLabel>
            </bpmndi:BPMNShape>
            <bpmndi:BPMNShape id="BPMNShape_0veej1v" bpmnElement="Activity_16u939z">
                <dc:Bounds x="420" y="77" width="100" height="80" />
            </bpmndi:BPMNShape>
            <bpmndi:BPMNShape id="BPMNShape_14olppq" bpmnElement="Activity_0nfsr66">
                <dc:Bounds x="260" y="77" width="100" height="80" />
                <bpmndi:BPMNLabel />
            </bpmndi:BPMNShape>
            <bpmndi:BPMNEdge id="Flow_16ic7a9_di" bpmnElement="Flow_16ic7a9">
                <di:waypoint x="198" y="117" />
                <di:waypoint x="260" y="117" />
            </bpmndi:BPMNEdge>
            <bpmndi:BPMNEdge id="Flow_1gchegt_di" bpmnElement="Flow_1gchegt">
                <di:waypoint x="520" y="117" />
                <di:waypoint x="572" y="117" />
            </bpmndi:BPMNEdge>
            <bpmndi:BPMNEdge id="Flow_09bylzt_di" bpmnElement="Flow_09bylzt">
                <di:waypoint x="360" y="117" />
                <di:waypoint x="420" y="117" />
            </bpmndi:BPMNEdge>
        </bpmndi:BPMNPlane>
    </bpmndi:BPMNDiagram>
</bpmn:definitions>
</code>```

Authentication is done server side and the logs do show that the request is received but nothing else, which is unhelpful. The url "/add/employee" gets preappended on the server side and becomes a valid url, so no issue there.

I am not certain that i modelled this correctly as the request gets successfully processed from postman whereas it fails when done via the workflow. The error observed on Operate is,

```<code>{
  "name": "GeneralError",
  "message": "Cannot read property 'id' of undefined",
  "code": 500,
  "className": "general-error",
  "data": {},
  "errors": {},
  "status_code": 500,
  "reason_code": "Internal Server Error"
}
</code>```

Not much to go on, though i did initially get the same error on postman, it turns out some mandatory fields were missed in the payload. The payload would be what you would find in header script of the Generate Payload task.

What i am trying to get help on here is to see whether there is anything wrong with the bpmn model.

Body:
I have a bpmn process/file where i intend to pass data in json format to a rest api via a post request. I have included the xml for the workflow below,

<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions
    xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL"
    xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
    xmlns:dc="http://www.omg.org/spec/DD/20100524/DC"
    xmlns:zeebe="http://camunda.org/schema/zeebe/1.0"
    xmlns:di="http://www.omg.org/spec/DD/20100524/DI"
    xmlns:modeler="http://camunda.org/schema/modeler/1.0" id="Definitions_0wl4do2" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="5.6.0" modeler:executionPlatform="Camunda Cloud" modeler:executionPlatformVersion="8.1.0">
    <bpmn:process id="Process_06dpeub" isExecutable="true">
        <bpmn:sequenceFlow id="Flow_16ic7a9" sourceRef="StartEvent_1" targetRef="Activity_0nfsr66" />
        <bpmn:endEvent id="Event_0q8baf4">
            <bpmn:incoming>Flow_1gchegt</bpmn:incoming>
        </bpmn:endEvent>
        <bpmn:startEvent id="StartEvent_1" name="Employee record">
            <bpmn:extensionElements />
            <bpmn:outgoing>Flow_16ic7a9</bpmn:outgoing>
            <bpmn:messageEventDefinition id="MessageEventDefinition_0lrekv7" messageRef="Message_1bc80bb" />
        </bpmn:startEvent>
        <bpmn:serviceTask id="Activity_16u939z" name="Add employee">
            <bpmn:extensionElements>
                <zeebe:ioMapping>
                    <zeebe:input source="=body" target="payload" />
                    <zeebe:output source="= result" target="employeeResult" />
                </zeebe:ioMapping>
                <zeebe:taskDefinition type="legacy" />
                <zeebe:taskHeaders>
                    <zeebe:header key="url" value="/add/employee" />
                    <zeebe:header key="method" value="post" />
                </zeebe:taskHeaders>
            </bpmn:extensionElements>
            <bpmn:incoming>Flow_09bylzt</bpmn:incoming>
            <bpmn:outgoing>Flow_1gchegt</bpmn:outgoing>
        </bpmn:serviceTask>
        <bpmn:sequenceFlow id="Flow_1gchegt" sourceRef="Activity_16u939z" targetRef="Event_0q8baf4" />
        <bpmn:serviceTask id="Activity_0nfsr66" name="Generate Payload">
            <bpmn:extensionElements>
                <zeebe:taskDefinition type="script" retries="2" />
                <zeebe:taskHeaders>
                    <zeebe:header key="script" value="{   "employmentType": "LIMITED",   "onboardingCheck": "false",   "middleName": "ALI",   "permittedDependents": "0",   "personalEmail": "ayub_a@outlook.com",   "businessRoleId": "1",   "lastName": "Gama",   "gradeId": "",   "leaveGroupId": "1",   "businessPhone": "0523308810",   "leaveAllowance": "0",   "personalAddress": "DUBAI",   "employeeCode": "234234",   "dateOfBirth": "1978-08-08",   "firstName": "Alpha4",   "citizenship_countryId": "1",   "nationality": "Afghan",   "salutation": "Mr",   "personalPhone": "0523308810",   "maritalStatus": "SINGLE",   "leaveApprover": "1",   "residencyVisaLocation": "DUBAI",   "workingPatternId": "1",   "businessEmail": "Alpha7@gmail.com",   "preferredName": "Alpha4",   "projectedEmploymentDate": "1978-08-08",   "startDate": "2021-05-30",   "currentYearLeaveAllocation": "0",   "gender": "M" }" />
                    <zeebe:header key="language" value="mustache" />
                </zeebe:taskHeaders>
                <zeebe:ioMapping>
                    <zeebe:output source="=result" target="body" />
                </zeebe:ioMapping>
            </bpmn:extensionElements>
            <bpmn:incoming>Flow_16ic7a9</bpmn:incoming>
            <bpmn:outgoing>Flow_09bylzt</bpmn:outgoing>
        </bpmn:serviceTask>
        <bpmn:sequenceFlow id="Flow_09bylzt" sourceRef="Activity_0nfsr66" targetRef="Activity_16u939z" />
    </bpmn:process>
    <bpmn:message id="Message_1bc80bb" name="payload" />
    <bpmndi:BPMNDiagram id="BPMNDiagram_1">
        <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_06dpeub">
            <bpmndi:BPMNShape id="Event_0q8baf4_di" bpmnElement="Event_0q8baf4">
                <dc:Bounds x="572" y="99" width="36" height="36" />
            </bpmndi:BPMNShape>
            <bpmndi:BPMNShape id="Event_1ovhyfk_di" bpmnElement="StartEvent_1">
                <dc:Bounds x="162" y="99" width="36" height="36" />
                <bpmndi:BPMNLabel>
                    <dc:Bounds x="138" y="142" width="84" height="14" />
                </bpmndi:BPMNLabel>
            </bpmndi:BPMNShape>
            <bpmndi:BPMNShape id="BPMNShape_0veej1v" bpmnElement="Activity_16u939z">
                <dc:Bounds x="420" y="77" width="100" height="80" />
            </bpmndi:BPMNShape>
            <bpmndi:BPMNShape id="BPMNShape_14olppq" bpmnElement="Activity_0nfsr66">
                <dc:Bounds x="260" y="77" width="100" height="80" />
                <bpmndi:BPMNLabel />
            </bpmndi:BPMNShape>
            <bpmndi:BPMNEdge id="Flow_16ic7a9_di" bpmnElement="Flow_16ic7a9">
                <di:waypoint x="198" y="117" />
                <di:waypoint x="260" y="117" />
            </bpmndi:BPMNEdge>
            <bpmndi:BPMNEdge id="Flow_1gchegt_di" bpmnElement="Flow_1gchegt">
                <di:waypoint x="520" y="117" />
                <di:waypoint x="572" y="117" />
            </bpmndi:BPMNEdge>
            <bpmndi:BPMNEdge id="Flow_09bylzt_di" bpmnElement="Flow_09bylzt">
                <di:waypoint x="360" y="117" />
                <di:waypoint x="420" y="117" />
            </bpmndi:BPMNEdge>
        </bpmndi:BPMNPlane>
    </bpmndi:BPMNDiagram>
</bpmn:definitions>

Authentication is done server side and the logs do show that the request is received but nothing else, which is unhelpful. The url "/add/employee" gets preappended on the server side and becomes a valid url, so no issue there.

I am not certain that i modelled this correctly as the request gets successfully processed from postman whereas it fails when done via the workflow. The error observed on Operate is,

{
  "name": "GeneralError",
  "message": "Cannot read property 'id' of undefined",
  "code": 500,
  "className": "general-error",
  "data": {},
  "errors": {},
  "status_code": 500,
  "reason_code": "Internal Server Error"
}

Not much to go on, though i did initially get the same error on postman, it turns out some mandatory fields were missed in the payload. The payload would be what you would find in header script of the Generate Payload task.

What i am trying to get help on here is to see whether there is anything wrong with the bpmn model.


来源: stackexchange

问:
Polite webscraping with a jsonlite function
I have been trying to scrap a page, but after a few scraps, the page block my access for an hour.

I read about the R package called {polite} and it maybe can solve my problem.

But I'm failing to implement the function`s package in my code.

I did:

#conection
url_ini <- paste0("https://www.instagram.com/instagram/?__a=1&__d=11")
document_ini <- jsonlite::fromJSON(txt = url_ini)

#extracting information
id <- document_ini$graphql$user$id
end_cursor <- document_ini$graphql$user$edge_owner_to_timeline_media$page_info$end_cursor
         n1 <- 'https://www.instagram.com/graphql/query/?query_hash=e769aa130647d2354c40ea6a439bfc08&variables={%22id%22:%22'
         n2 <- '%22,%22first%22:12,%22after%22:%22'
         n3 <- "%22}"
url <- noquote(paste0(n1, id, n2, end_cursor, n3))
document <- jsonlite::fromJSON(txt = url)
```
<p>There are more code, but I think if I can do this part, I will be able to do the rest.</p>
<p>I tried without success things like this:</p>
<pre class="lang-r prettyprint-override"><code>url_ini <- paste0("https://www.instagram.com/instagram/?__a=1&__d=11")

session <- polite::bow(url_ini)

document_ini <- jsonlite::fromJSON(txt = session) # doesn't work

responses <- map(session, ~polite::scrape(session,jsonlite::fromJSON))  # doesn't work
</code>```

ContentLicense: CC BY-SA 4.0

Body:
I have been trying to scrap a page, but after a few scraps, the page block my access for an hour.

I read about the R package called {polite} and it maybe can solve my problem.

But I'm failing to implement the function`s package in my code.

I did:

#conection
url_ini <- paste0("https://www.instagram.com/instagram/?__a=1&__d=11")
document_ini <- jsonlite::fromJSON(txt = url_ini)

#extracting information
id <- document_ini$graphql$user$id
end_cursor <- document_ini$graphql$user$edge_owner_to_timeline_media$page_info$end_cursor
         n1 <- 'https://www.instagram.com/graphql/query/?query_hash=e769aa130647d2354c40ea6a439bfc08&variables={%22id%22:%22'
         n2 <- '%22,%22first%22:12,%22after%22:%22'
         n3 <- "%22}"
url <- noquote(paste0(n1, id, n2, end_cursor, n3))
document <- jsonlite::fromJSON(txt = url)

There are more code, but I think if I can do this part, I will be able to do the rest.

I tried without success things like this:

url_ini <- paste0("https://www.instagram.com/instagram/?__a=1&__d=11")

session <- polite::bow(url_ini)

document_ini <- jsonlite::fromJSON(txt = session) # doesn't work

responses <- map(session, ~polite::scrape(session,jsonlite::fromJSON))  # doesn't work


问:
Bypassing textInput for reactive leaflet map
i have somehow a quite tricky question. Im creating an interactive leaflet map in my shinydashboard. Everything works fine (the error just appears because its waiting for some text input to be processed and then mapped).

But.. I don't get the map to work, when only the first textinput is given some Input. One must insert something in the second, which is not handy and can lead to some weird results. If nothing is insert, the script doesn't get any further and is stuck.

Wrap up. How its possible to make the second textinput obligatory?

Is there a workaround or a possibility to deactivate the second textinput until one inserts a string? Otherwise the script just waits and waits (throws this error because no string is given which can be processed obviously)...

Structure

textinput from shiny dashboard -> parsed into google_places request -> tidy -> returns points (Lon, Lat) -> gets displayed on the leaflet map.

The Dashboard

Even though it must not have to do with the leaflet-map I provide a shrinked code. Its the second addCircleMarkers argument.

The map

```<code>map$dat <-leaflet () %>%
     addProviderTiles(providers$CartoDB.Positron, group = "Positron Design") %>%
     addMarkers(lat= Ort_geocode()$lat, lng= Ort_geocode()$lng, group = "Standort") %>%
     addCircleMarkers(data = cowork(), popup = paste(as.character(cowork()$name), "</br>", cowork()$rating),fill =TRUE, fillColor ="#20205F", stroke =FALSE, fillOpacity = 0.8, group = "Erste Nutzung",
                      labelOptions = labelOptions(noHide = T, textOnly = TRUE, direction = "bottom", style = list("color" = "black", "font-size" = "11px", "font-family" = "AkkuratStd", "font-style" = "Thin"))) %>%
     addCircleMarkers(data = Zweite_Nutzung(), popup = paste(as.character(Zweite_Nutzung()$name), "</br>", Zweite_Nutzung()$rating), fill =TRUE, fillColor ="#607758", stroke =FALSE, fillOpacity =  0.8, group = "Zweite Nutzung" ,
                      labelOptions = labelOptions(noHide = T, textOnly = TRUE, direction = "bottom", style = list("color" = "black", "font-size" = "11px", "font-family" = "AkkuratStd", "font-style" = "Thin"))) %>%
     addHeatmap(data = cowork(), lng= cowork()$lng,lat= cowork()$lat, intensity = 20 ,max=40,radius=20,blur=15, gradient = "inferno" , group = "Cluster") %>%
     addHeatmap(data = Zweite_Nutzung(), lng= Zweite_Nutzung()$lng,lat= Zweite_Nutzung()$lat, intensity = 20 ,max=40,radius=20,blur=15, gradient = "magma", group = "Cluster 2") %>%
     addLayersControl(
       baseGroups = c("Kartengrundlage", "Positron Design"),
       overlayGroups = c("Standort", "Cluster", "Cluster 2", "Erste Nutzung", "Zweite Nutzung", "Modalität 1", "Modalität 2", "Modalität 1 Nacht", "Modalität 2 Nacht"),
       options = layersControlOptions(collapsed = FALSE)) %>%
     hideGroup("Cluster") %>%
     hideGroup("Cluster 2") %>%
     addFullscreenControl(pseudoFullscreen = TRUE)

 })

</code>```

Im more than thankful if somebody could help me.

Great weekend guys!

Sebastian

Body:
i have somehow a quite tricky question. Im creating an interactive leaflet map in my shinydashboard. Everything works fine (the error just appears because its waiting for some text input to be processed and then mapped).

But.. I don't get the map to work, when only the first textinput is given some Input. One must insert something in the second, which is not handy and can lead to some weird results. If nothing is insert, the script doesn't get any further and is stuck.

Wrap up. How its possible to make the second textinput obligatory?

Is there a workaround or a possibility to deactivate the second textinput until one inserts a string? Otherwise the script just waits and waits (throws this error because no string is given which can be processed obviously)...

Structure

textinput from shiny dashboard -> parsed into google_places request -> tidy -> returns points (Lon, Lat) -> gets displayed on the leaflet map.

The Dashboard

Even though it must not have to do with the leaflet-map I provide a shrinked code. Its the second addCircleMarkers argument.

The map

map$dat <-leaflet () %>%
     addProviderTiles(providers$CartoDB.Positron, group = "Positron Design") %>%
     addMarkers(lat= Ort_geocode()$lat, lng= Ort_geocode()$lng, group = "Standort") %>%
     addCircleMarkers(data = cowork(), popup = paste(as.character(cowork()$name), "
", cowork()$rating),fill =TRUE, fillColor ="#20205F", stroke =FALSE, fillOpacity = 0.8, group = "Erste Nutzung",
                      labelOptions = labelOptions(noHide = T, textOnly = TRUE, direction = "bottom", style = list("color" = "black", "font-size" = "11px", "font-family" = "AkkuratStd", "font-style" = "Thin"))) %>%
     addCircleMarkers(data = Zweite_Nutzung(), popup = paste(as.character(Zweite_Nutzung()$name), "
", Zweite_Nutzung()$rating), fill =TRUE, fillColor ="#607758", stroke =FALSE, fillOpacity =  0.8, group = "Zweite Nutzung" ,
                      labelOptions = labelOptions(noHide = T, textOnly = TRUE, direction = "bottom", style = list("color" = "black", "font-size" = "11px", "font-family" = "AkkuratStd", "font-style" = "Thin"))) %>%
     addHeatmap(data = cowork(), lng= cowork()$lng,lat= cowork()$lat, intensity = 20 ,max=40,radius=20,blur=15, gradient = "inferno" , group = "Cluster") %>%
     addHeatmap(data = Zweite_Nutzung(), lng= Zweite_Nutzung()$lng,lat= Zweite_Nutzung()$lat, intensity = 20 ,max=40,radius=20,blur=15, gradient = "magma", group = "Cluster 2") %>%
     addLayersControl(
       baseGroups = c("Kartengrundlage", "Positron Design"),
       overlayGroups = c("Standort", "Cluster", "Cluster 2", "Erste Nutzung", "Zweite Nutzung", "Modalität 1", "Modalität 2", "Modalität 1 Nacht", "Modalität 2 Nacht"),
       options = layersControlOptions(collapsed = FALSE)) %>%
     hideGroup("Cluster") %>%
     hideGroup("Cluster 2") %>%
     addFullscreenControl(pseudoFullscreen = TRUE)

 })

Im more than thankful if somebody could help me.

Great weekend guys!

Sebastian


问:
Impossible to enable Edge swipe on wear OS with SwipeDismissFrameLayout
I create a blank jet compose app on Wear OS.
I want to enable edge swipe for exit app with left to right gest because i use pan on my app.
I follow the procedure that can be seen [here][1], but it does not work. Here is my code with MainActivity.kt and main_activity.xml.

```<code>class MainActivity : ComponentActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)

        setContent {
            //WearApp("Android")
            setContentView(R.layout.activity_main)
            val swipeLayout  = findViewById<SwipeDismissFrameLayout>(R.id.swipe_dismiss_root)
            swipeLayout.addCallback(object : SwipeDismissFrameLayout.Callback() {
                override fun onDismissed(layout: SwipeDismissFrameLayout) {
                    layout.visibility = View.GONE
                }
            })
        }
    }
}

<?xml version="1.0" encoding="utf-8"?>
<androidx.wear.widget.SwipeDismissFrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:id="@+id/swipe_dismiss_root" >

    <TextView
        android:id="@+id/test_content"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:gravity="center"
        android:text="Swipe me to dismiss me." />
</androidx.wear.widget.SwipeDismissFrameLayout>
</code>```

An idea. Thank you.
[1]: https://developer.android.com/training/wearables/views/exit

Body:
I create a blank jet compose app on Wear OS.
I want to enable edge swipe for exit app with left to right gest because i use pan on my app.
I follow the procedure that can be seen [here][1], but it does not work. Here is my code with MainActivity.kt and main_activity.xml.

class MainActivity : ComponentActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)

        setContent {
            //WearApp("Android")
            setContentView(R.layout.activity_main)
            val swipeLayout  = findViewById<SwipeDismissFrameLayout>(R.id.swipe_dismiss_root)
            swipeLayout.addCallback(object : SwipeDismissFrameLayout.Callback() {
                override fun onDismissed(layout: SwipeDismissFrameLayout) {
                    layout.visibility = View.GONE
                }
            })
        }
    }
}

<?xml version="1.0" encoding="utf-8"?>
<androidx.wear.widget.SwipeDismissFrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:id="@+id/swipe_dismiss_root" >

    <TextView
        android:id="@+id/test_content"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:gravity="center"
        android:text="Swipe me to dismiss me." />
</androidx.wear.widget.SwipeDismissFrameLayout>

An idea. Thank you.
[1]: https://developer.android.com/training/wearables/views/exit


问:
KeyboardAwareScrollView and KeyboardAvoidingView Both just compress the inputs together and don't move anything else on the screen
I have an app that I am working on and am having trouble with the android styling.  Everything looked fine on iOS but then when I used it on an android emulator the inputs were squished towards the top and all of the text was overlapping.  So I'm trying to figure out how to use the KeyboardAwareScrollView or the KeyboardAvoidingView to either move absolutely everything on the page up or at least move the content under the header up and under the header so that you can still see the input.  Here are some screen shots to show what is currently happening.

The screen when inputs are not focused on:

The Screen when an input is focused on:

Here is my screen's code.  You can see by the commented out sections that I also tried placing these keyboard aware views on almost the very outside of my screen in an attempt to move the entire screen's content.  Instead, it continued to behave in the same way.

```<code>  return (
    <SafeAreaView edges={['top']} style={{ flex: 1, backgroundColor: theme.colors.primary }}>
    <SafeAreaView edges={['left', 'right', 'bottom']} style={{ flex: 1, backgroundColor: theme.colors['Surface'] }}>
      <StatusBar barStyle="light-content" backgroundColor={theme.colors.primary} />
      {/* <KeyboardAvoidingView
          style={{ width: '100%', height: Dimensions.get('window').height, backgroundColor: theme.colors.Background, justifyContent: 'flex-end' }}
          behavior={Platform.OS === "ios" ? "padding" : "padding"}
          contentContainerStyle={{ width: '100%', height: '100%'}}
          enabled={true}
          keyboardVerticalOffset={-120}
        > */}
      {/* <KeyboardAwareScrollView
        extraHeight={0}
        enableOnAndroid={true}
        automaticallyAdjustContentInsets={true}
        scrollEnabled={false}
        contentContainerStyle={{ height: Dimensions.get('window').height }}
      > */}
      <ScreenContainer hasSafeArea={false} scrollable={false}>
          <View style={[styles.topBlueContainer, { backgroundColor: theme.colors.primary, position: 'absolute', zIndex: 99 }]}>
            {/* Logo */}
            <View style={styles.logoContainer}>
              <View style={styles.Viewfe3a5f26}>
                <Text
                  style={[styles.ConnectLogo, { color: theme.colors['Background'] }]}
                >
                  {'company'}
                </Text>

                <Text
                  style={[styles.WalletLogo, { color: theme.colors['Background'] }]}
                >
                  {'name'}
                </Text>

                <View style={styles.View63f8fbfb}>
                  <Icon
                    name={'AntDesign/trademark'}
                    size={8}
                    color={theme.colors['Background']}
                  />
                </View>
              </View>
            </View>

            {/* header row */}
            <View style={[styles.headerRow, {}]}>
              <Touchable
                onPress={() => {
                  navigation.navigate('PortfolioDetailsScreen');
                }}
                style={[styles.backArrowBtnContainer, {}]}
              >
                <Icon
                    name={'AntDesign/left'}
                    size={36}
                    color={theme.colors['Background']}
                />
              </Touchable>

              <View style={[styles.currencyTitleContainer, {}]}>
                <Text style={[styles.currencyTitleText, { color: theme.colors['Background'] }]}> SEND {selectedToken.symbol}</Text>
              </View>

              <View style={styles.backArrowBtnContainer} />
            </View>
          </View>

          {/* Page Content */}
          <KeyboardAwareScrollView
            extraScrollHeight={-220}
            style={[
                styles.contentContainer,
                {
                  height: '100%',
                  paddingTop: 120,
                }
            ]}
            contentContainerStyle={
              {
                alignItems: 'center',
                flex: 1
              }
            }
            resetScrollToCoords={{ x: 0, y: 0 }}
            enableOnAndroid={true}
            viewIsInsideTabBar={true}
          >

              {/* Total Amnt Container */}
              <View style={{ width: '100%', height: '25%', justifyContent: 'center', alignItems: 'center' }}>
                  <Text style={{ fontSize: 56, fontFamily: 'TitilliumWeb_600SemiBold', textAlign: 'center', marginBottom: -10 }}>{selectedToken.balance.toString().slice(0, 10)}</Text>
                  <Text style={{ fontSize: 16, fontFamily: 'TitilliumWeb_400Regular', textAlign: 'center', color: '#979797' }}>Current Balance</Text>
              </View>

              {/* Amnt To Send Container */}
              <View style={{ width: '100%', height: '25%' }}>
                  <View style={{ width: '100%', height: '50%', justifyContent: 'flex-end', alignItems: 'center' }}>
                  <TextInput
                    onChangeText={newTextInputValue => {
                      try {
                        if (newTextInputValue) {
                          if (newTextInputValue === '.') {
                            setAmountToSend('0.');
                          } else if (parseFloat(newTextInputValue) <= parseFloat(selectedToken.balance)) {
                            setAmountToSend(newTextInputValue);
                          } else {
                            Alert.alert('Not Enough Funds', reachedMaxButtons);
                          }
                        } else {
                          setAmountToSend(newTextInputValue);
                        }
                      } catch (err) {
                        console.error(err);
                      }
                    }}
                    style={[
                      styles.amountInput,
                      { borderColor: theme.colors.divider },
                    ]}
                    placeholder={'0.00'}
                    value={amountToSend}
                    editable={true}
                    placeholderTextColor={theme.colors['Medium']}
                    keyboardType={'decimal-pad'}
                  />
                  </View>
                  <View style={{ width: '100%', flexDirection: 'row', justifyContent: 'space-between', marginTop: 10 }}>
                      <View style={{ width: 100 }}/>
                      <View>
                        <Text style={{ fontSize: 16, fontFamily: 'TitilliumWeb_400Regular', textAlign: 'center', color: '#979797' }}>Amount</Text>
                      </View>
                      <Touchable
                        style={{
                          width: 100,
                          height: 30,
                          backgroundColor: theme.colors['Background'],
                          borderWidth: 1,
                          borderRadius: 23,
                          borderColor: '#347AF0',
                          alignItems: 'center',
                          justifyContent: 'center'
                        }}
                        onPress={() => {
                          setAmountToSend(selectedToken.balance.toString());
                        }}
                      >
                        <Text style={{ fontSize: 16, fontFamily: 'TitilliumWeb_600SemiBold', color: '#347AF0' }}>Max</Text>
                      </Touchable>
                  </View>
              </View>

              {/* Address Container */}
              <View style={{ width: '100%', height: '25%' }}>
                  <View style={{ width: '100%', height: '50%', justifyContent: 'flex-end', alignItems: 'flex-start', alignItems: 'center' }}>
                      <TextInput
                      style={styles.addressInput}
                      placeholder={'0x43452...'}
                      placeholderTextColor={theme.colors['Medium']}
                      editable={true}
                      value={addressToSendTo}
                      onChangeText={newAddressValue => {
                          try {
                          setAddressToSendTo(newAddressValue);
                          } catch (err) {
                          console.error(err);
                          }
                      }}
                      />
                  </View>
                  <View style={{ width: '100%', flexDirection: 'row', justifyContent: 'space-between', alignItems: 'flex-start', marginTop: 10 }}>
                      <View style={{ width: 100 }}/>
                      <View>
                        <Text style={{ fontSize: 16, fontFamily: 'TitilliumWeb_400Regular', textAlign: 'center', color: '#979797' }}>Recipient</Text>
                      </View>
                      <Touchable
                        style={{
                          width: 100,
                          height: 30,
                          backgroundColor: theme.colors['Background'],
                          borderWidth: 1,
                          borderRadius: 23,
                          borderColor: '#347AF0',
                          alignItems: 'center',
                          justifyContent: 'center'
                        }}

                        onPress={() => {
                          navigation.navigate('CodeScannerScreen', { 'screen': 'SendTokenUpdatedScreen' });
                        }}
                      >
                        <Text style={{ fontSize: 16, fontFamily: 'TitilliumWeb_600SemiBold', color: '#347AF0' }}>Scan QR</Text>
                      </Touchable>
                  </View>
              </View>

            {/* Next Btn Container */}
            <View style={{ width: '100%', height: '25%', alignItems: 'center', justifyContent: 'flex-start' }}>
                <Button
                  title={'Next'}
                  style={{
                    width: '100%',
                    maxWidth: 300,
                    height: 46,
                    fontFamily: 'TitilliumWeb_600SemiBold',
                    fontSize: 19,
                    color: theme.colors['Background'],
                    borderRadius: 23,
                  }}
                  onPress={() => {
                    console.log('amount', amountToSend)
                    console.log('amount there: ', amountToSend === '')
                    navigation.navigate('ConfirmSendTokenScreen', {
                      'amountToSend': amountToSend,
                      'addressToSendTo': addressToSendTo,
                      'selectedToken': selectedToken,
                    });
                  }}
                  disabled={addressToSendTo === '' || amountToSend === ''}
                />
            </View>
          </KeyboardAwareScrollView>
      </ScreenContainer>
      {/* </KeyboardAvoidingView> */}
      {/* </KeyboardAwareScrollView> */}
    </SafeAreaView>
    </SafeAreaView>
  );
};

const styles = StyleSheet.create({
  logoContainer: {
    paddingLeft: 15,
  },
  Viewfe3a5f26: {
    alignItems: 'flex-start',
    flexDirection: 'row',
  },
  WalletLogo: {
    alignSelf: 'flex-start',
    fontSize: 28,
    fontFamily: 'ProximaNova-Bold'
  },
  ConnectLogo: {
    alignSelf: 'flex-end',
    fontSize: 28,
    paddingRight: 5,
    fontFamily: 'ProximaNova-Regular'
  },
  View63f8fbfb: {
    paddingTop: 5,
  },
  topBlueContainer: {
    height: 120,
    width: '100%'
  },
  headerRow: {
    width: '100%',
    flexDirection: 'row',
    marginTop: 20,
  },
  backArrowBtnContainer: {
    paddingLeft: 12,
    justifyContent: 'center',
    width: '15%',
  },
  currencyTitleContainer: {
    width: 200,
    alignItems: 'center',
    width: '70%'
  },
  currencyTitleText: {
    fontFamily: 'TitilliumWeb_700Bold',
    fontSize: 36
  },
  contentContainer: {
    width: '100%',
    paddingLeft: 20,
    paddingRight: 20,
  },
  amountInput: {
    fontSize: 56,
    width: '100%',
    height: 56,
    textAlign: 'center',
    borderBottomWidth: 1,
    fontFamily: 'TitilliumWeb_600SemiBold',
  },
  amountLabel: {
    fontFamily: 'TitilliumWeb_400Regular',
    color: '#979797',
    fontSize: 16,
  },
  scanQRBtn: {
    width: 100,
    height: 30,
    borderRadius: 23,
    borderWidth: 1,
  },
  addressInput: {
    fontSize: 56,
    width: '100%',
    height: 56,
    marginTop: 10,
    textAlign: 'center',
    borderBottomWidth: 1,
    fontFamily: 'TitilliumWeb_600SemiBold',
    borderColor: '#CFD2D8'
  },
  sendData: {
    fontFamily: 'TitilliumWeb_400Regular',
    fontSize: 20,
  },
  splitContainer: {
    width: '100%',
    height: '50%',
    justifyContent: 'space-around',
    alignItems: 'center',
  },
  sendCurrencyBtn: {
    width: 300,
    fontFamily: 'TitilliumWeb_600SemiBold',
    fontSize: 19,
    height: 46,
    borderRadius: 25,
    marginBottom: 20
  },
});

</code>```

Can anyone help me either move the current balance section and the appropriate input up and out of the way or move the entire screen's content up and out of the way just up to where the focused input is just above the keyboard?

Body:
I have an app that I am working on and am having trouble with the android styling.  Everything looked fine on iOS but then when I used it on an android emulator the inputs were squished towards the top and all of the text was overlapping.  So I'm trying to figure out how to use the KeyboardAwareScrollView or the KeyboardAvoidingView to either move absolutely everything on the page up or at least move the content under the header up and under the header so that you can still see the input.  Here are some screen shots to show what is currently happening.

The screen when inputs are not focused on:

The Screen when an input is focused on:

Here is my screen's code.  You can see by the commented out sections that I also tried placing these keyboard aware views on almost the very outside of my screen in an attempt to move the entire screen's content.  Instead, it continued to behave in the same way.

  return (
    <SafeAreaView edges={['top']} style={{ flex: 1, backgroundColor: theme.colors.primary }}>
    <SafeAreaView edges={['left', 'right', 'bottom']} style={{ flex: 1, backgroundColor: theme.colors['Surface'] }}>
      <StatusBar barStyle="light-content" backgroundColor={theme.colors.primary} />
      {/* <KeyboardAvoidingView
          style={{ width: '100%', height: Dimensions.get('window').height, backgroundColor: theme.colors.Background, justifyContent: 'flex-end' }}
          behavior={Platform.OS === "ios" ? "padding" : "padding"}
          contentContainerStyle={{ width: '100%', height: '100%'}}
          enabled={true}
          keyboardVerticalOffset={-120}
        > */}
      {/* <KeyboardAwareScrollView
        extraHeight={0}
        enableOnAndroid={true}
        automaticallyAdjustContentInsets={true}
        scrollEnabled={false}
        contentContainerStyle={{ height: Dimensions.get('window').height }}
      > */}
      <ScreenContainer hasSafeArea={false} scrollable={false}>
          <View style={[styles.topBlueContainer, { backgroundColor: theme.colors.primary, position: 'absolute', zIndex: 99 }]}>
            {/* Logo */}
            <View style={styles.logoContainer}>
              <View style={styles.Viewfe3a5f26}>
                <Text
                  style={[styles.ConnectLogo, { color: theme.colors['Background'] }]}
                >
                  {'company'}
                </Text>

                <Text
                  style={[styles.WalletLogo, { color: theme.colors['Background'] }]}
                >
                  {'name'}
                </Text>

                <View style={styles.View63f8fbfb}>
                  <Icon
                    name={'AntDesign/trademark'}
                    size={8}
                    color={theme.colors['Background']}
                  />
                </View>
              </View>
            </View>

            {/* header row */}
            <View style={[styles.headerRow, {}]}>
              <Touchable
                onPress={() => {
                  navigation.navigate('PortfolioDetailsScreen');
                }}
                style={[styles.backArrowBtnContainer, {}]}
              >
                <Icon
                    name={'AntDesign/left'}
                    size={36}
                    color={theme.colors['Background']}
                />
              </Touchable>

              <View style={[styles.currencyTitleContainer, {}]}>
                <Text style={[styles.currencyTitleText, { color: theme.colors['Background'] }]}> SEND {selectedToken.symbol}</Text>
              </View>

              <View style={styles.backArrowBtnContainer} />
            </View>
          </View>

          {/* Page Content */}
          <KeyboardAwareScrollView
            extraScrollHeight={-220}
            style={[
                styles.contentContainer,
                {
                  height: '100%',
                  paddingTop: 120,
                }
            ]}
            contentContainerStyle={
              {
                alignItems: 'center',
                flex: 1
              }
            }
            resetScrollToCoords={{ x: 0, y: 0 }}
            enableOnAndroid={true}
            viewIsInsideTabBar={true}
          >

              {/* Total Amnt Container */}
              <View style={{ width: '100%', height: '25%', justifyContent: 'center', alignItems: 'center' }}>
                  <Text style={{ fontSize: 56, fontFamily: 'TitilliumWeb_600SemiBold', textAlign: 'center', marginBottom: -10 }}>{selectedToken.balance.toString().slice(0, 10)}</Text>
                  <Text style={{ fontSize: 16, fontFamily: 'TitilliumWeb_400Regular', textAlign: 'center', color: '#979797' }}>Current Balance</Text>
              </View>

              {/* Amnt To Send Container */}
              <View style={{ width: '100%', height: '25%' }}>
                  <View style={{ width: '100%', height: '50%', justifyContent: 'flex-end', alignItems: 'center' }}>
                  <TextInput
                    onChangeText={newTextInputValue => {
                      try {
                        if (newTextInputValue) {
                          if (newTextInputValue === '.') {
                            setAmountToSend('0.');
                          } else if (parseFloat(newTextInputValue) <= parseFloat(selectedToken.balance)) {
                            setAmountToSend(newTextInputValue);
                          } else {
                            Alert.alert('Not Enough Funds', reachedMaxButtons);
                          }
                        } else {
                          setAmountToSend(newTextInputValue);
                        }
                      } catch (err) {
                        console.error(err);
                      }
                    }}
                    style={[
                      styles.amountInput,
                      { borderColor: theme.colors.divider },
                    ]}
                    placeholder={'0.00'}
                    value={amountToSend}
                    editable={true}
                    placeholderTextColor={theme.colors['Medium']}
                    keyboardType={'decimal-pad'}
                  />
                  </View>
                  <View style={{ width: '100%', flexDirection: 'row', justifyContent: 'space-between', marginTop: 10 }}>
                      <View style={{ width: 100 }}/>
                      <View>
                        <Text style={{ fontSize: 16, fontFamily: 'TitilliumWeb_400Regular', textAlign: 'center', color: '#979797' }}>Amount</Text>
                      </View>
                      <Touchable
                        style={{
                          width: 100,
                          height: 30,
                          backgroundColor: theme.colors['Background'],
                          borderWidth: 1,
                          borderRadius: 23,
                          borderColor: '#347AF0',
                          alignItems: 'center',
                          justifyContent: 'center'
                        }}
                        onPress={() => {
                          setAmountToSend(selectedToken.balance.toString());
                        }}
                      >
                        <Text style={{ fontSize: 16, fontFamily: 'TitilliumWeb_600SemiBold', color: '#347AF0' }}>Max</Text>
                      </Touchable>
                  </View>
              </View>

              {/* Address Container */}
              <View style={{ width: '100%', height: '25%' }}>
                  <View style={{ width: '100%', height: '50%', justifyContent: 'flex-end', alignItems: 'flex-start', alignItems: 'center' }}>
                      <TextInput
                      style={styles.addressInput}
                      placeholder={'0x43452...'}
                      placeholderTextColor={theme.colors['Medium']}
                      editable={true}
                      value={addressToSendTo}
                      onChangeText={newAddressValue => {
                          try {
                          setAddressToSendTo(newAddressValue);
                          } catch (err) {
                          console.error(err);
                          }
                      }}
                      />
                  </View>
                  <View style={{ width: '100%', flexDirection: 'row', justifyContent: 'space-between', alignItems: 'flex-start', marginTop: 10 }}>
                      <View style={{ width: 100 }}/>
                      <View>
                        <Text style={{ fontSize: 16, fontFamily: 'TitilliumWeb_400Regular', textAlign: 'center', color: '#979797' }}>Recipient</Text>
                      </View>
                      <Touchable
                        style={{
                          width: 100,
                          height: 30,
                          backgroundColor: theme.colors['Background'],
                          borderWidth: 1,
                          borderRadius: 23,
                          borderColor: '#347AF0',
                          alignItems: 'center',
                          justifyContent: 'center'
                        }}

                        onPress={() => {
                          navigation.navigate('CodeScannerScreen', { 'screen': 'SendTokenUpdatedScreen' });
                        }}
                      >
                        <Text style={{ fontSize: 16, fontFamily: 'TitilliumWeb_600SemiBold', color: '#347AF0' }}>Scan QR</Text>
                      </Touchable>
                  </View>
              </View>

            {/* Next Btn Container */}
            <View style={{ width: '100%', height: '25%', alignItems: 'center', justifyContent: 'flex-start' }}>
                <Button
                  title={'Next'}
                  style={{
                    width: '100%',
                    maxWidth: 300,
                    height: 46,
                    fontFamily: 'TitilliumWeb_600SemiBold',
                    fontSize: 19,
                    color: theme.colors['Background'],
                    borderRadius: 23,
                  }}
                  onPress={() => {
                    console.log('amount', amountToSend)
                    console.log('amount there: ', amountToSend === '')
                    navigation.navigate('ConfirmSendTokenScreen', {
                      'amountToSend': amountToSend,
                      'addressToSendTo': addressToSendTo,
                      'selectedToken': selectedToken,
                    });
                  }}
                  disabled={addressToSendTo === '' || amountToSend === ''}
                />
            </View>
          </KeyboardAwareScrollView>
      </ScreenContainer>
      {/* </KeyboardAvoidingView> */}
      {/* </KeyboardAwareScrollView> */}
    </SafeAreaView>
    </SafeAreaView>
  );
};

const styles = StyleSheet.create({
  logoContainer: {
    paddingLeft: 15,
  },
  Viewfe3a5f26: {
    alignItems: 'flex-start',
    flexDirection: 'row',
  },
  WalletLogo: {
    alignSelf: 'flex-start',
    fontSize: 28,
    fontFamily: 'ProximaNova-Bold'
  },
  ConnectLogo: {
    alignSelf: 'flex-end',
    fontSize: 28,
    paddingRight: 5,
    fontFamily: 'ProximaNova-Regular'
  },
  View63f8fbfb: {
    paddingTop: 5,
  },
  topBlueContainer: {
    height: 120,
    width: '100%'
  },
  headerRow: {
    width: '100%',
    flexDirection: 'row',
    marginTop: 20,
  },
  backArrowBtnContainer: {
    paddingLeft: 12,
    justifyContent: 'center',
    width: '15%',
  },
  currencyTitleContainer: {
    width: 200,
    alignItems: 'center',
    width: '70%'
  },
  currencyTitleText: {
    fontFamily: 'TitilliumWeb_700Bold',
    fontSize: 36
  },
  contentContainer: {
    width: '100%',
    paddingLeft: 20,
    paddingRight: 20,
  },
  amountInput: {
    fontSize: 56,
    width: '100%',
    height: 56,
    textAlign: 'center',
    borderBottomWidth: 1,
    fontFamily: 'TitilliumWeb_600SemiBold',
  },
  amountLabel: {
    fontFamily: 'TitilliumWeb_400Regular',
    color: '#979797',
    fontSize: 16,
  },
  scanQRBtn: {
    width: 100,
    height: 30,
    borderRadius: 23,
    borderWidth: 1,
  },
  addressInput: {
    fontSize: 56,
    width: '100%',
    height: 56,
    marginTop: 10,
    textAlign: 'center',
    borderBottomWidth: 1,
    fontFamily: 'TitilliumWeb_600SemiBold',
    borderColor: '#CFD2D8'
  },
  sendData: {
    fontFamily: 'TitilliumWeb_400Regular',
    fontSize: 20,
  },
  splitContainer: {
    width: '100%',
    height: '50%',
    justifyContent: 'space-around',
    alignItems: 'center',
  },
  sendCurrencyBtn: {
    width: 300,
    fontFamily: 'TitilliumWeb_600SemiBold',
    fontSize: 19,
    height: 46,
    borderRadius: 25,
    marginBottom: 20
  },
});

Can anyone help me either move the current balance section and the appropriate input up and out of the way or move the entire screen's content up and out of the way just up to where the focused input is just above the keyboard?


问:
Retrieve each member's personal and owned shared folders
I'm trying to iterate through each member in our Dropbox and return their owned folders not shared with anyone and their owned shared folders. The owned shared folder seems pretty straight forward: Use the /2/sharing/list_folders (/continue if needed), which gives all the shared folders the member is part of, and then select only the folders that have an access type of owner. Correct me if this isn't the approach to get all of the user's owned shared folders.

Getting all of the user's owned personal folders seems a bit trickier. My initial thought is to use the /2/files/list_folder and /2/files/list_folder/continue endpoints to retrieve all of the user's folders they have access to (i.e. personal owned folders, owned shared folders, and shared folders with user (but not owner)). My function for getting all these folders is as follows:

```<code>public static async Task<List<FolderMetadata>> IterateListFolderResults(DropboxClient userClient){
Boolean hasMore = true;
string hasMoreCursor = "";
var userFolders = new List<FolderMetadata>();
ListFolderResult firstLayer = await userClient.Files.ListFolderAsync("", true, false, false, false, true, null, null, null, true);
var firstLayerFolders = firstLayer.Entries.Where(entry => entry.IsFolder).Select(f => f.AsFolder).ToList();
userFolders.AddRange(firstLayerFolders);

if (firstLayer.HasMore == true)
{
hasMore = true;
hasMoreCursor = firstLayer.Cursor;

do
{
try
{
var nextLayer = await userClient.Files.ListFolderContinueAsync(hasMoreCursor);
var lfolders = nextLayer.Entries.Where((entry) => entry.IsFolder).Select(f => f.AsFolder).ToList();

userFolders.AddRange(lfolders);

if (nextLayer.HasMore == true)
{
hasMoreCursor = nextLayer.Cursor;
}
if (nextLayer.HasMore == false)
{
hasMore = false;
}
}
catch (HttpException err)
{
Console.WriteLine(err);
}
}
while (hasMore == true);
}

return userFolders;
}
</code>```

Once I have these results the next step is to only keep the folders that the member personally owns and isn't shared. To do this I'm thinking I can compare the master list of all the folders the member participates in against the list of all the shared folders the member participates in. Something like the following:

```<code>var nonSharedFolders = memberFolders.Where(mFolder => !sharedFolders.Entries.Any(sharedFolder => sharedFolder.PathLower == mFolder.PathLower));

</code>```

If I understand correctly, this would return me all the folders the user owns that they haven't shared with anyone?

Body:
I'm trying to iterate through each member in our Dropbox and return their owned folders not shared with anyone and their owned shared folders. The owned shared folder seems pretty straight forward: Use the /2/sharing/list_folders (/continue if needed), which gives all the shared folders the member is part of, and then select only the folders that have an access type of owner. Correct me if this isn't the approach to get all of the user's owned shared folders.

Getting all of the user's owned personal folders seems a bit trickier. My initial thought is to use the /2/files/list_folder and /2/files/list_folder/continue endpoints to retrieve all of the user's folders they have access to (i.e. personal owned folders, owned shared folders, and shared folders with user (but not owner)). My function for getting all these folders is as follows:

public static async Task<List<FolderMetadata>> IterateListFolderResults(DropboxClient userClient){
Boolean hasMore = true;
string hasMoreCursor = "";
var userFolders = new List<FolderMetadata>();
ListFolderResult firstLayer = await userClient.Files.ListFolderAsync("", true, false, false, false, true, null, null, null, true);
var firstLayerFolders = firstLayer.Entries.Where(entry => entry.IsFolder).Select(f => f.AsFolder).ToList();
userFolders.AddRange(firstLayerFolders);

if (firstLayer.HasMore == true)
{
hasMore = true;
hasMoreCursor = firstLayer.Cursor;

do
{
try
{
var nextLayer = await userClient.Files.ListFolderContinueAsync(hasMoreCursor);
var lfolders = nextLayer.Entries.Where((entry) => entry.IsFolder).Select(f => f.AsFolder).ToList();

userFolders.AddRange(lfolders);

if (nextLayer.HasMore == true)
{
hasMoreCursor = nextLayer.Cursor;
}
if (nextLayer.HasMore == false)
{
hasMore = false;
}
}
catch (HttpException err)
{
Console.WriteLine(err);
}
}
while (hasMore == true);
}

return userFolders;
}

Once I have these results the next step is to only keep the folders that the member personally owns and isn't shared. To do this I'm thinking I can compare the master list of all the folders the member participates in against the list of all the shared folders the member participates in. Something like the following:

var nonSharedFolders = memberFolders.Where(mFolder => !sharedFolders.Entries.Any(sharedFolder => sharedFolder.PathLower == mFolder.PathLower));

If I understand correctly, this would return me all the folders the user owns that they haven't shared with anyone?


问:
Date axis label visibility problem in trading view lightwight
I want to create HLOC chart with trading view lightweight. Everything is OK and I can pass data with ajax to chart.
this is my html with java scripts:

index.html

```<code><body style="margin: 0; padding: 0; background-color: #222">
    <div id="tw-container-1" style="position: absolute; width: 100%; height: 100%">

    </div>
</body>
</code>```

my_scripts.js

```<code><script type="text/javascript">
    const container = document.getElementById('tw-container-1');
    const chart_height = window.innerHeight - 50;
    const chart_width = window.innerWidth - 50;

    function generateCandlestickData() {
        return [
            {
                time: "2018-10-19",
                open: 180.34,
                high: 180.99,
                low: 178.57,
                close: 179.85,
            },
            {
                time: "2018-10-22",
                open: 180.82,
                high: 181.4,
                low: 177.56,
                close: 178.75,
            },
            {
                time: "2018-10-23",
                open: 175.77,
                high: 179.49,
                low: 175.44,
                close: 178.53,
            },
            {
                time: "2018-10-24",
                open: 178.58,
                high: 182.37,
                low: 176.31,
                close: 176.97,
            },
            {
                time: "2018-10-25",
                open: 177.52,
                high: 180.5,
                low: 176.83,
                close: 179.07,
            },
            {
                time: "2018-10-26",
                open: 176.88,
                high: 177.34,
                low: 170.91,
                close: 172.23,
            },
            {
                time: "2018-10-29",
                open: 173.74,
                high: 175.99,
                low: 170.95,
                close: 173.2,
            },
            {
                time: "2018-10-30",
                open: 173.16,
                high: 176.43,
                low: 172.64,
                close: 176.24,
            },
            {
                time: "2018-10-31",
                open: 177.98,
                high: 178.85,
                low: 175.59,
                close: 175.88,
            },
            {
                time: "2018-11-01",
                open: 176.84,
                high: 180.86,
                low: 175.9,
                close: 180.46,
            },
            {
                time: "2018-11-02",
                open: 182.47,
                high: 183.01,
                low: 177.39,
                close: 179.93,
            },
            {
                time: "2018-11-05",
                open: 181.02,
                high: 182.41,
                low: 179.3,
                close: 182.19,
            },
            {
                time: "2018-11-06",
                open: 181.93,
                high: 182.65,
                low: 180.05,
                close: 182.01,
            },
            {
                time: "2018-11-07",
                open: 183.79,
                high: 187.68,
                low: 182.06,
                close: 187.23,
            },
            {
                time: "2018-11-08",
                open: 187.13,
                high: 188.69,
                low: 185.72,
                close: 188.0,
            },
            {
                time: "2018-11-09",
                open: 188.32,
                high: 188.48,
                low: 184.96,
                close: 185.99,
            },
            {
                time: "2018-11-12",
                open: 185.23,
                high: 186.95,
                low: 179.02,
                close: 179.43,
            },
            {
                time: "2018-11-13",
                open: 177.3,
                high: 181.62,
                low: 172.85,
                close: 179.0,
            },
            {
                time: "2018-11-14",
                open: 182.61,
                high: 182.9,
                low: 179.15,
                close: 179.9,
            },
            {
                time: "2018-11-15",
                open: 179.01,
                high: 179.67,
                low: 173.61,
                close: 177.36,
            },
            {
                time: "2018-11-16",
                open: 173.99,
                high: 177.6,
                low: 173.51,
                close: 177.02,
            },
            {
                time: "2018-11-19",
                open: 176.71,
                high: 178.88,
                low: 172.3,
                close: 173.59,
            },
            {
                time: "2018-11-20",
                open: 169.25,
                high: 172.0,
                low: 167.0,
                close: 169.05,
            },
            {
                time: "2018-11-21",
                open: 170.0,
                high: 170.93,
                low: 169.15,
                close: 169.3,
            },
            {
                time: "2018-11-23",
                open: 169.39,
                high: 170.33,
                low: 168.47,
                close: 168.85,
            },
            {
                time: "2018-11-26",
                open: 170.2,
                high: 172.39,
                low: 168.87,
                close: 169.82,
            },
            {
                time: "2018-11-27",
                open: 169.11,
                high: 173.38,
                low: 168.82,
                close: 173.22,
            },
            {
                time: "2018-11-28",
                open: 172.91,
                high: 177.65,
                low: 170.62,
                close: 177.43,
            },
            {
                time: "2018-11-29",
                open: 176.8,
                high: 177.27,
                low: 174.92,
                close: 175.66,
            },
            {
                time: "2018-11-30",
                open: 175.75,
                high: 180.37,
                low: 175.11,
                close: 180.32,
            },
            {
                time: "2018-12-03",
                open: 183.29,
                high: 183.5,
                low: 179.35,
                close: 181.74,
            },
            {
                time: "2018-12-04",
                open: 181.06,
                high: 182.23,
                low: 174.55,
                close: 175.3,
            },
            {
                time: "2018-12-06",
                open: 173.5,
                high: 176.04,
                low: 170.46,
                close: 175.96,
            },
            {
                time: "2018-12-07",
                open: 175.35,
                high: 178.36,
                low: 172.24,
                close: 172.79,
            },
            {
                time: "2018-12-10",
                open: 173.39,
                high: 173.99,
                low: 167.73,
                close: 171.69,
            },
            {
                time: "2018-12-11",
                open: 174.3,
                high: 175.6,
                low: 171.24,
                close: 172.21,
            },
            {
                time: "2018-12-12",
                open: 173.75,
                high: 176.87,
                low: 172.81,
                close: 174.21,
            },
            {
                time: "2018-12-13",
                open: 174.31,
                high: 174.91,
                low: 172.07,
                close: 173.87,
            },
            {
                time: "2018-12-14",
                open: 172.98,
                high: 175.14,
                low: 171.95,
                close: 172.29,
            },
            {
                time: "2018-12-17",
                open: 171.51,
                high: 171.99,
                low: 166.93,
                close: 167.97,
            },
            {
                time: "2018-12-18",
                open: 168.9,
                high: 171.95,
                low: 168.5,
                close: 170.04,
            },
            {
                time: "2018-12-19",
                open: 170.92,
                high: 174.95,
                low: 166.77,
                close: 167.56,
            },
            {
                time: "2018-12-20",
                open: 166.28,
                high: 167.31,
                low: 162.23,
                close: 164.16,
            },
            {
                time: "2018-12-21",
                open: 162.81,
                high: 167.96,
                low: 160.17,
                close: 160.48,
            },
            {
                time: "2018-12-24",
                open: 160.16,
                high: 161.4,
                low: 158.09,
                close: 158.14,
            },
            {
                time: "2018-12-26",
                open: 159.46,
                high: 168.28,
                low: 159.44,
                close: 168.28,
            },
            {
                time: "2018-12-27",
                open: 166.44,
                high: 170.46,
                low: 163.36,
                close: 170.32,
            },
            {
                time: "2018-12-28",
                open: 171.22,
                high: 173.12,
                low: 168.6,
                close: 170.22,
            },
            {
                time: "2018-12-31",
                open: 171.47,
                high: 173.24,
                low: 170.65,
                close: 171.82,
            },
            {
                time: "2019-01-02",
                open: 169.71,
                high: 173.18,
                low: 169.05,
                close: 172.41,
            },
            {
                time: "2019-01-03",
                open: 171.84,
                high: 171.84,
                low: 168.21,
                close: 168.61,
            },
            {
                time: "2019-01-04",
                open: 170.18,
                high: 174.74,
                low: 169.52,
                close: 173.62,
            },
            {
                time: "2019-01-07",
                open: 173.83,
                high: 178.18,
                low: 173.83,
                close: 177.04,
            },
            {
                time: "2019-01-08",
                open: 178.57,
                high: 179.59,
                low: 175.61,
                close: 177.89,
            },
            {
                time: "2019-01-09",
                open: 177.87,
                high: 181.27,
                low: 177.1,
                close: 179.73,
            },
            {
                time: "2019-01-10",
                open: 178.03,
                high: 179.24,
                low: 176.34,
                close: 179.06,
            },
            {
                time: "2019-01-11",
                open: 177.93,
                high: 180.26,
                low: 177.12,
                close: 179.41,
            },
            {
                time: "2019-01-14",
                open: 177.59,
                high: 179.23,
                low: 176.9,
                close: 178.81,
            },
            {
                time: "2019-01-15",
                open: 176.08,
                high: 177.82,
                low: 175.2,
                close: 176.47,
            },
            {
                time: "2019-01-16",
                open: 177.09,
                high: 177.93,
                low: 175.86,
                close: 177.04,
            },
            {
                time: "2019-01-17",
                open: 174.01,
                high: 175.46,
                low: 172.0,
                close: 174.87,
            },
        ]
    }

    // Create the Lightweight Chart within the container element
    const chart = LightweightCharts.createChart(
        container,
        {
            width: chart_width,
            height: chart_height,
            layout: {
                background: { color: "#222" },
                textColor: "#C3BCDB",
            },
            grid: {
                vertLines: { color: "#444" },
                horzLines: { color: "#444" },
            },
        }
    );

    // Setting the border color for the vertical axis
    chart.priceScale().applyOptions({
        borderColor: "#71649C",
    });

    // Setting the border color for the horizontal axis
    chart.timeScale().applyOptions({
        borderColor: "#71649C",
    });

    // Adjust the starting bar width (essentially the horizontal zoom)
    chart.timeScale().applyOptions({
        barSpacing: 10,
    });

    // Customizing the Crosshair
    chart.applyOptions({
        crosshair: {
            // Change mode from default 'magnet' to 'normal'.
            // Allows the crosshair to move freely without snapping to datapoints
            mode: LightweightCharts.CrosshairMode.Normal,

            // Vertical crosshair line (showing Date in Label)
            vertLine: {
                width: 100,
                color: "#C3BCDB44",
                style: LightweightCharts.LineStyle.Solid,
                labelBackgroundColor: "#9B7DFF",
            },

            // Horizontal crosshair line (showing Price in Label)
            horzLine: {
                color: "#9B7DFF",
                labelBackgroundColor: "#9B7DFF",
            },
        },
    });

    // Adding a window resize event handler to resize the chart when
    // the window size changes.
    // Note: for more advanced examples (when the chart doesn't fill the entire window)
    // you may need to use ResizeObserver -> https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver
    window.addEventListener("resize", () => {
        chart.resize(chart_width, chart_height);
    });

    const trade_hloc_chart = chart.addCandlestickSeries();
    trade_hloc_chart.setData(generateCandlestickData());

    // Changing the Candlestick colors
    trade_hloc_chart.applyOptions({
        wickUpColor: "rgb(54, 116, 217)",
        upColor: "rgb(54, 116, 217)",
        wickDownColor: "rgb(225, 50, 85)",
        downColor: "rgb(225, 50, 85)",
        borderVisible: false,
    });

    // Adjust the options for the priceScale of the mainSeries
    trade_hloc_chart.priceScale().applyOptions({
        autoScale: false, // disables auto scaling based on visible content
        scaleMargins: {
            top: 0.1,
            bottom: 0.2,
        },
    });

    window.addEventListener('resize', () => {
        chart.resize(chart_width, chart_height);
    });

    chart.timeScale().fitContent();
</script>
</code>```

The problem is in the label of date axis: the label doesn't visible (I think the problem has been created because of z-index).
Here is screenshot of index page:

As you can see half of the date label is shown.
The version of trading view is  TradingView-lightweight-3.8.0.

How can fix that? Thanks for your helps.

Body:
I want to create HLOC chart with trading view lightweight. Everything is OK and I can pass data with ajax to chart.
this is my html with java scripts:

index.html

my_scripts.js

The problem is in the label of date axis: the label doesn't visible (I think the problem has been created because of z-index).
Here is screenshot of index page:

As you can see half of the date label is shown.
The version of trading view is  TradingView-lightweight-3.8.0.

How can fix that? Thanks for your helps.