Floating Window in React Native?

Modellbahni  19.02.2023, 11:25

In welcher Programmiersprache?

MorrisBr2 
Fragesteller
 19.02.2023, 11:26

javascript

z.b

export default function App() {

  return (

    <ScrollView>

    <ListItem title="List Item" />

    </ScrollView>

2 Antworten

Solche "Floating Widgets" gibt es nur auf Android, nicht auf iOS. Entsprechend geht das nicht direkt mit React Native.

Du musst da also spezifisch was für die Android-Plattform machen. Vielleicht hilft dir diese Antwort weiter: https://stackoverflow.com/questions/52542175/how-to-draw-over-other-apps-in-react-native

Woher ich das weiß:Berufserfahrung – Informatiker Applikationsentwicklung

HTML:

<div id= "console" class="window card z-depth-3" >
  <span class="windowTitle"
        >Window 1</span> <i class="material-icons" id="refreshbtn">refresh</i>
  <br><br>
 I am a draggable window
  <a id="dragbtn" class="btn tooltipped red" onclick=drag()>Drag</a>
</div>

CSS:

#console{
  width: 150px;
  height: 150px;
  padding: 10px;
}
body {
 background-color: #212121;
}
span.windowTitle {
 /*font-family: "Segoe UI";*/
 font-size: 50;
 width: 100px;
 height: 100px;
 position: relative;
 font-family: "Roboto";
 font-weight: bold
}
#refreshbtn{
 position: absolute;
 position-right: 200px
}

JavaScript:

document.ready(function(){
  $(function() {
    $( "#console" ).draggable();
  })
});
function drag(){
  $(function() { $( "#console" ).draggable() } )
  $(function() { $( "#dragbtn" ).remove() } )
}
MorrisBr2 
Fragesteller
 19.02.2023, 11:38

Verstehst es glaube nicht ganz, es ist nicht nur html und css, es ist eine android app, die mit SO eine art js, css gemacht sind, aber nicht zu 100%
Ist auch keine Webview
Es ist halt React Native, kanst ja informieren

0