Skip to content
This repository was archived by the owner on Feb 20, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/shellpanel-legacy-compat-mock.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
from http.server import BaseHTTPRequestHandler, HTTPServer
from pathlib import Path

class Handler(BaseHTTPRequestHandler):
def log_message(self, *args):
pass

def do_GET(self):
if self.path.startswith('/api/dl/'):
body = Path('.github/shellpanel-legacy-compat-tool.sh').read_bytes()
self.send_response(200)
self.send_header('Content-Length', str(len(body)))
self.end_headers()
self.wfile.write(body)
return
self.send_error(404)

def do_POST(self):
length = int(self.headers.get('Content-Length', '0'))
body = self.rfile.read(length)
with open('/tmp/shellpanel_legacy_compat_requests.log', 'ab') as output:
output.write(self.path.encode() + b' ' + body + b'\n')
self.send_response(200)
self.end_headers()
self.wfile.write(b'ok')

HTTPServer(('127.0.0.1', 18080), Handler).serve_forever()
4 changes: 4 additions & 0 deletions .github/shellpanel-legacy-compat-tool.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env bash
set -euo pipefail
printf '%s\n' 'shellpanel-legacy-compat-smoke-v2-tool-started'
printf '%s\n' 'shellpanel-legacy-compat-smoke-v2-result' > /tmp/shellpanel_legacy_compat_result.txt
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,31 @@ public class SlidingLayerExampleActivity extends Activity {
}
}
```

Kotlin
------
```kotlin
class SlidingLayerExampleActivity:Activity() {

fun onCreate(savedInstanceState:Bundle) {
super.onCreate(savedInstanceState)
setContentView(R.layout.main_view)

val slidingLayer = findViewById(R.id.slidingLayer1) as SlidingLayer

slidingLayer.setShadowDrawable(R.drawable.sidebar_shadow)
slidingLayer.setShadowSizeRes(R.dimen.shadow_size)
slidingLayer.setOffsetDistanceRes(R.dimen.offset_distance)
slidingLayer.setPreviewOffsetDistanceRes(R.dimen.preview_offset_distance)
slidingLayer.setStickTo(SlidingLayer.STICK_TO_LEFT)
slidingLayer.setChangeStateOnTap(false)

slidingLayer.addView(Button(this))
...
}
}
```

Code of Conduct
-------------------

Expand Down