Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Mathieu Féry
mobile21
Commits
313282b8
Commit
313282b8
authored
Dec 12, 2020
by
Mathilde BALLOUHEY
Browse files
Ajout chargement favoris
parent
5385b8e3
Pipeline
#23367
failed with stages
in 2 minutes and 43 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
app/src/main/java/fr/iutnantes/miar/dndgenerator/HomeActivity.java
View file @
313282b8
...
@@ -7,6 +7,7 @@ import androidx.appcompat.app.AppCompatActivity;
...
@@ -7,6 +7,7 @@ import androidx.appcompat.app.AppCompatActivity;
import
androidx.recyclerview.widget.LinearLayoutManager
;
import
androidx.recyclerview.widget.LinearLayoutManager
;
import
androidx.recyclerview.widget.RecyclerView
;
import
androidx.recyclerview.widget.RecyclerView
;
import
android.app.ProgressDialog
;
import
android.content.DialogInterface
;
import
android.content.DialogInterface
;
import
android.content.Intent
;
import
android.content.Intent
;
import
android.os.AsyncTask
;
import
android.os.AsyncTask
;
...
@@ -45,6 +46,8 @@ public class HomeActivity extends AppCompatActivity {
...
@@ -45,6 +46,8 @@ public class HomeActivity extends AppCompatActivity {
RadioButton
rdbtn_home_bySystem
,
rdbtn_home_byClass
;
RadioButton
rdbtn_home_bySystem
,
rdbtn_home_byClass
;
RecyclerView
rclr_home_favourites
;
RecyclerView
rclr_home_favourites
;
private
ListResultsAdapter
m_adapter
;
private
ListResultsAdapter
m_adapter
;
private
static
ProgressDialog
m_progressDialog
;
@Override
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
...
@@ -187,6 +190,11 @@ public class HomeActivity extends AppCompatActivity {
...
@@ -187,6 +190,11 @@ public class HomeActivity extends AppCompatActivity {
@Override
@Override
protected
void
onPreExecute
()
{
protected
void
onPreExecute
()
{
super
.
onPreExecute
();
super
.
onPreExecute
();
m_progressDialog
=
new
ProgressDialog
(
HomeActivity
.
this
);
m_progressDialog
.
setMessage
(
"Please wait...It is downloading"
);
m_progressDialog
.
setIndeterminate
(
false
);
m_progressDialog
.
setCancelable
(
false
);
m_progressDialog
.
show
();
m_adapter
.
notifyDataSetChanged
();
m_adapter
.
notifyDataSetChanged
();
rclr_home_favourites
.
setEnabled
(
false
);
rclr_home_favourites
.
setEnabled
(
false
);
}
}
...
@@ -202,6 +210,7 @@ public class HomeActivity extends AppCompatActivity {
...
@@ -202,6 +210,7 @@ public class HomeActivity extends AppCompatActivity {
super
.
onPostExecute
(
nullable
);
super
.
onPostExecute
(
nullable
);
m_adapter
.
notifyDataSetChanged
();
m_adapter
.
notifyDataSetChanged
();
rclr_home_favourites
.
setEnabled
(
true
);
rclr_home_favourites
.
setEnabled
(
true
);
m_progressDialog
.
hide
();
}
}
}
}
}
}
\ 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