SlideShare uma empresa Scribd logo
1 de 54
Baixar para ler offline
1 3 51A8C5 31 ( -
f l z g
) (. . )0
) (. . )0
p y
”
w os rtp) (. . )0 fl
n ofi WBE 4 R_]WR y
m flfi WBE 4 R_]WR
z fl yfl y n
fi fi fi n
4 R_]WR p OcO Vaa 1 UWaVbP ][ YW_]_b E66) (.NO R_]WRNXOcO
4 R_]WR p>]a W Vaa 1 UWaVbP ][ YW_]_b E66) (.NO R_]WRNY]a W
WBE pBPXS aWcS 6 Vaa 1 UWaVbP ][ YW_]_b E66) (.NW] N]PX
WBE pEdWTa Vaa 1 UWaVbP ][ YW_]_b E66) (.NW] N dWTa
E4CCBDB 6D84F H8 64@C ) (. (
) (. . )0
z c
flu zn
o fi n fl z np
4 R_]WR fi fi nWBE fi n
yuiv
fi y fi y n
1SIVT I0 4 R_]WR EabRW] HS_ W] 1 ) p>]a W
0lJ ]RS / p6] ]OC]R
E4CCBDB 6D84F H8 64@C ) (. )
) (. . )0
1SIVT I d9 e
JU z
zn fi n
(" 4 R_]WR EabRW] n
)" IS ][S a] 4 R_]WR EabRW] fi hEaO_a O Sd 4 R_]WR EabRW]
C_]XS ak n
" ASd C_]XS a fi 4 W OaW] O[S 6][ O f R][OW C_]XS a
] OaW] n L ASea M
" FO_USa 4 R_]WR 7ScW S fi fi n L ASea M
," 4RR O 4 aWcWaf a] @]PW S fi 8[ af 4 aWcWaf n L ASea M
-" 6b a][WgS aVS 4 aWcWaf fi fi n L 9W W V M
E4CCBDB 6D84F H8 64@C ) (.
) (. . )0
JU ( z
( H ER S R z
o n pO aWcWafN[OW e[
o z n
o o n
W C J
W aHWSd n W aHWSd fi v
“ yn
z fi n
7 W aHWSd
E4CCBDB 6D84F H8 64@C ) (.
) (. . )0
( ( HJ ER S R z x
n o S N[OW e[
z o z n
fi n
o o n
SJ V T MTV TS
R LJC J
Of]baNdWRaV / R
]_WS aOaW] V]_Wg] aO
7 W[OUSHWSd
Of]baNdWRaV / R
Of]baNVSWUVa / R
E4CCBDB 6D84F H8 64@C ) (. ,
) (. . )0
SJ V T JV H
J C J
J C J (
Of]baNdSWUVa
]_WS aOaW] cS_aW O
7 aSeaHWSd(
aSeaEWgS )
aSea6] ]_ P O Y
7 aSeaHWSd)
aSeaEWgS )
aSea6] ]_ RO_YS_NU_Of
E4CCBDB 6D84F H8 64@C ) (. -
) (. . )0
JU) z
) c z
o aS[ @OW 4 aWcWaf o fl n
) ( c z
o n
class Item {
String BASE_URL = "https://kiroru-inc.jp/share/scc2017/";
String imageUrl;
String jname;
String ename;
public Item(String imageUrl, String jname, String ename) {
this.imageUrl = BASE_URL + imageUrl;
this.jname = jname;
this.ename = ename;
}
}
private List<Item> items = new ArrayList<>();
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
items.add(new Item("Japan.png", "日本", "Japan"));
items.add(new Item("China.png", "中国", "China"));
items.add(new Item("USA.png", "アメリカ", "America"));
items.add(new Item("England.png", "イギリス", "England"));
items.add(new Item("France.png", "フランス", "France"));
:
}
E4CCBDB 6D84F H8 64@C ) (. .
) (. . )0
) ) c z
o @f4RO aS_ @OW 4 aWcWaf o fl n
) C J 7T IJV z
@f4RO aS_ o fl HWSd ] RS_ nHWSd ] RS_ o
4 R_]WR fi nHWSd ] RS_ o
n
class MyAdapter extends BaseAdapter {
@Override
public int getCount() {
return items.size();
}
@Override
public Object getItem(int position) {
return items.get(position);
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
return null;
}
}
class ViewHolder {
ImageView iv;
TextView tv1;
TextView tv2;
}
E4CCBDB 6D84F H8 64@C ) (. /
) (. . )0
) T 8S_ JV z
Of]ba jOaS_ n HWSd ] RS_
n
) z
o USaHWSd np n
private ViewHolder holder;
private LayoutInflater inflater;
public MyAdapter(Context context) {
super();
inflater = ((Activity)context).getLayoutInflater();
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
if (convertView == null) {
convertView = inflater.inflate(R.layout.cell_main, null);
holder = new ViewHolder();
holder.iv = (ImageView)convertView.findViewById(R.id.imageView);
holder.tv1 = (TextView)convertView.findViewById(R.id.textView1);
holder.tv2 = (TextView)convertView.findViewById(R.id.textView2);
convertView.setTag(holder);
} else {
holder = (ViewHolder)convertView.getTag();
}
Item item = items.get(position);
holder.tv1.setText(item.jname);
holder.tv2.setText(item.ename);
return convertView;

}
E4CCBDB 6D84F H8 64@C ) (. 0
) (. . )0
) - 6 IJ z
z p: WRS Vaa 1 UWaVbP ][ Pb[ aS V U WRS
nPbW R U_OR S @]Rb S1 O " m Ef
A]d n
) . z
: WRS m o fi o m [OUSHWSd
n
) / x cz
m fl o n
repositories {
mavenCentral() // jcenter() works as well because it pulls from Maven
Central
}
dependencies {
compile 'com.github.bumptech.glide:glide:4.0.0-RC1'
compile 'com.android.support:support-v4:25.3.1'
annotationProcessor 'com.github.bumptech.glide:compiler:4.0.0-RC1'
}
Item item = items.get(position);
Glide.with(MainActivity.this).load(item.imageUrl).into(holder.iv);
holder.tv1.setText(item.jname);
holder.tv2.setText(item.ename);
@Override
protected void onCreate(Bundle savedInstanceState) {
:
ListView lv = (ListView)findViewById(R.id.listView);
lv.setAdapter(new MyAdapter(this));
}
E4CCBDB 6D84F H8 64@C ) (. (
) (. . )0
JU 1SIVT I S KJW R z
AF8DA8F o zn
JU a
xm fifi fi n z fi n
<?xml version="1.0" encoding="utf-8"?>
:
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:allowBackup="true"
:
E4CCBDB 6D84F H8 64@C ) (. ((
) (. . )0
d GOJH J 3 e
JU z
zn fi n
(" J ]RS n
)" IS ][S a] J ]RS fi h6_SOaS O Sd J ]RSk n
" 6V]] S O aS[ OaS T]_ f]b_ Sd _]XS a1 fi EW U S HWSd
4 W OaW] n L ASea M
" 6V]] S ] aW] T]_ f]b_ Sd _]XS a1 fi C_]Rb a AO[S m
O UbOUS BPXS aWcS 6 n L ASea M
," fi n L 6_SOaS M
E4CCBDB 6D84F H8 64@C ) (. ()
) (. . )0
JU ( c c cflz
( C J 3TS VT JV z
o o o p@OW a]_fP]O_R fi HWSd6] a_] S_ n z
o p z nHWSd6] a_] S_
z n
E4CCBDB 6D84F H8 64@C ) (. (
) (. . )0
B8A G JC J
z n
B8A G JC J 3J
D]d SWUVa /
RS aWiS_ @f6S
E4CCBDB 6D84F H8 64@C ) (. (
) (. . )0
B88R LJC J
z n
J
K
IWRaV /
FOU (
6] aS a @]RS 4 S a 9Wa
E4CCBDB 6D84F H8 64@C ) (. (,
) (. . )0
B8 GJ
z n
d GJ GJ (e
J /
K
SWUVa
FOU )
9] a Ef aS[ )
6] ]_ 5 O Y WUVa :_Of 6] ]_
E4CCBDB 6D84F H8 64@C ) (. (-
) (. . )0
JU) z
) c z
o aS[ n aS[ HWSd6] a_] S_ [
n
@interface Item : NSObject
@property (nonatomic, strong) NSString* imageUrl;
@property (nonatomic, strong) NSString* jname;
@property (nonatomic, strong) NSString* ename;
- (instancetype)initWithImageUrl:(NSString*)imageUrl
jname:(NSString*)jname
ename:(NSString*)ename;
@end
@implementation Item
static NSString* BASE_URL = @"https://kiroru-inc.jp/share/scc2017/";
- (instancetype)initWithImageUrl:(NSString *)imageUrl
jname:(NSString *)jname
ename:(NSString *)ename
{
self = [super init];
if (self) {
self.imageUrl =
[NSString stringWithFormat:@"%@%@", BASE_URL, imageUrl];
self.jname = jname;
self.ename = ename;
}
return self;
}
@end
E4CCBDB 6D84F H8 64@C ) (. (.
) (. . )0
) ( c z
o n
E4CCBDB 6D84F H8 64@C ) (. (/
@interface ViewController ()
@property (nonatomic, strong) NSMutableArray* items;
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
_items = [@[] mutableCopy];
[_items addObject:[[Item alloc] initWithImageUrl:@"Japan.png"
jname:@"日本"
ename:@"Japan"]];
[_items addObject:[[Item alloc] initWithImageUrl:@"China.png"
jname:@"中国"
ename:@"China"]];
[_items addObject:[[Item alloc] initWithImageUrl:@"USA.png"
jname:@"アメリカ"
ename:@"America"]];
[_items addObject:[[Item alloc] initWithImageUrl:@"England.png"
jname:@"イギリス"
ename:@"England"]];
[_items addObject:[[Item alloc] initWithImageUrl:@"France.png"
jname:@"フランス"
ename:@"France"]];
}
) (. . )0
) ) z
G FOP SHWSd G FOP SHWSd7OaOE]b_ S G FOP SHWSd7S SUOaS
n
@interface ViewController () <UITableViewDataSource, UITableViewDelegate>
  :
@property (nonatomic, weak) IBOutlet UITableView* tableView;
@end
  :
- (void)viewDidLoad {
[super viewDidLoad];
  :
_tableView.dataSource = self;
_tableView.delegate = self;
}
  :
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
return 1;
}
- (NSInteger) tableView:(UITableView *)tableView
numberOfRowsInSection:(NSInteger)section
{
return _items.count;
}
- (UITableViewCell *)tableView:(UITableView *)tableView
cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
return nil;
}
- (CGFloat) tableView:(UITableView *)tableView
heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
return 80.0;
}
E4CCBDB 6D84F H8 64@C ) (. (0
) (. . )0
) G JC J z
5Bba Sa fi aOP SHWSd m@OW a]_f5]O_R fi n
) z
aOP SHWSd1 S 9]_D]d4a RSeCOaV1 fi np
n
- (UITableViewCell *)tableView:(UITableView *)tableView
cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell* cell =
[tableView dequeueReusableCellWithIdentifier:@"MyCell"];
Item* item = _items[indexPath.row];
UILabel* tv1 =[cell viewWithTag:2];
tv1.text = item.jname;
UILabel* tv2 =[cell viewWithTag:3];
tv2.text = item.ename;
return cell;
}
E4CCBDB 6D84F H8 64@C ) (. )
) (. . )0
) z
fl x fifi n z fi n
E4CCBDB 6D84F H8 64@C ) (. )(
) (. . )0
) - 4DJG8R LJ z
z pE7ISP [OUS Vaa 1 UWaVbP ][ _
E7ISP [OUS n 6] ]OC]R Vaa 1 ] ]O ]R ]_U
fi np6] ]OC]R fi y n
m m fi o y “ yn m
n
6] ]OC]R n C]R9W S flyz
n
C]R9W S “ yn
$ ls
SCC2017_ios_objc.xcodeproj SCC2017_ios_objc
$ pod init
$ ls
Podfile SCC2017_ios_objc.xcodeproj
SCC2017_ios_objc
$ vi Podfile
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'SCC2017_ios_objc' do
# Uncomment the next line if you're using Swift or would like to use
dynamic frameworks
# use_frameworks!
# Pods for SCC2017_ios_objc
pod 'SDWebImage' # <-- この行を追加
end
E4CCBDB 6D84F H8 64@C ) (. ))
) (. . )0
m n
m o o p
E66) (.NW] N]PX e d]_Y O S n fi
m o o n
J ]RS m o o o n
zn p - fl fi n
$ pod install
Analyzing dependencies
Downloading dependencies
Installing SDWebImage (3.7.5)
Generating Pods project
Integrating client project
[!] Please close any current Xcode sessions and use
`SCC2017_ios_objc.xcworkspace` for this project from now on.
Sending stats
Pod installation complete! There is 1 dependency from the Podfile and 1 total
pod installed.
[!] Automatically assigning platform ios with version 10.3 on target
SCC2017_ios_objc because no platform was specified. Please specify a platform
for this target in your Podfile. See `https://guides.cocoapods.org/syntax/
podfile.html#platform`.
$ ls
Podfile SCC2017_ios_objc
Podfile.lock SCC2017_ios_objc.xcodeproj
Pods SCC2017_ios_objc.xcworkspace
E4CCBDB 6D84F H8 64@C ) (. )
) (. . )0
) . z
E7ISP [OUS o
n
#import <SDWebImage/UIImageView+WebCache.h>
 :
- (UITableViewCell *)tableView:(UITableView *)tableView
cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell* cell = [tableView
dequeueReusableCellWithIdentifier:@"MyCell"];
Item* item = _items[indexPath.row];
UIImageView* iv = [cell viewWithTag:1];
[iv sd_setImageWithURL:[NSURL URLWithString:item.imageUrl]];
UILabel* tv1 = [cell viewWithTag:2];
tv1.text = item.jname;
UILabel* tv2 = [cell viewWithTag:3];
tv2.text = item.ename;
return cell;
}
E4CCBDB 6D84F H8 64@C ) (. )
) (. . )0
JU z
xm fifi fi n z fi n
E4CCBDB 6D84F H8 64@C ) (. ),
) (. . )0
d K e
JU z
BPXS aWcS 6 fl fi n6V]] S ] aW] T]_ f]b_ Sd _]XS a1
fi O UbOUS BPXS aWcS 6 fi EdWTa “ yn
JU ( c c cfl a
BPXS aWcS 6 fl fi n
E4CCBDB 6D84F H8 64@C ) (. )-
) (. . )0
JU) a
) c z
o aS[ HWSd6] a_] S_ o fl n
) ( c z
o n
class Item : NSObject {
let BASE_URL = "https://kiroru-inc.jp/share/scc2017/"
let imageUrl:String
let jname:String
let ename:String
init(imageUrl:String, jname:String, ename:String) {
self.imageUrl = BASE_URL + imageUrl
self.jname = jname
self.ename = ename
}
}
var items:[Item] = []
override func viewDidLoad() {
super.viewDidLoad()
items.append(
Item(imageUrl: "Japan.png", jname: "日本", ename: "Japan"))
items.append(
Item(imageUrl: "China.png", jname: "中国", ename: "China"))
items.append(
Item(imageUrl: "USA.png", jname: "アメリカ", ename: "America"))
items.append(
Item(imageUrl: "England.png", jname: "イギリス", ename: "England"))
items.append(
Item(imageUrl: "France.png", jname: "フランス", ename: "France"))
}
E4CCBDB 6D84F H8 64@C ) (. ).
) (. . )0
) ) z
G FOP SHWSd G FOP SHWSd7OaOE]b_ S G FOP SHWSd7S SUOaS
n
) G JC J z
BPXS aWcS 6 fl fi n
class ViewController: UIViewController, UITableViewDataSource,
UITableViewDelegate {
:
@IBOutlet var tableView:UITableView? = nil
override func viewDidLoad() {
super.viewDidLoad()
tableView?.dataSource = self
tableView?.delegate = self
}
:
func numberOfSections(in tableView: UITableView) -> Int {
return 1
}
func tableView(_ tableView: UITableView,
numberOfRowsInSection section: Int) -> Int {
return items.count
}
func tableView(_ tableView: UITableView,
cellForRowAt indexPath: IndexPath) -> UITableViewCell {
return nil
}
func tableView(_ tableView: UITableView,
heightForRowAt indexPath: IndexPath) -> CGFloat {
return 80.0
}
E4CCBDB 6D84F H8 64@C ) (. )/
) (. . )0
) y nr z
aOP SHWSd1 S 9]_D]d4a RSeCOaV1 fi n
fi y fim n
) z
fl x fifi n z fi np
BPXS aWcS 6 fl fi n
func tableView(_ tableView: UITableView,
cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "MyCell")!
let item = items[indexPath.row]
let tv1 = cell.viewWithTag(2) as! UILabel
tv1.text = item.jname
let tv2 = cell.viewWithTag(3) as! UILabel
tv2.text = item.ename
return cell
}
E4CCBDB 6D84F H8 64@C ) (. )0
) (. . )0
) - 4DJG8R LJ z
BPXS aWcS 6 fl fi n
) . z
E7ISP [OUS o
n
import SDWebImage
 :
func tableView(_ tableView: UITableView,
cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "MyCell")!
let item = items[indexPath.row]
let iv = cell.viewWithTag(1) as! UIImageView
iv.sd_setImage(with: URL(string: item.imageUrl)!)
let tv1 = cell.viewWithTag(2) as! UILabel
tv1.text = item.jname
let tv2 = cell.viewWithTag(3) as! UILabel
tv2.text = item.ename
return cell
}
E4CCBDB 6D84F H8 64@C ) (.
) (. . )0
JU a
xm fifi fi n z fi np
BPXS aWcS 6 fl fi n
E4CCBDB 6D84F H8 64@C ) (. (
) (. . )0
1SIVT I d:T S e
JU p y
4 R_]WR OcO >]a W o fl n
4 R_]WR EabRW] fi m4 R_]WR EaORW] ) fi >]a W
flfi z fl fi n fi 4 R_]WR EabRW] ) fi
fix fl n
JU z
n OcO fl fi n
m fi “ yn
:T S z
F]] 2 >]a W 2 6] iUb_S >]a W W C_]XS a
PbW R U_OR S fim Ef A]d “ yn
E4CCBDB 6D84F H8 64@C ) (. )
) (. . )0
( 1H z o j
OcO m>]a W n
O aWcWafN[OW e[ n m>]a W
m y z
y z “ yn
( 9W S 2 ASd 2 >]a W 4 aWcWaf
) 8[ af 4 aWcWaf LASeaM
6b a][WgS aVS 4 aWcWaf y 4 aWcWaf AO[S @OW 4 aWcWaf
nUS S_OaS Of]ba 9W S nL 9W W V M
@OW 4 aWcWaf Sa6] aS aHWSd n
JU ( z
OcO fl fi n
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
}
}
E4CCBDB 6D84F H8 64@C ) (.
) (. . )0
JU) z
) c z
o aS[ @OW 4 aWcWaf o fl n
) ( c z
o n
class Item(imageUrl:String, val jname:String, val ename:String) {
val imageUrl = "https://kiroru-inc.jp/share/scc2017/" + imageUrl
}
var items = mutableListOf<Item>()
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
items.add(Item("Japan.png", "日本", "Japan"))
items.add(Item("China.png", "中国", "China"))
items.add(Item("USA.png", "アメリカ", "America"))
items.add(Item("England.png", "イギリス", "England"))
items.add(Item("France.png", "フランス", "France"))
}
E4CCBDB 6D84F H8 64@C ) (.
) (. . )0
) ) c a
o @f4RO aS_ @OW 4 aWcWaf o fl n
) C J 7T IJV a
@f4RO aS_ o fl HWSd ] RS_ n
) T 8S_ JV a
Of]ba jOaS_ n HWSd ] RS_
n
class MyAdapter(val context: Context, val items:MutableList<Item>) :
BaseAdapter() {
override fun getView(position: Int,
convertView: View?, parent: ViewGroup?): View {
TODO("not implemented")

}
override fun getItem(position: Int): Any {
return items[position]
}
override fun getItemId(position: Int): Long {
return position.toLong()
}
override fun getCount(): Int {
return items.size
}
}
class ViewHolder(val iv: ImageView, val tv1: TextView, val tv2: TextView) {}
var holder:ViewHolder? = null
val inflater: LayoutInflater = (context as Activity).layoutInflater
E4CCBDB 6D84F H8 64@C ) (. ,
) (. . )0
) z
o USaHWSd np n
) - 6 IJ z
OcO fl fi n
) . z
: WRS m o fi o m [OUSHWSd
n
override fun getView(position: Int,
convertView: View?, parent: ViewGroup?): View {
var view:View
if (convertView == null) {
view = inflater.inflate(R.layout.cell_main, null)
holder = ViewHolder(
view.findViewById(R.id.imageView) as ImageView,
view.findViewById(R.id.textView1) as TextView,
view.findViewById(R.id.textView2) as TextView)
view.tag = holder
} else {
view = convertView!!
holder = view.tag as ViewHolder
}
val item = items[position]
holder?.tv1?.text = item.jname
holder?.tv2?.text = item.ename
return view
}
val item = items[position]
Glide.with(context).load(item.imageUrl).into(holder?.iv)
holder?.tv1?.text = item.jname
holder?.tv2?.text = item.ename
E4CCBDB 6D84F H8 64@C ) (. -
) (. . )0
) / x o a
@f4RO aS_ fl W aHWSd n
JU 1SIVT I S KJW R a
OcO fl fi n
JU a
xm fifi fi n z fi n
override fun onCreate(savedInstanceState: Bundle?) {
:
val lv = findViewById(R.id.listView) as ListView
lv.adapter = MyAdapter(this, items)
}
E4CCBDB 6D84F H8 64@C ) (. .
) (. . )0
z c dszhe
fi zn
fi n fl z
np 4 R_]WR fi fi nWBE fi n
E4CCBDB 6D84F H8 64@C ) (. /
) (. . )0
1SIVT I d9 e
JU 1H z
4 aWcWaf zn fi n
(" o 9W S 2 ASd 2 4 aWcWaf 2 8[ af 4 aWcWaf n
)" 6] iUb_S 4 aWcWaf fi 4 aWcWaf AO[S 7SaOW 4 aWcWaf n
L9W W VM
E4CCBDB 6D84F H8 64@C ) (. 0
) (. . )0
JU ( z
o n pO aWcWafNRSaOW e[
o z n
fi n
E4CCBDB 6D84F H8 64@C ) (.
) (. . )0
R LJC J
J C J
J C J (
G TS
fi z z 6] a_OW a
“ yn
7 W[OUSHWSd
Of]baNdWRaV (- R
Of]baNVSWUVa (- R
7 aSeaHWSd(
aSeaEWgS
aSea6] ]_ 3O R_]WR1 ] ]_ P O Y
aSea4 WU [S a 4 :AN68AF8D
7 aSeaHWSd)
aSeaEWgS )
aSea6] ]_ 3O R_]WR1 ] ]_ RO_YS_NU_Of
aSea4 WU [S a 4 :AN68AF8D
7 Pbaa]
aSea
E4CCBDB 6D84F H8 64@C ) (. (
) (. . )0
JU ) z
JU ) 4J 1H O z
fi n @OW 4 aWcWaf aS a
fi fi n m n
@Override

protected void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

setContentView(R.layout.activity_detail);



Intent i = getIntent();

String imageUrl = i.getStringExtra("imageUrl");

String jname = i.getStringExtra("jname");

String ename = i.getStringExtra("ename");



ImageView iv = (ImageView)findViewById(R.id.imageView);

Glide.with(this).load(imageUrl).into(iv);



TextView tv1 = (TextView)findViewById(R.id.textView1);

tv1.setText(jname);



TextView tv2 = (TextView)findViewById(R.id.textView2);

tv2.setText(ename);



Button b = (Button)findViewById(R.id.button);

b.setOnClickListener(new View.OnClickListener() {

@Override

public void onClick(View v) {

finish();

}

});

}

E4CCBDB 6D84F H8 64@C ) (. )
) (. . )0
JU ) ( S1H O z
n
aS a n
JU z
fi fi n fi n
@Override

protected void onCreate(Bundle savedInstanceState) {

:


lv.setOnItemClickListener(new AdapterView.OnItemClickListener() {

@Override

public void onItemClick(AdapterView<?> parent, View view, int
position, long id) {

Item item = items.get(position);



Intent i = new Intent(MainActivity.this, DetailActivity.class);

i.putExtra("imageUrl", item.imageUrl);

i.putExtra("jname", item.jname);

i.putExtra("ename", item.ename);



startActivity(i);

}

});

}

E4CCBDB 6D84F H8 64@C ) (.
) (. . )0
1SIVT I d:T S e
JU 1H z
4 aWcWaf zn fi n
(" o 9W S 2 ASd 2 >]a W 4 aWcWaf n
)" 4RR O 4 aWcWaf a] @]PW S fi 8[ af 4 aWcWaf nLASeaM
" 6b a][WgS aVS 4 aWcWaf fi 4 aWcWaf AO[S 7SaOW 4 aWcWaf
nL9W W VM
JU ( z
OcO fl fi n
E4CCBDB 6D84F H8 64@C ) (.
) (. . )0
JU ) z
JU ) 4J 1H P z
fi n @OW 4 aWcWaf aS a
fi fi n m n
JU ) ( S1H P z
n
aS a n
JU z
fi fi n fi n
override fun onCreate(savedInstanceState: Bundle?) {

super.onCreate(savedInstanceState)

setContentView(R.layout.activity_detail)



val imageUrl = intent.getStringExtra("imageUrl")

val jname = intent.getStringExtra("jname")

val ename = intent.getStringExtra("ename")



val iv = findViewById(R.id.imageView) as ImageView

Glide.with(this).load(imageUrl).into(iv)



val tv1 = findViewById(R.id.textView1) as TextView

tv1.text = jname



val tv2 = findViewById(R.id.textView2) as TextView

tv2.text = ename



val b = findViewById(R.id.button) as Button

b.setOnClickListener { _ -> finish() }

}

override fun onCreate(savedInstanceState: Bundle?) {
:

lv.setOnItemClickListener { parent, view, position, id ->

val item = items[position]

val i = Intent(this, DetailActivity::class.java)

i.putExtra("imageUrl", item.imageUrl)

i.putExtra("jname", item.jname)

i.putExtra("ename", item.ename)

startActivity(i)

}

}
E4CCBDB 6D84F H8 64@C ) (. ,
) (. . )0
d GOJH J 3 e
JU 4J C J 3TS VT JV z
7SaOW HWSd6] a_] S_ zn fi n
(" o 9W S 2 ASd 2 9W S n
)" 6V]] S O aS[ OaS T]_ f]b_ Sd i S fi 6] ]O F]b V 6 O
nLASeaM
" 6V]] S ] aW] T]_ f]b_ Sd i S fi 6 O 7SaOW HWSd6] a_] S_
m O UbOUS BPXS aWcS 6 nLASeaM
" fi nL6_SOaSM
E4CCBDB 6D84F H8 64@C ) (. -
) (. . )0
JU ( c c cfl a
JU ( C J 3TS VT JV a
o o o HWSd6] a_] S_ n
mHWSd6] a_] S_ 6 O 7SaOW HWSd6] a_] S_ n
VU ( ( 4J C J 3TS VT JV y c a
z o z 7SaOW HWSd6] a_] S_ o
n z n
E4CCBDB 6D84F H8 64@C ) (. .
) (. . )0
B88R LJC J
B8 GJ
B82 TS
n
J ( .l WCV] S.
K ,
IWRaV (-
SWUVa (-
6] aS a @]RS 4 S a 9Wa
d GJ GJ (e
J
K )/ /
IWRaV .,l WCV] S.
SWUVa
4 WU [S a 68AF8D
9] a Ef aS[ )
6] ]_ 5 O Y WUVa :_Of 6] ]_
J
K ,,.l WCV] S.
IWRaV .,l WCV] S.
SWUVa
FWa S
E4CCBDB 6D84F H8 64@C ) (. /
) (. . )0
JU ( ) JL J a
HWSd6] a_] S_ p@f6S 7SaOW HWSd6] a_] S_
z ESUbS fi n ESUbS WRS aWiS_ RSaOW n
o z n
E4CCBDB 6D84F H8 64@C ) (. 0
) (. . )0
JU ) z
JU ) 4J C J 3TS VT JV z
fi n fi fi
n m n
4J C J 3TS VT JV M
4J C J 3TS VT JV R
@interface DetailViewController : UIViewController
@property (nonatomic, strong) NSString* imageUrl;
@property (nonatomic, strong) NSString* jname;
@property (nonatomic, strong) NSString* ename;
@end
#import <SDWebImage/UIImageView+WebCache.h>
@interface DetailViewController ()
@property (nonatomic, weak) IBOutlet UIImageView* iv;
@property (nonatomic, weak) IBOutlet UILabel* tv1;
@property (nonatomic, weak) IBOutlet UILabel* tv2;
- (IBAction)close:(id)sender;
@end
@implementation DetailViewController
- (void)viewDidLoad {
[super viewDidLoad];
[_iv sd_setImageWithURL:[NSURL URLWithString:_imageUrl]];
_tv1.text = _jname;
_tv2.text = _ename;
}
:
- (void)close:(id)sender
{
[self dismissViewControllerAnimated:NO completion:nil];
}
E4CCBDB 6D84F H8 64@C ) (. ,
) (. . )0
JU ) ( C J 3TS VT JV z
n
fi n
C J 3TS VT JV R
JU ) ) x c z
5Bba Sa fi fl o o o o n m
n
JU z
fi fi n fi n
#import "DetailViewController.h"
:
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
if ([segue.identifier isEqualToString:@"detail"]) {
Item* item = _items[_tableView.indexPathForSelectedRow.row];
DetailViewController* controller = segue.destinationViewController;
controller.imageUrl = item.imageUrl;
controller.jname = item.jname;
controller.ename = item.ename;
}
}
E4CCBDB 6D84F H8 64@C ) (. ,(
) (. . )0
d K e
JU 4J C J 3TS VT JV z
BPXS aWcS 6 fl fi n6V]] S ] aW] T]_ f]b_ Sd _]XS a1
fi O UbOUS BPXS aWcS 6 fi EdWTa “ yn
JU ( c c cfl a
BPXS aWcS 6 fl fi n
JU ) z
JU ) 4J C J 3TS VT JV z
fi n fi fi
n m n
import UIKit
import SDWebImage
class DetailViewController: UIViewController {
var imageUrl:String?
var jname:String?
var ename:String?
@IBOutlet var iv:UIImageView?
@IBOutlet var tv1:UILabel?
@IBOutlet var tv2:UILabel?
override func viewDidLoad() {
super.viewDidLoad()
iv?.sd_setImage(with: URL(string: imageUrl!))
tv1?.text = jname
tv2?.text = ename
}
:
@IBAction func close() {
self.dismiss(animated: false, completion: nil)
}
E4CCBDB 6D84F H8 64@C ) (. ,)
) (. . )0
JU ) ( C J 3TS VT JV z
n
fi n
C J 3TS VT JV W K
JU ) ) x c z
BPXS aWcS 6 fl fi n
JU z
fi fi n fi n
m w v w ak n wotb
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
if segue.identifier == "detail" {
let item = items[(tableView?.indexPathForSelectedRow?.row)!]
let controller = segue.destination as! DetailViewController
controller.imageUrl = item.imageUrl
controller.jname = item.jname
controller.ename = item.ename
}
}
E4CCBDB 6D84F H8 64@C ) (. ,

Mais conteúdo relacionado

Mais procurados

Mais procurados (14)

zen and the art of SQL optimization
zen and the art of SQL optimizationzen and the art of SQL optimization
zen and the art of SQL optimization
 
3
33
3
 
Employ leave dtb
Employ leave dtbEmploy leave dtb
Employ leave dtb
 
Rushed to Victory Gardens' stage, An Issue of Blood is more effusion than play
Rushed to Victory Gardens' stage, An Issue of Blood is more effusion than playRushed to Victory Gardens' stage, An Issue of Blood is more effusion than play
Rushed to Victory Gardens' stage, An Issue of Blood is more effusion than play
 
Аварийный дамп – чёрный ящик упавшей JVM. Андрей Паньгин
Аварийный дамп – чёрный ящик упавшей JVM. Андрей ПаньгинАварийный дамп – чёрный ящик упавшей JVM. Андрей Паньгин
Аварийный дамп – чёрный ящик упавшей JVM. Андрей Паньгин
 
[2007 CodeEngn Conference 01] seaofglass - Linux Virus Analysis
[2007 CodeEngn Conference 01] seaofglass - Linux Virus Analysis[2007 CodeEngn Conference 01] seaofglass - Linux Virus Analysis
[2007 CodeEngn Conference 01] seaofglass - Linux Virus Analysis
 
Project hotel on hotel management fo
Project  hotel on hotel management foProject  hotel on hotel management fo
Project hotel on hotel management fo
 
The Ring programming language version 1.6 book - Part 55 of 189
The Ring programming language version 1.6 book - Part 55 of 189The Ring programming language version 1.6 book - Part 55 of 189
The Ring programming language version 1.6 book - Part 55 of 189
 
Object oriented JavaScript
Object oriented JavaScriptObject oriented JavaScript
Object oriented JavaScript
 
Simulator customizing & testing for Xcode 9
Simulator customizing & testing for Xcode 9Simulator customizing & testing for Xcode 9
Simulator customizing & testing for Xcode 9
 
The Ring programming language version 1.3 book - Part 65 of 88
The Ring programming language version 1.3 book - Part 65 of 88The Ring programming language version 1.3 book - Part 65 of 88
The Ring programming language version 1.3 book - Part 65 of 88
 
Ssaw08 0624
Ssaw08 0624Ssaw08 0624
Ssaw08 0624
 
The Ring programming language version 1.8 book - Part 65 of 202
The Ring programming language version 1.8 book - Part 65 of 202The Ring programming language version 1.8 book - Part 65 of 202
The Ring programming language version 1.8 book - Part 65 of 202
 
Model Based Fault Detection, Identification and Accommodation in Antilock Bra...
Model Based Fault Detection, Identification and Accommodation in Antilock Bra...Model Based Fault Detection, Identification and Accommodation in Antilock Bra...
Model Based Fault Detection, Identification and Accommodation in Antilock Bra...
 

Semelhante a SCC2017「両利きスマホアプリ開発のススメ」資料

1st Round Athletics Deck (1)
1st Round Athletics Deck (1)1st Round Athletics Deck (1)
1st Round Athletics Deck (1)
Sterling Brewster
 
Add more information to your upload1232434435
Add more information to your upload1232434435Add more information to your upload1232434435
Add more information to your upload1232434435
thanhluan21
 
[플래텀 차이나리포트] 2018 중국 신유통 현황
[플래텀 차이나리포트] 2018 중국 신유통 현황[플래텀 차이나리포트] 2018 중국 신유통 현황
[플래텀 차이나리포트] 2018 중국 신유통 현황
Platum
 

Semelhante a SCC2017「両利きスマホアプリ開発のススメ」資料 (20)

Prelude to halide_public
Prelude to halide_publicPrelude to halide_public
Prelude to halide_public
 
Elixirでハードウェアが作れちゃう,かも!!? データフロー型ハードウェア設計環境Cockatriceのご紹介
Elixirでハードウェアが作れちゃう,かも!!?データフロー型ハードウェア設計環境Cockatriceのご紹介Elixirでハードウェアが作れちゃう,かも!!?データフロー型ハードウェア設計環境Cockatriceのご紹介
Elixirでハードウェアが作れちゃう,かも!!? データフロー型ハードウェア設計環境Cockatriceのご紹介
 
Stability analysis using Routh-Hurwitz Criterion
Stability analysis using Routh-Hurwitz CriterionStability analysis using Routh-Hurwitz Criterion
Stability analysis using Routh-Hurwitz Criterion
 
Jpg2pdf
Jpg2pdfJpg2pdf
Jpg2pdf
 
Amazon ECS를 통한 Docker 콘테이너의 지속적 배포(CD) 방법
Amazon ECS를 통한 Docker 콘테이너의 지속적 배포(CD) 방법Amazon ECS를 통한 Docker 콘테이너의 지속적 배포(CD) 방법
Amazon ECS를 통한 Docker 콘테이너의 지속적 배포(CD) 방법
 
Flow of events during Media Player creation in Android
Flow of events during Media Player creation in AndroidFlow of events during Media Player creation in Android
Flow of events during Media Player creation in Android
 
Mat fin
Mat finMat fin
Mat fin
 
TensorFlow 2: New Era of Developing Deep Learning Models
TensorFlow 2: New Era of Developing Deep Learning ModelsTensorFlow 2: New Era of Developing Deep Learning Models
TensorFlow 2: New Era of Developing Deep Learning Models
 
PBL1-v1-004j.pptx
PBL1-v1-004j.pptxPBL1-v1-004j.pptx
PBL1-v1-004j.pptx
 
طراحی کنترلر فازی – مودلغزشی به منظور کنترل موقعیت عملگر سروو نیوماتیکی توسط ...
طراحی کنترلر فازی – مودلغزشی به منظور کنترل موقعیت عملگر سروو نیوماتیکی توسط ...طراحی کنترلر فازی – مودلغزشی به منظور کنترل موقعیت عملگر سروو نیوماتیکی توسط ...
طراحی کنترلر فازی – مودلغزشی به منظور کنترل موقعیت عملگر سروو نیوماتیکی توسط ...
 
1st Round Athletics Deck (1)
1st Round Athletics Deck (1)1st Round Athletics Deck (1)
1st Round Athletics Deck (1)
 
Db2 Warehouse v3.0 運用管理ガイド 基礎編 20190104 Db2 Warehouse v3.0 Basic Operation G...
Db2 Warehouse v3.0 運用管理ガイド 基礎編 20190104  Db2 Warehouse v3.0 Basic Operation G...Db2 Warehouse v3.0 運用管理ガイド 基礎編 20190104  Db2 Warehouse v3.0 Basic Operation G...
Db2 Warehouse v3.0 運用管理ガイド 基礎編 20190104 Db2 Warehouse v3.0 Basic Operation G...
 
Add more information to your upload1232434435
Add more information to your upload1232434435Add more information to your upload1232434435
Add more information to your upload1232434435
 
[플래텀 차이나리포트] 2018 중국 신유통 현황
[플래텀 차이나리포트] 2018 중국 신유통 현황[플래텀 차이나리포트] 2018 중국 신유통 현황
[플래텀 차이나리포트] 2018 중국 신유통 현황
 
JavaエンジニアがXamarin Forms(C#)でスマホアプリを書いてみた
JavaエンジニアがXamarin Forms(C#)でスマホアプリを書いてみたJavaエンジニアがXamarin Forms(C#)でスマホアプリを書いてみた
JavaエンジニアがXamarin Forms(C#)でスマホアプリを書いてみた
 
20190225 DIY伝送装置
20190225 DIY伝送装置20190225 DIY伝送装置
20190225 DIY伝送装置
 
セオリー・オブ・チェンジ(ToC)とは(2020.6.9. 神戸大学経営学部内田ゼミ)
セオリー・オブ・チェンジ(ToC)とは(2020.6.9. 神戸大学経営学部内田ゼミ)セオリー・オブ・チェンジ(ToC)とは(2020.6.9. 神戸大学経営学部内田ゼミ)
セオリー・オブ・チェンジ(ToC)とは(2020.6.9. 神戸大学経営学部内田ゼミ)
 
Java, Up to Date Sources
Java, Up to Date SourcesJava, Up to Date Sources
Java, Up to Date Sources
 
Systems and methods for electronic communications
Systems and methods for electronic communicationsSystems and methods for electronic communications
Systems and methods for electronic communications
 
17 Uniform Exam Questions and Answer Key(Kerala PSC)
17 Uniform Exam Questions and Answer Key(Kerala PSC)17 Uniform Exam Questions and Answer Key(Kerala PSC)
17 Uniform Exam Questions and Answer Key(Kerala PSC)
 

Mais de Kenji Sakashita (6)

Android 3.0 (Honeycomb) で始める Android Tablet アプリ開発
Android 3.0 (Honeycomb) で始める Android Tablet アプリ開発Android 3.0 (Honeycomb) で始める Android Tablet アプリ開発
Android 3.0 (Honeycomb) で始める Android Tablet アプリ開発
 
SIP x Android
SIP x AndroidSIP x Android
SIP x Android
 
Androidアプリ開発を始めるなら今!
Androidアプリ開発を始めるなら今!Androidアプリ開発を始めるなら今!
Androidアプリ開発を始めるなら今!
 
ハンズオン資料 電話を作ろう(v2.x用)
ハンズオン資料 電話を作ろう(v2.x用)ハンズオン資料 電話を作ろう(v2.x用)
ハンズオン資料 電話を作ろう(v2.x用)
 
ハンズオン資料 電話を作ろう(v1.6用)
ハンズオン資料 電話を作ろう(v1.6用)ハンズオン資料 電話を作ろう(v1.6用)
ハンズオン資料 電話を作ろう(v1.6用)
 
Android勉強会in札幌 『CF電話帳』hacks
Android勉強会in札幌 『CF電話帳』hacksAndroid勉強会in札幌 『CF電話帳』hacks
Android勉強会in札幌 『CF電話帳』hacks
 

Último

CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 

Último (20)

VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 

SCC2017「両利きスマホアプリ開発のススメ」資料

  • 1. 1 3 51A8C5 31 ( - f l z g ) (. . )0
  • 2. ) (. . )0 p y ” w os rtp) (. . )0 fl n ofi WBE 4 R_]WR y m flfi WBE 4 R_]WR z fl yfl y n fi fi fi n 4 R_]WR p OcO Vaa 1 UWaVbP ][ YW_]_b E66) (.NO R_]WRNXOcO 4 R_]WR p>]a W Vaa 1 UWaVbP ][ YW_]_b E66) (.NO R_]WRNY]a W WBE pBPXS aWcS 6 Vaa 1 UWaVbP ][ YW_]_b E66) (.NW] N]PX WBE pEdWTa Vaa 1 UWaVbP ][ YW_]_b E66) (.NW] N dWTa E4CCBDB 6D84F H8 64@C ) (. (
  • 3. ) (. . )0 z c flu zn o fi n fl z np 4 R_]WR fi fi nWBE fi n yuiv fi y fi y n 1SIVT I0 4 R_]WR EabRW] HS_ W] 1 ) p>]a W 0lJ ]RS / p6] ]OC]R E4CCBDB 6D84F H8 64@C ) (. )
  • 4. ) (. . )0 1SIVT I d9 e JU z zn fi n (" 4 R_]WR EabRW] n )" IS ][S a] 4 R_]WR EabRW] fi hEaO_a O Sd 4 R_]WR EabRW] C_]XS ak n " ASd C_]XS a fi 4 W OaW] O[S 6][ O f R][OW C_]XS a ] OaW] n L ASea M " FO_USa 4 R_]WR 7ScW S fi fi n L ASea M ," 4RR O 4 aWcWaf a] @]PW S fi 8[ af 4 aWcWaf n L ASea M -" 6b a][WgS aVS 4 aWcWaf fi fi n L 9W W V M E4CCBDB 6D84F H8 64@C ) (.
  • 5. ) (. . )0 JU ( z ( H ER S R z o n pO aWcWafN[OW e[ o z n o o n W C J W aHWSd n W aHWSd fi v “ yn z fi n 7 W aHWSd E4CCBDB 6D84F H8 64@C ) (.
  • 6. ) (. . )0 ( ( HJ ER S R z x n o S N[OW e[ z o z n fi n o o n SJ V T MTV TS R LJC J Of]baNdWRaV / R ]_WS aOaW] V]_Wg] aO 7 W[OUSHWSd Of]baNdWRaV / R Of]baNVSWUVa / R E4CCBDB 6D84F H8 64@C ) (. ,
  • 7. ) (. . )0 SJ V T JV H J C J J C J ( Of]baNdSWUVa ]_WS aOaW] cS_aW O 7 aSeaHWSd( aSeaEWgS ) aSea6] ]_ P O Y 7 aSeaHWSd) aSeaEWgS ) aSea6] ]_ RO_YS_NU_Of E4CCBDB 6D84F H8 64@C ) (. -
  • 8. ) (. . )0 JU) z ) c z o aS[ @OW 4 aWcWaf o fl n ) ( c z o n class Item { String BASE_URL = "https://kiroru-inc.jp/share/scc2017/"; String imageUrl; String jname; String ename; public Item(String imageUrl, String jname, String ename) { this.imageUrl = BASE_URL + imageUrl; this.jname = jname; this.ename = ename; } } private List<Item> items = new ArrayList<>(); @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); items.add(new Item("Japan.png", "日本", "Japan")); items.add(new Item("China.png", "中国", "China")); items.add(new Item("USA.png", "アメリカ", "America")); items.add(new Item("England.png", "イギリス", "England")); items.add(new Item("France.png", "フランス", "France")); : } E4CCBDB 6D84F H8 64@C ) (. .
  • 9. ) (. . )0 ) ) c z o @f4RO aS_ @OW 4 aWcWaf o fl n ) C J 7T IJV z @f4RO aS_ o fl HWSd ] RS_ nHWSd ] RS_ o 4 R_]WR fi nHWSd ] RS_ o n class MyAdapter extends BaseAdapter { @Override public int getCount() { return items.size(); } @Override public Object getItem(int position) { return items.get(position); } @Override public long getItemId(int position) { return position; } @Override public View getView(int position, View convertView, ViewGroup parent) { return null; } } class ViewHolder { ImageView iv; TextView tv1; TextView tv2; } E4CCBDB 6D84F H8 64@C ) (. /
  • 10. ) (. . )0 ) T 8S_ JV z Of]ba jOaS_ n HWSd ] RS_ n ) z o USaHWSd np n private ViewHolder holder; private LayoutInflater inflater; public MyAdapter(Context context) { super(); inflater = ((Activity)context).getLayoutInflater(); } @Override public View getView(int position, View convertView, ViewGroup parent) { if (convertView == null) { convertView = inflater.inflate(R.layout.cell_main, null); holder = new ViewHolder(); holder.iv = (ImageView)convertView.findViewById(R.id.imageView); holder.tv1 = (TextView)convertView.findViewById(R.id.textView1); holder.tv2 = (TextView)convertView.findViewById(R.id.textView2); convertView.setTag(holder); } else { holder = (ViewHolder)convertView.getTag(); } Item item = items.get(position); holder.tv1.setText(item.jname); holder.tv2.setText(item.ename); return convertView;
 } E4CCBDB 6D84F H8 64@C ) (. 0
  • 11. ) (. . )0 ) - 6 IJ z z p: WRS Vaa 1 UWaVbP ][ Pb[ aS V U WRS nPbW R U_OR S @]Rb S1 O " m Ef A]d n ) . z : WRS m o fi o m [OUSHWSd n ) / x cz m fl o n repositories { mavenCentral() // jcenter() works as well because it pulls from Maven Central } dependencies { compile 'com.github.bumptech.glide:glide:4.0.0-RC1' compile 'com.android.support:support-v4:25.3.1' annotationProcessor 'com.github.bumptech.glide:compiler:4.0.0-RC1' } Item item = items.get(position); Glide.with(MainActivity.this).load(item.imageUrl).into(holder.iv); holder.tv1.setText(item.jname); holder.tv2.setText(item.ename); @Override protected void onCreate(Bundle savedInstanceState) { : ListView lv = (ListView)findViewById(R.id.listView); lv.setAdapter(new MyAdapter(this)); } E4CCBDB 6D84F H8 64@C ) (. (
  • 12. ) (. . )0 JU 1SIVT I S KJW R z AF8DA8F o zn JU a xm fifi fi n z fi n <?xml version="1.0" encoding="utf-8"?> : <uses-permission android:name="android.permission.INTERNET"/> <application android:allowBackup="true" : E4CCBDB 6D84F H8 64@C ) (. ((
  • 13. ) (. . )0 d GOJH J 3 e JU z zn fi n (" J ]RS n )" IS ][S a] J ]RS fi h6_SOaS O Sd J ]RSk n " 6V]] S O aS[ OaS T]_ f]b_ Sd _]XS a1 fi EW U S HWSd 4 W OaW] n L ASea M " 6V]] S ] aW] T]_ f]b_ Sd _]XS a1 fi C_]Rb a AO[S m O UbOUS BPXS aWcS 6 n L ASea M ," fi n L 6_SOaS M E4CCBDB 6D84F H8 64@C ) (. ()
  • 14. ) (. . )0 JU ( c c cflz ( C J 3TS VT JV z o o o p@OW a]_fP]O_R fi HWSd6] a_] S_ n z o p z nHWSd6] a_] S_ z n E4CCBDB 6D84F H8 64@C ) (. (
  • 15. ) (. . )0 B8A G JC J z n B8A G JC J 3J D]d SWUVa / RS aWiS_ @f6S E4CCBDB 6D84F H8 64@C ) (. (
  • 16. ) (. . )0 B88R LJC J z n J K IWRaV / FOU ( 6] aS a @]RS 4 S a 9Wa E4CCBDB 6D84F H8 64@C ) (. (,
  • 17. ) (. . )0 B8 GJ z n d GJ GJ (e J / K SWUVa FOU ) 9] a Ef aS[ ) 6] ]_ 5 O Y WUVa :_Of 6] ]_ E4CCBDB 6D84F H8 64@C ) (. (-
  • 18. ) (. . )0 JU) z ) c z o aS[ n aS[ HWSd6] a_] S_ [ n @interface Item : NSObject @property (nonatomic, strong) NSString* imageUrl; @property (nonatomic, strong) NSString* jname; @property (nonatomic, strong) NSString* ename; - (instancetype)initWithImageUrl:(NSString*)imageUrl jname:(NSString*)jname ename:(NSString*)ename; @end @implementation Item static NSString* BASE_URL = @"https://kiroru-inc.jp/share/scc2017/"; - (instancetype)initWithImageUrl:(NSString *)imageUrl jname:(NSString *)jname ename:(NSString *)ename { self = [super init]; if (self) { self.imageUrl = [NSString stringWithFormat:@"%@%@", BASE_URL, imageUrl]; self.jname = jname; self.ename = ename; } return self; } @end E4CCBDB 6D84F H8 64@C ) (. (.
  • 19. ) (. . )0 ) ( c z o n E4CCBDB 6D84F H8 64@C ) (. (/ @interface ViewController () @property (nonatomic, strong) NSMutableArray* items; @end @implementation ViewController - (void)viewDidLoad { [super viewDidLoad]; _items = [@[] mutableCopy]; [_items addObject:[[Item alloc] initWithImageUrl:@"Japan.png" jname:@"日本" ename:@"Japan"]]; [_items addObject:[[Item alloc] initWithImageUrl:@"China.png" jname:@"中国" ename:@"China"]]; [_items addObject:[[Item alloc] initWithImageUrl:@"USA.png" jname:@"アメリカ" ename:@"America"]]; [_items addObject:[[Item alloc] initWithImageUrl:@"England.png" jname:@"イギリス" ename:@"England"]]; [_items addObject:[[Item alloc] initWithImageUrl:@"France.png" jname:@"フランス" ename:@"France"]]; }
  • 20. ) (. . )0 ) ) z G FOP SHWSd G FOP SHWSd7OaOE]b_ S G FOP SHWSd7S SUOaS n @interface ViewController () <UITableViewDataSource, UITableViewDelegate>   : @property (nonatomic, weak) IBOutlet UITableView* tableView; @end   : - (void)viewDidLoad { [super viewDidLoad];   : _tableView.dataSource = self; _tableView.delegate = self; }   : - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 1; } - (NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return _items.count; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { return nil; } - (CGFloat) tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { return 80.0; } E4CCBDB 6D84F H8 64@C ) (. (0
  • 21. ) (. . )0 ) G JC J z 5Bba Sa fi aOP SHWSd m@OW a]_f5]O_R fi n ) z aOP SHWSd1 S 9]_D]d4a RSeCOaV1 fi np n - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell* cell = [tableView dequeueReusableCellWithIdentifier:@"MyCell"]; Item* item = _items[indexPath.row]; UILabel* tv1 =[cell viewWithTag:2]; tv1.text = item.jname; UILabel* tv2 =[cell viewWithTag:3]; tv2.text = item.ename; return cell; } E4CCBDB 6D84F H8 64@C ) (. )
  • 22. ) (. . )0 ) z fl x fifi n z fi n E4CCBDB 6D84F H8 64@C ) (. )(
  • 23. ) (. . )0 ) - 4DJG8R LJ z z pE7ISP [OUS Vaa 1 UWaVbP ][ _ E7ISP [OUS n 6] ]OC]R Vaa 1 ] ]O ]R ]_U fi np6] ]OC]R fi y n m m fi o y “ yn m n 6] ]OC]R n C]R9W S flyz n C]R9W S “ yn $ ls SCC2017_ios_objc.xcodeproj SCC2017_ios_objc $ pod init $ ls Podfile SCC2017_ios_objc.xcodeproj SCC2017_ios_objc $ vi Podfile # Uncomment the next line to define a global platform for your project # platform :ios, '9.0' target 'SCC2017_ios_objc' do # Uncomment the next line if you're using Swift or would like to use dynamic frameworks # use_frameworks! # Pods for SCC2017_ios_objc pod 'SDWebImage' # <-- この行を追加 end E4CCBDB 6D84F H8 64@C ) (. ))
  • 24. ) (. . )0 m n m o o p E66) (.NW] N]PX e d]_Y O S n fi m o o n J ]RS m o o o n zn p - fl fi n $ pod install Analyzing dependencies Downloading dependencies Installing SDWebImage (3.7.5) Generating Pods project Integrating client project [!] Please close any current Xcode sessions and use `SCC2017_ios_objc.xcworkspace` for this project from now on. Sending stats Pod installation complete! There is 1 dependency from the Podfile and 1 total pod installed. [!] Automatically assigning platform ios with version 10.3 on target SCC2017_ios_objc because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/ podfile.html#platform`. $ ls Podfile SCC2017_ios_objc Podfile.lock SCC2017_ios_objc.xcodeproj Pods SCC2017_ios_objc.xcworkspace E4CCBDB 6D84F H8 64@C ) (. )
  • 25. ) (. . )0 ) . z E7ISP [OUS o n #import <SDWebImage/UIImageView+WebCache.h>  : - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell* cell = [tableView dequeueReusableCellWithIdentifier:@"MyCell"]; Item* item = _items[indexPath.row]; UIImageView* iv = [cell viewWithTag:1]; [iv sd_setImageWithURL:[NSURL URLWithString:item.imageUrl]]; UILabel* tv1 = [cell viewWithTag:2]; tv1.text = item.jname; UILabel* tv2 = [cell viewWithTag:3]; tv2.text = item.ename; return cell; } E4CCBDB 6D84F H8 64@C ) (. )
  • 26. ) (. . )0 JU z xm fifi fi n z fi n E4CCBDB 6D84F H8 64@C ) (. ),
  • 27. ) (. . )0 d K e JU z BPXS aWcS 6 fl fi n6V]] S ] aW] T]_ f]b_ Sd _]XS a1 fi O UbOUS BPXS aWcS 6 fi EdWTa “ yn JU ( c c cfl a BPXS aWcS 6 fl fi n E4CCBDB 6D84F H8 64@C ) (. )-
  • 28. ) (. . )0 JU) a ) c z o aS[ HWSd6] a_] S_ o fl n ) ( c z o n class Item : NSObject { let BASE_URL = "https://kiroru-inc.jp/share/scc2017/" let imageUrl:String let jname:String let ename:String init(imageUrl:String, jname:String, ename:String) { self.imageUrl = BASE_URL + imageUrl self.jname = jname self.ename = ename } } var items:[Item] = [] override func viewDidLoad() { super.viewDidLoad() items.append( Item(imageUrl: "Japan.png", jname: "日本", ename: "Japan")) items.append( Item(imageUrl: "China.png", jname: "中国", ename: "China")) items.append( Item(imageUrl: "USA.png", jname: "アメリカ", ename: "America")) items.append( Item(imageUrl: "England.png", jname: "イギリス", ename: "England")) items.append( Item(imageUrl: "France.png", jname: "フランス", ename: "France")) } E4CCBDB 6D84F H8 64@C ) (. ).
  • 29. ) (. . )0 ) ) z G FOP SHWSd G FOP SHWSd7OaOE]b_ S G FOP SHWSd7S SUOaS n ) G JC J z BPXS aWcS 6 fl fi n class ViewController: UIViewController, UITableViewDataSource, UITableViewDelegate { : @IBOutlet var tableView:UITableView? = nil override func viewDidLoad() { super.viewDidLoad() tableView?.dataSource = self tableView?.delegate = self } : func numberOfSections(in tableView: UITableView) -> Int { return 1 } func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return items.count } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { return nil } func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { return 80.0 } E4CCBDB 6D84F H8 64@C ) (. )/
  • 30. ) (. . )0 ) y nr z aOP SHWSd1 S 9]_D]d4a RSeCOaV1 fi n fi y fim n ) z fl x fifi n z fi np BPXS aWcS 6 fl fi n func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: "MyCell")! let item = items[indexPath.row] let tv1 = cell.viewWithTag(2) as! UILabel tv1.text = item.jname let tv2 = cell.viewWithTag(3) as! UILabel tv2.text = item.ename return cell } E4CCBDB 6D84F H8 64@C ) (. )0
  • 31. ) (. . )0 ) - 4DJG8R LJ z BPXS aWcS 6 fl fi n ) . z E7ISP [OUS o n import SDWebImage  : func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: "MyCell")! let item = items[indexPath.row] let iv = cell.viewWithTag(1) as! UIImageView iv.sd_setImage(with: URL(string: item.imageUrl)!) let tv1 = cell.viewWithTag(2) as! UILabel tv1.text = item.jname let tv2 = cell.viewWithTag(3) as! UILabel tv2.text = item.ename return cell } E4CCBDB 6D84F H8 64@C ) (.
  • 32. ) (. . )0 JU a xm fifi fi n z fi np BPXS aWcS 6 fl fi n E4CCBDB 6D84F H8 64@C ) (. (
  • 33. ) (. . )0 1SIVT I d:T S e JU p y 4 R_]WR OcO >]a W o fl n 4 R_]WR EabRW] fi m4 R_]WR EaORW] ) fi >]a W flfi z fl fi n fi 4 R_]WR EabRW] ) fi fix fl n JU z n OcO fl fi n m fi “ yn :T S z F]] 2 >]a W 2 6] iUb_S >]a W W C_]XS a PbW R U_OR S fim Ef A]d “ yn E4CCBDB 6D84F H8 64@C ) (. )
  • 34. ) (. . )0 ( 1H z o j OcO m>]a W n O aWcWafN[OW e[ n m>]a W m y z y z “ yn ( 9W S 2 ASd 2 >]a W 4 aWcWaf ) 8[ af 4 aWcWaf LASeaM 6b a][WgS aVS 4 aWcWaf y 4 aWcWaf AO[S @OW 4 aWcWaf nUS S_OaS Of]ba 9W S nL 9W W V M @OW 4 aWcWaf Sa6] aS aHWSd n JU ( z OcO fl fi n class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) } } E4CCBDB 6D84F H8 64@C ) (.
  • 35. ) (. . )0 JU) z ) c z o aS[ @OW 4 aWcWaf o fl n ) ( c z o n class Item(imageUrl:String, val jname:String, val ename:String) { val imageUrl = "https://kiroru-inc.jp/share/scc2017/" + imageUrl } var items = mutableListOf<Item>() override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) items.add(Item("Japan.png", "日本", "Japan")) items.add(Item("China.png", "中国", "China")) items.add(Item("USA.png", "アメリカ", "America")) items.add(Item("England.png", "イギリス", "England")) items.add(Item("France.png", "フランス", "France")) } E4CCBDB 6D84F H8 64@C ) (.
  • 36. ) (. . )0 ) ) c a o @f4RO aS_ @OW 4 aWcWaf o fl n ) C J 7T IJV a @f4RO aS_ o fl HWSd ] RS_ n ) T 8S_ JV a Of]ba jOaS_ n HWSd ] RS_ n class MyAdapter(val context: Context, val items:MutableList<Item>) : BaseAdapter() { override fun getView(position: Int, convertView: View?, parent: ViewGroup?): View { TODO("not implemented")
 } override fun getItem(position: Int): Any { return items[position] } override fun getItemId(position: Int): Long { return position.toLong() } override fun getCount(): Int { return items.size } } class ViewHolder(val iv: ImageView, val tv1: TextView, val tv2: TextView) {} var holder:ViewHolder? = null val inflater: LayoutInflater = (context as Activity).layoutInflater E4CCBDB 6D84F H8 64@C ) (. ,
  • 37. ) (. . )0 ) z o USaHWSd np n ) - 6 IJ z OcO fl fi n ) . z : WRS m o fi o m [OUSHWSd n override fun getView(position: Int, convertView: View?, parent: ViewGroup?): View { var view:View if (convertView == null) { view = inflater.inflate(R.layout.cell_main, null) holder = ViewHolder( view.findViewById(R.id.imageView) as ImageView, view.findViewById(R.id.textView1) as TextView, view.findViewById(R.id.textView2) as TextView) view.tag = holder } else { view = convertView!! holder = view.tag as ViewHolder } val item = items[position] holder?.tv1?.text = item.jname holder?.tv2?.text = item.ename return view } val item = items[position] Glide.with(context).load(item.imageUrl).into(holder?.iv) holder?.tv1?.text = item.jname holder?.tv2?.text = item.ename E4CCBDB 6D84F H8 64@C ) (. -
  • 38. ) (. . )0 ) / x o a @f4RO aS_ fl W aHWSd n JU 1SIVT I S KJW R a OcO fl fi n JU a xm fifi fi n z fi n override fun onCreate(savedInstanceState: Bundle?) { : val lv = findViewById(R.id.listView) as ListView lv.adapter = MyAdapter(this, items) } E4CCBDB 6D84F H8 64@C ) (. .
  • 39. ) (. . )0 z c dszhe fi zn fi n fl z np 4 R_]WR fi fi nWBE fi n E4CCBDB 6D84F H8 64@C ) (. /
  • 40. ) (. . )0 1SIVT I d9 e JU 1H z 4 aWcWaf zn fi n (" o 9W S 2 ASd 2 4 aWcWaf 2 8[ af 4 aWcWaf n )" 6] iUb_S 4 aWcWaf fi 4 aWcWaf AO[S 7SaOW 4 aWcWaf n L9W W VM E4CCBDB 6D84F H8 64@C ) (. 0
  • 41. ) (. . )0 JU ( z o n pO aWcWafNRSaOW e[ o z n fi n E4CCBDB 6D84F H8 64@C ) (.
  • 42. ) (. . )0 R LJC J J C J J C J ( G TS fi z z 6] a_OW a “ yn 7 W[OUSHWSd Of]baNdWRaV (- R Of]baNVSWUVa (- R 7 aSeaHWSd( aSeaEWgS aSea6] ]_ 3O R_]WR1 ] ]_ P O Y aSea4 WU [S a 4 :AN68AF8D 7 aSeaHWSd) aSeaEWgS ) aSea6] ]_ 3O R_]WR1 ] ]_ RO_YS_NU_Of aSea4 WU [S a 4 :AN68AF8D 7 Pbaa] aSea E4CCBDB 6D84F H8 64@C ) (. (
  • 43. ) (. . )0 JU ) z JU ) 4J 1H O z fi n @OW 4 aWcWaf aS a fi fi n m n @Override
 protected void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 setContentView(R.layout.activity_detail);
 
 Intent i = getIntent();
 String imageUrl = i.getStringExtra("imageUrl");
 String jname = i.getStringExtra("jname");
 String ename = i.getStringExtra("ename");
 
 ImageView iv = (ImageView)findViewById(R.id.imageView);
 Glide.with(this).load(imageUrl).into(iv);
 
 TextView tv1 = (TextView)findViewById(R.id.textView1);
 tv1.setText(jname);
 
 TextView tv2 = (TextView)findViewById(R.id.textView2);
 tv2.setText(ename);
 
 Button b = (Button)findViewById(R.id.button);
 b.setOnClickListener(new View.OnClickListener() {
 @Override
 public void onClick(View v) {
 finish();
 }
 });
 }
 E4CCBDB 6D84F H8 64@C ) (. )
  • 44. ) (. . )0 JU ) ( S1H O z n aS a n JU z fi fi n fi n @Override
 protected void onCreate(Bundle savedInstanceState) {
 : 
 lv.setOnItemClickListener(new AdapterView.OnItemClickListener() {
 @Override
 public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
 Item item = items.get(position);
 
 Intent i = new Intent(MainActivity.this, DetailActivity.class);
 i.putExtra("imageUrl", item.imageUrl);
 i.putExtra("jname", item.jname);
 i.putExtra("ename", item.ename);
 
 startActivity(i);
 }
 });
 }
 E4CCBDB 6D84F H8 64@C ) (.
  • 45. ) (. . )0 1SIVT I d:T S e JU 1H z 4 aWcWaf zn fi n (" o 9W S 2 ASd 2 >]a W 4 aWcWaf n )" 4RR O 4 aWcWaf a] @]PW S fi 8[ af 4 aWcWaf nLASeaM " 6b a][WgS aVS 4 aWcWaf fi 4 aWcWaf AO[S 7SaOW 4 aWcWaf nL9W W VM JU ( z OcO fl fi n E4CCBDB 6D84F H8 64@C ) (.
  • 46. ) (. . )0 JU ) z JU ) 4J 1H P z fi n @OW 4 aWcWaf aS a fi fi n m n JU ) ( S1H P z n aS a n JU z fi fi n fi n override fun onCreate(savedInstanceState: Bundle?) {
 super.onCreate(savedInstanceState)
 setContentView(R.layout.activity_detail)
 
 val imageUrl = intent.getStringExtra("imageUrl")
 val jname = intent.getStringExtra("jname")
 val ename = intent.getStringExtra("ename")
 
 val iv = findViewById(R.id.imageView) as ImageView
 Glide.with(this).load(imageUrl).into(iv)
 
 val tv1 = findViewById(R.id.textView1) as TextView
 tv1.text = jname
 
 val tv2 = findViewById(R.id.textView2) as TextView
 tv2.text = ename
 
 val b = findViewById(R.id.button) as Button
 b.setOnClickListener { _ -> finish() }
 }
 override fun onCreate(savedInstanceState: Bundle?) { :
 lv.setOnItemClickListener { parent, view, position, id ->
 val item = items[position]
 val i = Intent(this, DetailActivity::class.java)
 i.putExtra("imageUrl", item.imageUrl)
 i.putExtra("jname", item.jname)
 i.putExtra("ename", item.ename)
 startActivity(i)
 }
 } E4CCBDB 6D84F H8 64@C ) (. ,
  • 47. ) (. . )0 d GOJH J 3 e JU 4J C J 3TS VT JV z 7SaOW HWSd6] a_] S_ zn fi n (" o 9W S 2 ASd 2 9W S n )" 6V]] S O aS[ OaS T]_ f]b_ Sd i S fi 6] ]O F]b V 6 O nLASeaM " 6V]] S ] aW] T]_ f]b_ Sd i S fi 6 O 7SaOW HWSd6] a_] S_ m O UbOUS BPXS aWcS 6 nLASeaM " fi nL6_SOaSM E4CCBDB 6D84F H8 64@C ) (. -
  • 48. ) (. . )0 JU ( c c cfl a JU ( C J 3TS VT JV a o o o HWSd6] a_] S_ n mHWSd6] a_] S_ 6 O 7SaOW HWSd6] a_] S_ n VU ( ( 4J C J 3TS VT JV y c a z o z 7SaOW HWSd6] a_] S_ o n z n E4CCBDB 6D84F H8 64@C ) (. .
  • 49. ) (. . )0 B88R LJC J B8 GJ B82 TS n J ( .l WCV] S. K , IWRaV (- SWUVa (- 6] aS a @]RS 4 S a 9Wa d GJ GJ (e J K )/ / IWRaV .,l WCV] S. SWUVa 4 WU [S a 68AF8D 9] a Ef aS[ ) 6] ]_ 5 O Y WUVa :_Of 6] ]_ J K ,,.l WCV] S. IWRaV .,l WCV] S. SWUVa FWa S E4CCBDB 6D84F H8 64@C ) (. /
  • 50. ) (. . )0 JU ( ) JL J a HWSd6] a_] S_ p@f6S 7SaOW HWSd6] a_] S_ z ESUbS fi n ESUbS WRS aWiS_ RSaOW n o z n E4CCBDB 6D84F H8 64@C ) (. 0
  • 51. ) (. . )0 JU ) z JU ) 4J C J 3TS VT JV z fi n fi fi n m n 4J C J 3TS VT JV M 4J C J 3TS VT JV R @interface DetailViewController : UIViewController @property (nonatomic, strong) NSString* imageUrl; @property (nonatomic, strong) NSString* jname; @property (nonatomic, strong) NSString* ename; @end #import <SDWebImage/UIImageView+WebCache.h> @interface DetailViewController () @property (nonatomic, weak) IBOutlet UIImageView* iv; @property (nonatomic, weak) IBOutlet UILabel* tv1; @property (nonatomic, weak) IBOutlet UILabel* tv2; - (IBAction)close:(id)sender; @end @implementation DetailViewController - (void)viewDidLoad { [super viewDidLoad]; [_iv sd_setImageWithURL:[NSURL URLWithString:_imageUrl]]; _tv1.text = _jname; _tv2.text = _ename; } : - (void)close:(id)sender { [self dismissViewControllerAnimated:NO completion:nil]; } E4CCBDB 6D84F H8 64@C ) (. ,
  • 52. ) (. . )0 JU ) ( C J 3TS VT JV z n fi n C J 3TS VT JV R JU ) ) x c z 5Bba Sa fi fl o o o o n m n JU z fi fi n fi n #import "DetailViewController.h" : - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { if ([segue.identifier isEqualToString:@"detail"]) { Item* item = _items[_tableView.indexPathForSelectedRow.row]; DetailViewController* controller = segue.destinationViewController; controller.imageUrl = item.imageUrl; controller.jname = item.jname; controller.ename = item.ename; } } E4CCBDB 6D84F H8 64@C ) (. ,(
  • 53. ) (. . )0 d K e JU 4J C J 3TS VT JV z BPXS aWcS 6 fl fi n6V]] S ] aW] T]_ f]b_ Sd _]XS a1 fi O UbOUS BPXS aWcS 6 fi EdWTa “ yn JU ( c c cfl a BPXS aWcS 6 fl fi n JU ) z JU ) 4J C J 3TS VT JV z fi n fi fi n m n import UIKit import SDWebImage class DetailViewController: UIViewController { var imageUrl:String? var jname:String? var ename:String? @IBOutlet var iv:UIImageView? @IBOutlet var tv1:UILabel? @IBOutlet var tv2:UILabel? override func viewDidLoad() { super.viewDidLoad() iv?.sd_setImage(with: URL(string: imageUrl!)) tv1?.text = jname tv2?.text = ename } : @IBAction func close() { self.dismiss(animated: false, completion: nil) } E4CCBDB 6D84F H8 64@C ) (. ,)
  • 54. ) (. . )0 JU ) ( C J 3TS VT JV z n fi n C J 3TS VT JV W K JU ) ) x c z BPXS aWcS 6 fl fi n JU z fi fi n fi n m w v w ak n wotb override func prepare(for segue: UIStoryboardSegue, sender: Any?) { if segue.identifier == "detail" { let item = items[(tableView?.indexPathForSelectedRow?.row)!] let controller = segue.destination as! DetailViewController controller.imageUrl = item.imageUrl controller.jname = item.jname controller.ename = item.ename } } E4CCBDB 6D84F H8 64@C ) (. ,