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
04dd6c15
Commit
04dd6c15
authored
Dec 11, 2018
by
DESKTOP-NFGF3PG\zxa01
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update home fragment layout
parent
2cf221ae
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
75 deletions
+10
-75
app/src/main/java/com/example/zxa01/iotclient/home/HomeActivity.java
...n/java/com/example/zxa01/iotclient/home/HomeActivity.java
+3
-7
app/src/main/java/com/example/zxa01/iotclient/home/HomeFragment.java
...n/java/com/example/zxa01/iotclient/home/HomeFragment.java
+0
-51
app/src/main/res/layout/activity_home.xml
app/src/main/res/layout/activity_home.xml
+7
-9
app/src/main/res/layout/fragment_home.xml
app/src/main/res/layout/fragment_home.xml
+0
-8
No files found.
app/src/main/java/com/example/zxa01/iotclient/home/HomeActivity.java
View file @
04dd6c15
...
...
@@ -7,6 +7,7 @@ import android.support.design.widget.BottomNavigationView;
import
android.support.v4.app.Fragment
;
import
android.support.v7.app.AppCompatActivity
;
import
android.view.MenuItem
;
import
com.example.zxa01.iotclient.R
;
import
com.example.zxa01.iotclient.device.DeviceFragment
;
import
com.example.zxa01.iotclient.privacy.PrivacyFragment
;
...
...
@@ -16,7 +17,7 @@ import butterknife.BindView;
import
butterknife.ButterKnife
;
public
class
HomeActivity
extends
AppCompatActivity
implements
HomeFragment
.
OnFragmentInteractionListener
,
DeviceFragment
.
OnFragmentInteractionListener
implements
DeviceFragment
.
OnFragmentInteractionListener
,
PrivacyFragment
.
OnFragmentInteractionListener
,
SettingFragment
.
OnFragmentInteractionListener
{
DeviceFragment
mDeviceFragment
=
new
DeviceFragment
();
...
...
@@ -57,11 +58,6 @@ public class HomeActivity extends AppCompatActivity
showFragment
(
mDeviceFragment
);
}
@Override
public
void
onFragmentInteraction
(
Uri
uri
)
{
// do nothing
}
@Override
public
void
onDeviceFragment
(
Uri
uri
)
{
// do nothing
...
...
@@ -79,7 +75,7 @@ public class HomeActivity extends AppCompatActivity
private
void
showFragment
(
Fragment
fragment
)
{
getSupportFragmentManager
().
beginTransaction
()
.
replace
(
R
.
id
.
fragment_home
,
fragment
)
.
replace
(
R
.
id
.
home_fragment_layout
,
fragment
)
.
commit
();
}
}
app/src/main/java/com/example/zxa01/iotclient/home/HomeFragment.java
deleted
100644 → 0
View file @
2cf221ae
package
com.example.zxa01.iotclient.home
;
import
android.content.Context
;
import
android.net.Uri
;
import
android.os.Bundle
;
import
android.support.v4.app.Fragment
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
com.example.zxa01.iotclient.R
;
public
class
HomeFragment
extends
Fragment
{
private
OnFragmentInteractionListener
mListener
;
public
HomeFragment
()
{
}
@Override
public
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
}
@Override
public
View
onCreateView
(
LayoutInflater
inflater
,
ViewGroup
container
,
Bundle
savedInstanceState
)
{
return
inflater
.
inflate
(
R
.
layout
.
fragment_home
,
container
,
false
);
}
@Override
public
void
onAttach
(
Context
context
)
{
super
.
onAttach
(
context
);
if
(
context
instanceof
OnFragmentInteractionListener
)
{
mListener
=
(
OnFragmentInteractionListener
)
context
;
}
else
{
throw
new
RuntimeException
(
context
.
toString
()
+
" must implement OnFragmentInteractionListener"
);
}
}
@Override
public
void
onDetach
()
{
super
.
onDetach
();
mListener
=
null
;
}
public
interface
OnFragmentInteractionListener
{
void
onFragmentInteraction
(
Uri
uri
);
}
}
app/src/main/res/layout/activity_home.xml
View file @
04dd6c15
...
...
@@ -19,17 +19,15 @@
app:layout_constraintRight_toRightOf=
"parent"
app:menu=
"@menu/navigation"
/>
<fragment
android:id=
"@+id/fragment_home"
android:name=
"com.example.zxa01.iotclient.home.HomeFragment"
android:layout_width=
"0dp"
android:layout_height=
"0dp"
<FrameLayout
android:id=
"@+id/home_fragment_layout"
android:layout_width=
"match_parent"
android:layout_height=
"456dp"
app:layout_constraintBottom_toTopOf=
"@+id/navigation"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintHorizontal_bias=
"0.444"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintVertical_bias=
"0.0"
/>
app:layout_constraintTop_toTopOf=
"parent"
>
</FrameLayout>
</android.support.constraint.ConstraintLayout>
\ No newline at end of file
app/src/main/res/layout/fragment_home.xml
deleted
100644 → 0
View file @
2cf221ae
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
tools:context=
".home.HomeFragment"
>
</FrameLayout>
\ No newline at end of file
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