Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
2022-81
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
2022-81
2022-81
Commits
e564d9c6
Commit
e564d9c6
authored
Nov 12, 2022
by
Salika Madhushanka W.J
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pdHome UI added
parent
2507d34e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
136 additions
and
2 deletions
+136
-2
app/src/main/java/com/example/eketha/pdHome.java
app/src/main/java/com/example/eketha/pdHome.java
+24
-0
app/src/main/res/layout/activity_pd_home.xml
app/src/main/res/layout/activity_pd_home.xml
+112
-2
No files found.
app/src/main/java/com/example/eketha/pdHome.java
View file @
e564d9c6
...
@@ -2,13 +2,37 @@ package com.example.eketha;
...
@@ -2,13 +2,37 @@ package com.example.eketha;
import
androidx.appcompat.app.AppCompatActivity
;
import
androidx.appcompat.app.AppCompatActivity
;
import
android.content.Intent
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.view.View
;
import
android.widget.LinearLayout
;
public
class
pdHome
extends
AppCompatActivity
{
public
class
pdHome
extends
AppCompatActivity
{
private
LinearLayout
layer1
,
layer2
;
@Override
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
super
.
onCreate
(
savedInstanceState
);
setContentView
(
R
.
layout
.
activity_pd_home
);
setContentView
(
R
.
layout
.
activity_pd_home
);
layer1
=
findViewById
(
R
.
id
.
layerPestsDP
);
layer2
=
findViewById
(
R
.
id
.
layerDiseasesPD
);
// layer1.setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View view) {
// Intent intent = new Intent(getApplicationContext(), Diseases.class);
// startActivity(intent);
// }
// });
// layer2.setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View view) {
// Intent intent = new Intent(getApplicationContext(), Pests.class);
// startActivity(intent);
// }
// });
}
}
}
}
\ No newline at end of file
app/src/main/res/layout/activity_pd_home.xml
View file @
e564d9c6
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<
androidx.constraintlayout.widget.Constraint
Layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<
Linear
Layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
tools:context=
".pdHome"
>
tools:context=
".pdHome"
>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<LinearLayout
android:id=
"@+id/layer1"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
<ImageView
android:layout_width=
"150dp"
android:layout_height=
"150dp"
android:layout_marginLeft=
"120dp"
android:layout_marginTop=
"30dp"
app:srcCompat=
"@drawable/logo"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:text=
"Pest and Diseases Home"
android:textColor=
"@color/black"
android:layout_marginTop=
"10dp"
android:layout_marginLeft=
"50dp"
android:textSize=
"30dp"
/>
</LinearLayout>
<androidx.cardview.widget.CardView
android:layout_width=
"match_parent"
android:layout_height=
"173dp"
android:layout_marginRight=
"30dp"
app:cardCornerRadius=
"8dp"
android:layout_marginTop=
"30dp"
android:layout_marginLeft=
"30dp"
>
<LinearLayout
android:id=
"@+id/layerDiseasesPD"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
android:background=
"@color/black"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
android:layout_marginLeft=
"30dp"
android:layout_marginTop=
"20dp"
android:layout_marginRight=
"30dp"
>
<ImageView
android:layout_width=
"100dp"
android:layout_height=
"100dp"
android:layout_marginLeft=
"10dp"
android:layout_marginTop=
"10dp"
app:srcCompat=
"@drawable/logo"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textSize=
"24dp"
android:layout_marginLeft=
"20dp"
android:layout_marginTop=
"36dp"
android:textColor=
"@color/white"
android:text=
"Pests"
/>
</LinearLayout>
</LinearLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:layout_width=
"match_parent"
android:layout_height=
"173dp"
android:layout_marginRight=
"30dp"
app:cardCornerRadius=
"8dp"
android:layout_marginTop=
"30dp"
android:layout_marginLeft=
"30dp"
>
<LinearLayout
android:id=
"@+id/layerPestsDP"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
android:background=
"@color/black"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
android:layout_marginLeft=
"30dp"
android:layout_marginTop=
"20dp"
android:layout_marginRight=
"30dp"
>
<ImageView
android:layout_width=
"100dp"
android:layout_height=
"100dp"
android:layout_marginLeft=
"10dp"
android:layout_marginTop=
"10dp"
app:srcCompat=
"@drawable/logo"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textSize=
"24dp"
android:layout_marginLeft=
"20dp"
android:layout_marginTop=
"36dp"
android:textColor=
"@color/white"
android:text=
"Diseases"
/>
</LinearLayout>
</LinearLayout>
</androidx.cardview.widget.CardView>
</LinearLayout>
\ 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