Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
IOTClient
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lola
IOTClient
Commits
2cf221ae
Commit
2cf221ae
authored
Dec 10, 2018
by
DESKTOP-NFGF3PG\zxa01
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simplify HomeFragment.java
parent
218fc325
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
58 deletions
+6
-58
.idea/vcs.xml
.idea/vcs.xml
+6
-0
app/src/main/java/com/example/zxa01/iotclient/home/HomeFragment.java
...n/java/com/example/zxa01/iotclient/home/HomeFragment.java
+0
-58
No files found.
.idea/vcs.xml
0 → 100644
View file @
2cf221ae
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"VcsDirectoryMappings"
>
<mapping
directory=
"$PROJECT_DIR$"
vcs=
"Git"
/>
</component>
</project>
\ No newline at end of file
app/src/main/java/com/example/zxa01/iotclient/home/HomeFragment.java
View file @
2cf221ae
...
...
@@ -10,71 +10,24 @@ import android.view.ViewGroup;
import
com.example.zxa01.iotclient.R
;
/**
* A simple {@link Fragment} subclass.
* Activities that contain this fragment must implement the
* {@link HomeFragment.OnFragmentInteractionListener} interface
* to handle interaction events.
* Use the {@link HomeFragment#newInstance} factory method to
* create an instance of this fragment.
*/
public
class
HomeFragment
extends
Fragment
{
// TODO: Rename parameter arguments, choose names that match
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
private
static
final
String
ARG_PARAM1
=
"param1"
;
private
static
final
String
ARG_PARAM2
=
"param2"
;
// TODO: Rename and change types of parameters
private
String
mParam1
;
private
String
mParam2
;
private
OnFragmentInteractionListener
mListener
;
public
HomeFragment
()
{
// Required empty public constructor
}
/**
* Use this factory method to create a new instance of
* this fragment using the provided parameters.
*
* @param param1 Parameter 1.
* @param param2 Parameter 2.
* @return A new instance of fragment HomeFragment.
*/
// TODO: Rename and change types and number of parameters
public
static
HomeFragment
newInstance
(
String
param1
,
String
param2
)
{
HomeFragment
fragment
=
new
HomeFragment
();
Bundle
args
=
new
Bundle
();
args
.
putString
(
ARG_PARAM1
,
param1
);
args
.
putString
(
ARG_PARAM2
,
param2
);
fragment
.
setArguments
(
args
);
return
fragment
;
}
@Override
public
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
if
(
getArguments
()
!=
null
)
{
mParam1
=
getArguments
().
getString
(
ARG_PARAM1
);
mParam2
=
getArguments
().
getString
(
ARG_PARAM2
);
}
}
@Override
public
View
onCreateView
(
LayoutInflater
inflater
,
ViewGroup
container
,
Bundle
savedInstanceState
)
{
// Inflate the layout for this fragment
return
inflater
.
inflate
(
R
.
layout
.
fragment_home
,
container
,
false
);
}
// TODO: Rename method, update argument and hook method into UI event
public
void
onButtonPressed
(
Uri
uri
)
{
if
(
mListener
!=
null
)
{
mListener
.
onFragmentInteraction
(
uri
);
}
}
@Override
public
void
onAttach
(
Context
context
)
{
super
.
onAttach
(
context
);
...
...
@@ -92,18 +45,7 @@ public class HomeFragment extends Fragment {
mListener
=
null
;
}
/**
* This interface must be implemented by activities that contain this
* fragment to allow an interaction in this fragment to be communicated
* to the activity and potentially other fragments contained in that
* activity.
* <p>
* See the Android Training lesson <a href=
* "http://developer.android.com/training/basics/fragments/communicating.html"
* >Communicating with Other Fragments</a> for more information.
*/
public
interface
OnFragmentInteractionListener
{
// TODO: Update argument type and name
void
onFragmentInteraction
(
Uri
uri
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment