SlideShare a Scribd company logo
Creating a Facebook Clone - Part VI
© Codename One 2017 all rights reserved
public class SignupForm extends Form {
Container content = new Container(BoxLayout.y(), "PaddedContainer");
Container south = new Container(BoxLayout.y());
protected SignupForm(String title, String backLabel, Form previous) {
super(title, new BorderLayout());
setUIID("SignupForm");
content.setScrollableY(true);
add(CENTER, content);
getToolbar().setBackCommand(backLabel,
Toolbar.BackCommandPolicy.WHEN_USES_TITLE_OTHERWISE_ARROW,
e -> previous.showBack());
getToolbar().getTitleComponent().setUIID("Title", "TitleLandscape");
Button problem = new Button("Report a Problem", "BlueLink");
south.add(problem);
problem.addActionListener(e ->
sendMessage("Problem with Facebook Clone",
new Message("Details..."),
"mark@facebook.com"));
add(SOUTH, south);
}
SignupForm
public class SignupForm extends Form {
Container content = new Container(BoxLayout.y(), "PaddedContainer");
Container south = new Container(BoxLayout.y());
protected SignupForm(String title, String backLabel, Form previous) {
super(title, new BorderLayout());
setUIID("SignupForm");
content.setScrollableY(true);
add(CENTER, content);
getToolbar().setBackCommand(backLabel,
Toolbar.BackCommandPolicy.WHEN_USES_TITLE_OTHERWISE_ARROW,
e -> previous.showBack());
getToolbar().getTitleComponent().setUIID("Title", "TitleLandscape");
Button problem = new Button("Report a Problem", "BlueLink");
south.add(problem);
problem.addActionListener(e ->
sendMessage("Problem with Facebook Clone",
new Message("Details..."),
"mark@facebook.com"));
add(SOUTH, south);
}
SignupForm
public class SignupForm extends Form {
Container content = new Container(BoxLayout.y(), "PaddedContainer");
Container south = new Container(BoxLayout.y());
protected SignupForm(String title, String backLabel, Form previous) {
super(title, new BorderLayout());
setUIID("SignupForm");
content.setScrollableY(true);
add(CENTER, content);
getToolbar().setBackCommand(backLabel,
Toolbar.BackCommandPolicy.WHEN_USES_TITLE_OTHERWISE_ARROW,
e -> previous.showBack());
getToolbar().getTitleComponent().setUIID("Title", "TitleLandscape");
Button problem = new Button("Report a Problem", "BlueLink");
south.add(problem);
problem.addActionListener(e ->
sendMessage("Problem with Facebook Clone",
new Message("Details..."),
"mark@facebook.com"));
add(SOUTH, south);
}
SignupForm
public class SignupForm extends Form {
Container content = new Container(BoxLayout.y(), "PaddedContainer");
Container south = new Container(BoxLayout.y());
protected SignupForm(String title, String backLabel, Form previous) {
super(title, new BorderLayout());
setUIID("SignupForm");
content.setScrollableY(true);
add(CENTER, content);
getToolbar().setBackCommand(backLabel,
Toolbar.BackCommandPolicy.WHEN_USES_TITLE_OTHERWISE_ARROW,
e -> previous.showBack());
getToolbar().getTitleComponent().setUIID("Title", "TitleLandscape");
Button problem = new Button("Report a Problem", "BlueLink");
south.add(problem);
problem.addActionListener(e ->
sendMessage("Problem with Facebook Clone",
new Message("Details..."),
"mark@facebook.com"));
add(SOUTH, south);
}
SignupForm
public class SignupForm extends Form {
Container content = new Container(BoxLayout.y(), "PaddedContainer");
Container south = new Container(BoxLayout.y());
protected SignupForm(String title, String backLabel, Form previous) {
super(title, new BorderLayout());
setUIID("SignupForm");
content.setScrollableY(true);
add(CENTER, content);
getToolbar().setBackCommand(backLabel,
Toolbar.BackCommandPolicy.WHEN_USES_TITLE_OTHERWISE_ARROW,
e -> previous.showBack());
getToolbar().getTitleComponent().setUIID("Title", "TitleLandscape");
Button problem = new Button("Report a Problem", "BlueLink");
south.add(problem);
problem.addActionListener(e ->
sendMessage("Problem with Facebook Clone",
new Message("Details..."),
"mark@facebook.com"));
add(SOUTH, south);
}
SignupForm
public class SignupForm extends Form {
Container content = new Container(BoxLayout.y(), "PaddedContainer");
Container south = new Container(BoxLayout.y());
protected SignupForm(String title, String backLabel, Form previous) {
super(title, new BorderLayout());
setUIID("SignupForm");
content.setScrollableY(true);
add(CENTER, content);
getToolbar().setBackCommand(backLabel,
Toolbar.BackCommandPolicy.WHEN_USES_TITLE_OTHERWISE_ARROW,
e -> previous.showBack());
getToolbar().getTitleComponent().setUIID("Title", "TitleLandscape");
Button problem = new Button("Report a Problem", "BlueLink");
south.add(problem);
problem.addActionListener(e ->
sendMessage("Problem with Facebook Clone",
new Message("Details..."),
"mark@facebook.com"));
add(SOUTH, south);
}
SignupForm
add(CENTER, content);
getToolbar().setBackCommand(backLabel,
Toolbar.BackCommandPolicy.WHEN_USES_TITLE_OTHERWISE_ARROW,
e -> previous.showBack());
getToolbar().getTitleComponent().setUIID("Title", "TitleLandscape");
Button problem = new Button("Report a Problem", "BlueLink");
south.add(problem);
problem.addActionListener(e ->
sendMessage("Problem with Facebook Clone",
new Message("Details..."),
"mark@facebook.com"));
add(SOUTH, south);
}
Button createNextButton(ActionListener al) {
Button next = new Button("Next", "NextButton");
next.addActionListener(al);
return next;
}
public static SignupForm createTerms() {
SignupForm s = new SignupForm("Create Account", "Sign In",
getCurrentForm());
Label title = new Label("Terms & Conditions", "SignupSubHeader");
SignupForm
© Codename One 2017 all rights reserved
© Codename One 2017 all rights reserved
next.addActionListener(al);
return next;
}
public static SignupForm createTerms() {
SignupForm s = new SignupForm("Create Account", "Sign In",
getCurrentForm());
Label title = new Label("Terms & Conditions", "SignupSubHeader");
RichTextView rt = new RichTextView("By signing up you agree to our "
+ "<a href="terms">Facebook Terms</a> and that you have "
+ "read our <a href="data-policy">Data Policy</a>, including "
+ "our <a href="cookie-use">Cookie Use</a>.");
rt.setAlignment(CENTER);
rt.setUIID("PaddedContainer");
Button next = s.createNextButton(e -> createName().show());
next.setText("I Agree");
rt.addLinkListener(e -> {
String link = (String)e.getSource();
execute("https://www.codenameone.com/");
});
s.content.addAll(title, rt, next);
return s;
}
createTerms
next.addActionListener(al);
return next;
}
public static SignupForm createTerms() {
SignupForm s = new SignupForm("Create Account", "Sign In",
getCurrentForm());
Label title = new Label("Terms & Conditions", "SignupSubHeader");
RichTextView rt = new RichTextView("By signing up you agree to our "
+ "<a href="terms">Facebook Terms</a> and that you have "
+ "read our <a href="data-policy">Data Policy</a>, including "
+ "our <a href="cookie-use">Cookie Use</a>.");
rt.setAlignment(CENTER);
rt.setUIID("PaddedContainer");
Button next = s.createNextButton(e -> createName().show());
next.setText("I Agree");
rt.addLinkListener(e -> {
String link = (String)e.getSource();
execute("https://www.codenameone.com/");
});
s.content.addAll(title, rt, next);
return s;
}
createTerms
next.addActionListener(al);
return next;
}
public static SignupForm createTerms() {
SignupForm s = new SignupForm("Create Account", "Sign In",
getCurrentForm());
Label title = new Label("Terms & Conditions", "SignupSubHeader");
RichTextView rt = new RichTextView("By signing up you agree to our "
+ "<a href="terms">Facebook Terms</a> and that you have "
+ "read our <a href="data-policy">Data Policy</a>, including "
+ "our <a href="cookie-use">Cookie Use</a>.");
rt.setAlignment(CENTER);
rt.setUIID("PaddedContainer");
Button next = s.createNextButton(e -> createName().show());
next.setText("I Agree");
rt.addLinkListener(e -> {
String link = (String)e.getSource();
execute("https://www.codenameone.com/");
});
s.content.addAll(title, rt, next);
return s;
}
createTerms
next.addActionListener(al);
return next;
}
public static SignupForm createTerms() {
SignupForm s = new SignupForm("Create Account", "Sign In",
getCurrentForm());
Label title = new Label("Terms & Conditions", "SignupSubHeader");
RichTextView rt = new RichTextView("By signing up you agree to our "
+ "<a href="terms">Facebook Terms</a> and that you have "
+ "read our <a href="data-policy">Data Policy</a>, including "
+ "our <a href="cookie-use">Cookie Use</a>.");
rt.setAlignment(CENTER);
rt.setUIID("PaddedContainer");
Button next = s.createNextButton(e -> createName().show());
next.setText("I Agree");
rt.addLinkListener(e -> {
String link = (String)e.getSource();
execute("https://www.codenameone.com/");
});
s.content.addAll(title, rt, next);
return s;
}
createTerms
next.addActionListener(al);
return next;
}
public static SignupForm createTerms() {
SignupForm s = new SignupForm("Create Account", "Sign In",
getCurrentForm());
Label title = new Label("Terms & Conditions", "SignupSubHeader");
RichTextView rt = new RichTextView("By signing up you agree to our "
+ "<a href="terms">Facebook Terms</a> and that you have "
+ "read our <a href="data-policy">Data Policy</a>, including "
+ "our <a href="cookie-use">Cookie Use</a>.");
rt.setAlignment(CENTER);
rt.setUIID("PaddedContainer");
Button next = s.createNextButton(e -> createName().show());
next.setText("I Agree");
rt.addLinkListener(e -> {
String link = (String)e.getSource();
execute("https://www.codenameone.com/");
});
s.content.addAll(title, rt, next);
return s;
}
createTerms
© Codename One 2017 all rights reserved
#Constants {
includeNativeBool: true;
scrollVisibleBool: false;
labelGap: 2;
capsButtonUiids: "BlueText,GreenButton,BlueButton,NextButton";
landscapeTitleUiidBool: true;
}
/** unchanged **/
Toolbar {
padding: 1mm;
border: none;
background-color: #4367b3;
}
Title {
font-family: "native:MainLight";
font-size: 4mm;
padding: 2mm 1mm 2mm 1mm;
margin: 0px;
color: white;
theme.css
#Constants {
includeNativeBool: true;
scrollVisibleBool: false;
labelGap: 2;
capsButtonUiids: "BlueText,GreenButton,BlueButton,NextButton";
landscapeTitleUiidBool: true;
}
/** unchanged **/
Toolbar {
padding: 1mm;
border: none;
background-color: #4367b3;
}
Title {
font-family: "native:MainLight";
font-size: 4mm;
padding: 2mm 1mm 2mm 1mm;
margin: 0px;
color: white;
theme.css
/** unchanged **/
Toolbar {
padding: 1mm;
border: none;
background-color: #4367b3;
}
Title {
font-family: "native:MainLight";
font-size: 4mm;
padding: 2mm 1mm 2mm 1mm;
margin: 0px;
color: white;
}
TitleCommand {
font-family: "native:MainLight";
font-size: 2.5mm;
padding: 1mm;
margin: 0px;
color: white;
}
BackCommand {
font-family: "native:MainLight";
font-size: 2.5mm;
theme.css
/** unchanged **/
Toolbar {
padding: 1mm;
border: none;
background-color: #4367b3;
}
Title {
font-family: "native:MainLight";
font-size: 4mm;
padding: 2mm 1mm 2mm 1mm;
margin: 0px;
color: white;
}
TitleCommand {
font-family: "native:MainLight";
font-size: 2.5mm;
padding: 1mm;
margin: 0px;
color: white;
}
BackCommand {
font-family: "native:MainLight";
font-size: 2.5mm;
theme.css
}
TitleCommand {
font-family: "native:MainLight";
font-size: 2.5mm;
padding: 1mm;
margin: 0px;
color: white;
}
BackCommand {
font-family: "native:MainLight";
font-size: 2.5mm;
padding: 3mm 0.5mm 3mm 0.5mm;
margin: 0px;
color: white;
}
ToolbarLandscpae {
padding: 0.5mm;
border: none;
background-color: #4367b3;
}
TitleLandscape {
font-family: "native:MainLight";
font-size: 3mm;
padding: 0px;
theme.css
}
TitleCommand {
font-family: "native:MainLight";
font-size: 2.5mm;
padding: 1mm;
margin: 0px;
color: white;
}
BackCommand {
font-family: "native:MainLight";
font-size: 2.5mm;
padding: 3mm 0.5mm 3mm 0.5mm;
margin: 0px;
color: white;
}
ToolbarLandscpae {
padding: 0.5mm;
border: none;
background-color: #4367b3;
}
TitleLandscape {
font-family: "native:MainLight";
font-size: 3mm;
padding: 0px;
theme.css
}
ToolbarLandscpae {
padding: 0.5mm;
border: none;
background-color: #4367b3;
}
TitleLandscape {
font-family: "native:MainLight";
font-size: 3mm;
padding: 0px;
margin: 0px;
color: white;
}
TitleCommandLandscape {
font-family: "native:MainLight";
font-size: 2.5mm;
padding: 0px 1mm 0px 1mm;
margin: 0px;
color: white;
}
BackCommandLandscape {
font-family: "native:MainLight";
font-size: 2.5mm;
padding: 0px 1mm 0px 1mm;
theme.css
}
TitleLandscape {
font-family: "native:MainLight";
font-size: 3mm;
padding: 0px;
margin: 0px;
color: white;
}
TitleCommandLandscape {
font-family: "native:MainLight";
font-size: 2.5mm;
padding: 0px 1mm 0px 1mm;
margin: 0px;
color: white;
}
BackCommandLandscape {
font-family: "native:MainLight";
font-size: 2.5mm;
padding: 0px 1mm 0px 1mm;
margin: 0px;
color: white;
}
SignupSubHeader {
font-family: "native:MainBold";
theme.css
font-family: "native:MainLight";
font-size: 2.5mm;
padding: 0px 1mm 0px 1mm;
margin: 0px;
color: white;
}
SignupSubHeader {
font-family: "native:MainBold";
font-size: 3mm;
text-align: center;
margin: 0px;
padding: 3mm;
}
SignupForm {
background-color: #F6F7F8;
cn1-derive: SplashForm;
}
NextButton {
cn1-derive: BlueButtonOnBlueBackground;
margin-top: 3.5mm;
}
BlueLink {
cn1-derive: BaseButton;
color: blue;
theme.css
font-family: "native:MainLight";
font-size: 2.5mm;
padding: 0px 1mm 0px 1mm;
margin: 0px;
color: white;
}
SignupSubHeader {
font-family: "native:MainBold";
font-size: 3mm;
text-align: center;
margin: 0px;
padding: 3mm;
}
SignupForm {
background-color: #F6F7F8;
cn1-derive: SplashForm;
}
NextButton {
cn1-derive: BlueButtonOnBlueBackground;
margin-top: 3.5mm;
}
BlueLink {
cn1-derive: BaseButton;
color: blue;
theme.css
font-family: "native:MainLight";
font-size: 2.5mm;
padding: 0px 1mm 0px 1mm;
margin: 0px;
color: white;
}
SignupSubHeader {
font-family: "native:MainBold";
font-size: 3mm;
text-align: center;
margin: 0px;
padding: 3mm;
}
SignupForm {
background-color: #F6F7F8;
cn1-derive: SplashForm;
}
NextButton {
cn1-derive: BlueButtonOnBlueBackground;
margin-top: 3.5mm;
}
BlueLink {
cn1-derive: BaseButton;
color: blue;
theme.css
color: white;
}
SignupSubHeader {
font-family: "native:MainBold";
font-size: 3mm;
text-align: center;
margin: 0px;
padding: 3mm;
}
SignupForm {
background-color: #F6F7F8;
cn1-derive: SplashForm;
}
NextButton {
cn1-derive: BlueButtonOnBlueBackground;
margin-top: 3.5mm;
}
BlueLink {
cn1-derive: BaseButton;
color: blue;
font-size: 2.2mm;
padding: 1.5mm;
font-family: "native:MainLight";
}
theme.css

More Related Content

PDF
Creating a Facebook Clone - Part VI - Transcript.pdf
PDF
Creating a Facebook Clone - Part XXVIII.pdf
PDF
Creating a Facebook Clone - Part XXVIII - Transcript.pdf
PDF
Creating a Facebook Clone - Part IV.pdf
PDF
Creating a Facebook Clone - Part VIII.pdf
PDF
Creating a Facebook Clone - Part VIII - Transcript.pdf
PDF
Creating a Facebook Clone - Part VII.pdf
PDF
Creating a Facebook Clone - Part IV - Transcript.pdf
Creating a Facebook Clone - Part VI - Transcript.pdf
Creating a Facebook Clone - Part XXVIII.pdf
Creating a Facebook Clone - Part XXVIII - Transcript.pdf
Creating a Facebook Clone - Part IV.pdf
Creating a Facebook Clone - Part VIII.pdf
Creating a Facebook Clone - Part VIII - Transcript.pdf
Creating a Facebook Clone - Part VII.pdf
Creating a Facebook Clone - Part IV - Transcript.pdf

Similar to Creating a Facebook Clone - Part VI.pdf (20)

PDF
Creating a Facebook Clone - Part III.pdf
PDF
Creating a Facebook Clone - Part XXX.pdf
PDF
Creating an Uber Clone - Part V.pdf
PDF
Creating a Facebook Clone - Part XLVI.pdf
PDF
Creating a Facebook Clone - Part XXXVII.pdf
PDF
Creating a Whatsapp Clone - Part X.pdf
PDF
Creating a Facebook Clone - Part XVI.pdf
PDF
Creating a Whatsapp Clone - Part X - Transcript.pdf
PDF
Creating a Whatsapp Clone - Part V - Transcript.pdf
PDF
Creating a Facebook Clone - Part XVI - Transcript.pdf
PDF
Creating a Facebook Clone - Part V - Transcript.pdf
PDF
Creating a Facebook Clone - Part XLVI - Transcript.pdf
PDF
Creating an Uber Clone - Part V - Transcript.pdf
PDF
Creating a Whatsapp Clone - Part V.pdf
PDF
Creating a Facebook Clone - Part XLIII.pdf
PDF
Creating a Facebook Clone - Part IX.pdf
PDF
Creating an Uber - Part VI.pdf
PDF
Creating an Uber - Part VI - Transcript.pdf
PDF
Building web apps with vaadin 10
PDF
Creating a Facebook Clone - Part III - Transcript.pdf
Creating a Facebook Clone - Part III.pdf
Creating a Facebook Clone - Part XXX.pdf
Creating an Uber Clone - Part V.pdf
Creating a Facebook Clone - Part XLVI.pdf
Creating a Facebook Clone - Part XXXVII.pdf
Creating a Whatsapp Clone - Part X.pdf
Creating a Facebook Clone - Part XVI.pdf
Creating a Whatsapp Clone - Part X - Transcript.pdf
Creating a Whatsapp Clone - Part V - Transcript.pdf
Creating a Facebook Clone - Part XVI - Transcript.pdf
Creating a Facebook Clone - Part V - Transcript.pdf
Creating a Facebook Clone - Part XLVI - Transcript.pdf
Creating an Uber Clone - Part V - Transcript.pdf
Creating a Whatsapp Clone - Part V.pdf
Creating a Facebook Clone - Part XLIII.pdf
Creating a Facebook Clone - Part IX.pdf
Creating an Uber - Part VI.pdf
Creating an Uber - Part VI - Transcript.pdf
Building web apps with vaadin 10
Creating a Facebook Clone - Part III - Transcript.pdf

More from ShaiAlmog1 (20)

PDF
The Duck Teaches Learn to debug from the masters. Local to production- kill ...
PDF
create-netflix-clone-06-client-ui.pdf
PDF
create-netflix-clone-01-introduction_transcript.pdf
PDF
create-netflix-clone-02-server_transcript.pdf
PDF
create-netflix-clone-04-server-continued_transcript.pdf
PDF
create-netflix-clone-01-introduction.pdf
PDF
create-netflix-clone-06-client-ui_transcript.pdf
PDF
create-netflix-clone-03-server.pdf
PDF
create-netflix-clone-04-server-continued.pdf
PDF
create-netflix-clone-05-client-model_transcript.pdf
PDF
create-netflix-clone-03-server_transcript.pdf
PDF
create-netflix-clone-02-server.pdf
PDF
create-netflix-clone-05-client-model.pdf
PDF
Creating a Whatsapp Clone - Part II.pdf
PDF
Creating a Whatsapp Clone - Part IX - Transcript.pdf
PDF
Creating a Whatsapp Clone - Part II - Transcript.pdf
PDF
Creating a Whatsapp Clone - Part IV - Transcript.pdf
PDF
Creating a Whatsapp Clone - Part IV.pdf
PDF
Creating a Whatsapp Clone - Part I - Transcript.pdf
PDF
Creating a Whatsapp Clone - Part IX.pdf
The Duck Teaches Learn to debug from the masters. Local to production- kill ...
create-netflix-clone-06-client-ui.pdf
create-netflix-clone-01-introduction_transcript.pdf
create-netflix-clone-02-server_transcript.pdf
create-netflix-clone-04-server-continued_transcript.pdf
create-netflix-clone-01-introduction.pdf
create-netflix-clone-06-client-ui_transcript.pdf
create-netflix-clone-03-server.pdf
create-netflix-clone-04-server-continued.pdf
create-netflix-clone-05-client-model_transcript.pdf
create-netflix-clone-03-server_transcript.pdf
create-netflix-clone-02-server.pdf
create-netflix-clone-05-client-model.pdf
Creating a Whatsapp Clone - Part II.pdf
Creating a Whatsapp Clone - Part IX - Transcript.pdf
Creating a Whatsapp Clone - Part II - Transcript.pdf
Creating a Whatsapp Clone - Part IV - Transcript.pdf
Creating a Whatsapp Clone - Part IV.pdf
Creating a Whatsapp Clone - Part I - Transcript.pdf
Creating a Whatsapp Clone - Part IX.pdf

Recently uploaded (20)

PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
cuic standard and advanced reporting.pdf
PPTX
sap open course for s4hana steps from ECC to s4
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
Spectroscopy.pptx food analysis technology
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
KodekX | Application Modernization Development
PPTX
MYSQL Presentation for SQL database connectivity
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Machine learning based COVID-19 study performance prediction
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
20250228 LYD VKU AI Blended-Learning.pptx
NewMind AI Weekly Chronicles - August'25 Week I
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Reach Out and Touch Someone: Haptics and Empathic Computing
cuic standard and advanced reporting.pdf
sap open course for s4hana steps from ECC to s4
Understanding_Digital_Forensics_Presentation.pptx
Spectroscopy.pptx food analysis technology
Advanced methodologies resolving dimensionality complications for autism neur...
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
“AI and Expert System Decision Support & Business Intelligence Systems”
Programs and apps: productivity, graphics, security and other tools
KodekX | Application Modernization Development
MYSQL Presentation for SQL database connectivity
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Review of recent advances in non-invasive hemoglobin estimation
Machine learning based COVID-19 study performance prediction

Creating a Facebook Clone - Part VI.pdf

  • 1. Creating a Facebook Clone - Part VI
  • 2. © Codename One 2017 all rights reserved
  • 3. public class SignupForm extends Form { Container content = new Container(BoxLayout.y(), "PaddedContainer"); Container south = new Container(BoxLayout.y()); protected SignupForm(String title, String backLabel, Form previous) { super(title, new BorderLayout()); setUIID("SignupForm"); content.setScrollableY(true); add(CENTER, content); getToolbar().setBackCommand(backLabel, Toolbar.BackCommandPolicy.WHEN_USES_TITLE_OTHERWISE_ARROW, e -> previous.showBack()); getToolbar().getTitleComponent().setUIID("Title", "TitleLandscape"); Button problem = new Button("Report a Problem", "BlueLink"); south.add(problem); problem.addActionListener(e -> sendMessage("Problem with Facebook Clone", new Message("Details..."), "mark@facebook.com")); add(SOUTH, south); } SignupForm
  • 4. public class SignupForm extends Form { Container content = new Container(BoxLayout.y(), "PaddedContainer"); Container south = new Container(BoxLayout.y()); protected SignupForm(String title, String backLabel, Form previous) { super(title, new BorderLayout()); setUIID("SignupForm"); content.setScrollableY(true); add(CENTER, content); getToolbar().setBackCommand(backLabel, Toolbar.BackCommandPolicy.WHEN_USES_TITLE_OTHERWISE_ARROW, e -> previous.showBack()); getToolbar().getTitleComponent().setUIID("Title", "TitleLandscape"); Button problem = new Button("Report a Problem", "BlueLink"); south.add(problem); problem.addActionListener(e -> sendMessage("Problem with Facebook Clone", new Message("Details..."), "mark@facebook.com")); add(SOUTH, south); } SignupForm
  • 5. public class SignupForm extends Form { Container content = new Container(BoxLayout.y(), "PaddedContainer"); Container south = new Container(BoxLayout.y()); protected SignupForm(String title, String backLabel, Form previous) { super(title, new BorderLayout()); setUIID("SignupForm"); content.setScrollableY(true); add(CENTER, content); getToolbar().setBackCommand(backLabel, Toolbar.BackCommandPolicy.WHEN_USES_TITLE_OTHERWISE_ARROW, e -> previous.showBack()); getToolbar().getTitleComponent().setUIID("Title", "TitleLandscape"); Button problem = new Button("Report a Problem", "BlueLink"); south.add(problem); problem.addActionListener(e -> sendMessage("Problem with Facebook Clone", new Message("Details..."), "mark@facebook.com")); add(SOUTH, south); } SignupForm
  • 6. public class SignupForm extends Form { Container content = new Container(BoxLayout.y(), "PaddedContainer"); Container south = new Container(BoxLayout.y()); protected SignupForm(String title, String backLabel, Form previous) { super(title, new BorderLayout()); setUIID("SignupForm"); content.setScrollableY(true); add(CENTER, content); getToolbar().setBackCommand(backLabel, Toolbar.BackCommandPolicy.WHEN_USES_TITLE_OTHERWISE_ARROW, e -> previous.showBack()); getToolbar().getTitleComponent().setUIID("Title", "TitleLandscape"); Button problem = new Button("Report a Problem", "BlueLink"); south.add(problem); problem.addActionListener(e -> sendMessage("Problem with Facebook Clone", new Message("Details..."), "mark@facebook.com")); add(SOUTH, south); } SignupForm
  • 7. public class SignupForm extends Form { Container content = new Container(BoxLayout.y(), "PaddedContainer"); Container south = new Container(BoxLayout.y()); protected SignupForm(String title, String backLabel, Form previous) { super(title, new BorderLayout()); setUIID("SignupForm"); content.setScrollableY(true); add(CENTER, content); getToolbar().setBackCommand(backLabel, Toolbar.BackCommandPolicy.WHEN_USES_TITLE_OTHERWISE_ARROW, e -> previous.showBack()); getToolbar().getTitleComponent().setUIID("Title", "TitleLandscape"); Button problem = new Button("Report a Problem", "BlueLink"); south.add(problem); problem.addActionListener(e -> sendMessage("Problem with Facebook Clone", new Message("Details..."), "mark@facebook.com")); add(SOUTH, south); } SignupForm
  • 8. public class SignupForm extends Form { Container content = new Container(BoxLayout.y(), "PaddedContainer"); Container south = new Container(BoxLayout.y()); protected SignupForm(String title, String backLabel, Form previous) { super(title, new BorderLayout()); setUIID("SignupForm"); content.setScrollableY(true); add(CENTER, content); getToolbar().setBackCommand(backLabel, Toolbar.BackCommandPolicy.WHEN_USES_TITLE_OTHERWISE_ARROW, e -> previous.showBack()); getToolbar().getTitleComponent().setUIID("Title", "TitleLandscape"); Button problem = new Button("Report a Problem", "BlueLink"); south.add(problem); problem.addActionListener(e -> sendMessage("Problem with Facebook Clone", new Message("Details..."), "mark@facebook.com")); add(SOUTH, south); } SignupForm
  • 9. add(CENTER, content); getToolbar().setBackCommand(backLabel, Toolbar.BackCommandPolicy.WHEN_USES_TITLE_OTHERWISE_ARROW, e -> previous.showBack()); getToolbar().getTitleComponent().setUIID("Title", "TitleLandscape"); Button problem = new Button("Report a Problem", "BlueLink"); south.add(problem); problem.addActionListener(e -> sendMessage("Problem with Facebook Clone", new Message("Details..."), "mark@facebook.com")); add(SOUTH, south); } Button createNextButton(ActionListener al) { Button next = new Button("Next", "NextButton"); next.addActionListener(al); return next; } public static SignupForm createTerms() { SignupForm s = new SignupForm("Create Account", "Sign In", getCurrentForm()); Label title = new Label("Terms & Conditions", "SignupSubHeader"); SignupForm
  • 10. © Codename One 2017 all rights reserved
  • 11. © Codename One 2017 all rights reserved
  • 12. next.addActionListener(al); return next; } public static SignupForm createTerms() { SignupForm s = new SignupForm("Create Account", "Sign In", getCurrentForm()); Label title = new Label("Terms & Conditions", "SignupSubHeader"); RichTextView rt = new RichTextView("By signing up you agree to our " + "<a href="terms">Facebook Terms</a> and that you have " + "read our <a href="data-policy">Data Policy</a>, including " + "our <a href="cookie-use">Cookie Use</a>."); rt.setAlignment(CENTER); rt.setUIID("PaddedContainer"); Button next = s.createNextButton(e -> createName().show()); next.setText("I Agree"); rt.addLinkListener(e -> { String link = (String)e.getSource(); execute("https://www.codenameone.com/"); }); s.content.addAll(title, rt, next); return s; } createTerms
  • 13. next.addActionListener(al); return next; } public static SignupForm createTerms() { SignupForm s = new SignupForm("Create Account", "Sign In", getCurrentForm()); Label title = new Label("Terms & Conditions", "SignupSubHeader"); RichTextView rt = new RichTextView("By signing up you agree to our " + "<a href="terms">Facebook Terms</a> and that you have " + "read our <a href="data-policy">Data Policy</a>, including " + "our <a href="cookie-use">Cookie Use</a>."); rt.setAlignment(CENTER); rt.setUIID("PaddedContainer"); Button next = s.createNextButton(e -> createName().show()); next.setText("I Agree"); rt.addLinkListener(e -> { String link = (String)e.getSource(); execute("https://www.codenameone.com/"); }); s.content.addAll(title, rt, next); return s; } createTerms
  • 14. next.addActionListener(al); return next; } public static SignupForm createTerms() { SignupForm s = new SignupForm("Create Account", "Sign In", getCurrentForm()); Label title = new Label("Terms & Conditions", "SignupSubHeader"); RichTextView rt = new RichTextView("By signing up you agree to our " + "<a href="terms">Facebook Terms</a> and that you have " + "read our <a href="data-policy">Data Policy</a>, including " + "our <a href="cookie-use">Cookie Use</a>."); rt.setAlignment(CENTER); rt.setUIID("PaddedContainer"); Button next = s.createNextButton(e -> createName().show()); next.setText("I Agree"); rt.addLinkListener(e -> { String link = (String)e.getSource(); execute("https://www.codenameone.com/"); }); s.content.addAll(title, rt, next); return s; } createTerms
  • 15. next.addActionListener(al); return next; } public static SignupForm createTerms() { SignupForm s = new SignupForm("Create Account", "Sign In", getCurrentForm()); Label title = new Label("Terms & Conditions", "SignupSubHeader"); RichTextView rt = new RichTextView("By signing up you agree to our " + "<a href="terms">Facebook Terms</a> and that you have " + "read our <a href="data-policy">Data Policy</a>, including " + "our <a href="cookie-use">Cookie Use</a>."); rt.setAlignment(CENTER); rt.setUIID("PaddedContainer"); Button next = s.createNextButton(e -> createName().show()); next.setText("I Agree"); rt.addLinkListener(e -> { String link = (String)e.getSource(); execute("https://www.codenameone.com/"); }); s.content.addAll(title, rt, next); return s; } createTerms
  • 16. next.addActionListener(al); return next; } public static SignupForm createTerms() { SignupForm s = new SignupForm("Create Account", "Sign In", getCurrentForm()); Label title = new Label("Terms & Conditions", "SignupSubHeader"); RichTextView rt = new RichTextView("By signing up you agree to our " + "<a href="terms">Facebook Terms</a> and that you have " + "read our <a href="data-policy">Data Policy</a>, including " + "our <a href="cookie-use">Cookie Use</a>."); rt.setAlignment(CENTER); rt.setUIID("PaddedContainer"); Button next = s.createNextButton(e -> createName().show()); next.setText("I Agree"); rt.addLinkListener(e -> { String link = (String)e.getSource(); execute("https://www.codenameone.com/"); }); s.content.addAll(title, rt, next); return s; } createTerms
  • 17. © Codename One 2017 all rights reserved
  • 18. #Constants { includeNativeBool: true; scrollVisibleBool: false; labelGap: 2; capsButtonUiids: "BlueText,GreenButton,BlueButton,NextButton"; landscapeTitleUiidBool: true; } /** unchanged **/ Toolbar { padding: 1mm; border: none; background-color: #4367b3; } Title { font-family: "native:MainLight"; font-size: 4mm; padding: 2mm 1mm 2mm 1mm; margin: 0px; color: white; theme.css
  • 19. #Constants { includeNativeBool: true; scrollVisibleBool: false; labelGap: 2; capsButtonUiids: "BlueText,GreenButton,BlueButton,NextButton"; landscapeTitleUiidBool: true; } /** unchanged **/ Toolbar { padding: 1mm; border: none; background-color: #4367b3; } Title { font-family: "native:MainLight"; font-size: 4mm; padding: 2mm 1mm 2mm 1mm; margin: 0px; color: white; theme.css
  • 20. /** unchanged **/ Toolbar { padding: 1mm; border: none; background-color: #4367b3; } Title { font-family: "native:MainLight"; font-size: 4mm; padding: 2mm 1mm 2mm 1mm; margin: 0px; color: white; } TitleCommand { font-family: "native:MainLight"; font-size: 2.5mm; padding: 1mm; margin: 0px; color: white; } BackCommand { font-family: "native:MainLight"; font-size: 2.5mm; theme.css
  • 21. /** unchanged **/ Toolbar { padding: 1mm; border: none; background-color: #4367b3; } Title { font-family: "native:MainLight"; font-size: 4mm; padding: 2mm 1mm 2mm 1mm; margin: 0px; color: white; } TitleCommand { font-family: "native:MainLight"; font-size: 2.5mm; padding: 1mm; margin: 0px; color: white; } BackCommand { font-family: "native:MainLight"; font-size: 2.5mm; theme.css
  • 22. } TitleCommand { font-family: "native:MainLight"; font-size: 2.5mm; padding: 1mm; margin: 0px; color: white; } BackCommand { font-family: "native:MainLight"; font-size: 2.5mm; padding: 3mm 0.5mm 3mm 0.5mm; margin: 0px; color: white; } ToolbarLandscpae { padding: 0.5mm; border: none; background-color: #4367b3; } TitleLandscape { font-family: "native:MainLight"; font-size: 3mm; padding: 0px; theme.css
  • 23. } TitleCommand { font-family: "native:MainLight"; font-size: 2.5mm; padding: 1mm; margin: 0px; color: white; } BackCommand { font-family: "native:MainLight"; font-size: 2.5mm; padding: 3mm 0.5mm 3mm 0.5mm; margin: 0px; color: white; } ToolbarLandscpae { padding: 0.5mm; border: none; background-color: #4367b3; } TitleLandscape { font-family: "native:MainLight"; font-size: 3mm; padding: 0px; theme.css
  • 24. } ToolbarLandscpae { padding: 0.5mm; border: none; background-color: #4367b3; } TitleLandscape { font-family: "native:MainLight"; font-size: 3mm; padding: 0px; margin: 0px; color: white; } TitleCommandLandscape { font-family: "native:MainLight"; font-size: 2.5mm; padding: 0px 1mm 0px 1mm; margin: 0px; color: white; } BackCommandLandscape { font-family: "native:MainLight"; font-size: 2.5mm; padding: 0px 1mm 0px 1mm; theme.css
  • 25. } TitleLandscape { font-family: "native:MainLight"; font-size: 3mm; padding: 0px; margin: 0px; color: white; } TitleCommandLandscape { font-family: "native:MainLight"; font-size: 2.5mm; padding: 0px 1mm 0px 1mm; margin: 0px; color: white; } BackCommandLandscape { font-family: "native:MainLight"; font-size: 2.5mm; padding: 0px 1mm 0px 1mm; margin: 0px; color: white; } SignupSubHeader { font-family: "native:MainBold"; theme.css
  • 26. font-family: "native:MainLight"; font-size: 2.5mm; padding: 0px 1mm 0px 1mm; margin: 0px; color: white; } SignupSubHeader { font-family: "native:MainBold"; font-size: 3mm; text-align: center; margin: 0px; padding: 3mm; } SignupForm { background-color: #F6F7F8; cn1-derive: SplashForm; } NextButton { cn1-derive: BlueButtonOnBlueBackground; margin-top: 3.5mm; } BlueLink { cn1-derive: BaseButton; color: blue; theme.css
  • 27. font-family: "native:MainLight"; font-size: 2.5mm; padding: 0px 1mm 0px 1mm; margin: 0px; color: white; } SignupSubHeader { font-family: "native:MainBold"; font-size: 3mm; text-align: center; margin: 0px; padding: 3mm; } SignupForm { background-color: #F6F7F8; cn1-derive: SplashForm; } NextButton { cn1-derive: BlueButtonOnBlueBackground; margin-top: 3.5mm; } BlueLink { cn1-derive: BaseButton; color: blue; theme.css
  • 28. font-family: "native:MainLight"; font-size: 2.5mm; padding: 0px 1mm 0px 1mm; margin: 0px; color: white; } SignupSubHeader { font-family: "native:MainBold"; font-size: 3mm; text-align: center; margin: 0px; padding: 3mm; } SignupForm { background-color: #F6F7F8; cn1-derive: SplashForm; } NextButton { cn1-derive: BlueButtonOnBlueBackground; margin-top: 3.5mm; } BlueLink { cn1-derive: BaseButton; color: blue; theme.css
  • 29. color: white; } SignupSubHeader { font-family: "native:MainBold"; font-size: 3mm; text-align: center; margin: 0px; padding: 3mm; } SignupForm { background-color: #F6F7F8; cn1-derive: SplashForm; } NextButton { cn1-derive: BlueButtonOnBlueBackground; margin-top: 3.5mm; } BlueLink { cn1-derive: BaseButton; color: blue; font-size: 2.2mm; padding: 1.5mm; font-family: "native:MainLight"; } theme.css