This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
class MainPage extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
appBar: AppBar( | |
title: Text('사진 공유 앱'), | |
), | |
body: Center( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | |
<response> | |
<header> | |
<resultCode>0000</resultCode> | |
<resultMsg>OK</resultMsg> | |
</header> | |
<body> | |
<items> | |
<item> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
final navigatorKey = GlobalKey<NavigatorState>(); // 여기 | |
return MaterialApp( | |
navigatorKey: navigatorKey, // 여기 | |
title: 'Flutter Demo', | |
theme: ThemeData( | |
primarySwatch: Colors.blue, | |
), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class $class$(private val clickListener: (item: $model$) -> Unit) : | |
RecyclerView.Adapter<$class$.$holder$>() { | |
var items = arrayListOf<$model$>() | |
class $holder$(val binding: $binding$) : RecyclerView.ViewHolder(binding.root) | |
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): $holder$ { | |
val view = LayoutInflater.from(parent.context) | |
.inflate(R.layout.$layout$, parent, false) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static class $class$ extends BaseAdapter { | |
private List<$model$> mItems = new ArrayList<>(); | |
public void setItems(List<$model$> items) { | |
mItems = items; | |
notifyDataSetChanged(); | |
} | |
@Override | |
public int getCount() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface $class$ { | |
void $callback$($model$ item); | |
} | |
private $class$ mListener; | |
public void set$class$($class$ listener) { | |
mListener = listener; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static class $class$ extends RecyclerView.Adapter<$class$.$holder$> { | |
interface $interface$ { | |
void $method$($Model$ model); | |
} | |
private $interface$ mListener; | |
private List<$Model$> mItems = new ArrayList<>(); | |
public $class$() {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.ArrayList; | |
import java.util.List; | |
public class Main implements MainFragment.OnClickListener { | |
private List<Integer> mItems = new ArrayList<>(); | |
public Main() { | |
mItems.add(10); | |
mItems.add(20); | |
mItems.add(30); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Android | |
mWebView.getSettings().setJavaScriptEnabled(true); | |
mWebView.addJavascriptInterface(new JsInterface(), "androidJs"); | |
public class JsInterface { | |
@JavascriptInterface | |
public void callback(String message) { | |
// 자바스크립트에서 호출 됨 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"name" : "수원스마트앱개발학원","lat" : 37.274105,"lng" : 127.02262100000007,"address" : "대한민국 경기도 수원시 팔달구 세지로267번길 19-20"} |