Unfinished news fragment, will probably be deleted

This commit is contained in:
Deniz Düzgören
2019-06-09 18:35:36 +02:00
parent e88e725d3a
commit e93683263d
14 changed files with 320 additions and 18 deletions
@@ -93,7 +93,7 @@ class FoodFragment : Fragment(R.layout.food_layout) {
val mRootView = rootView
private val fadeOut = AnimationUtils.loadAnimation(context, R.anim.fade_out)
private val handler = Handler(Looper.getMainLooper())
private var exceptionOccured = false
private var exceptionOccurred = false
override fun doInBackground(vararg params: Void?): Void? {
try {
@@ -156,14 +156,14 @@ class FoodFragment : Fragment(R.layout.food_layout) {
progressBar.progress = 100
mEasyPrefs.putListString("foodListPrefs", foodList)
} catch (e: Exception) { exceptionOccured = true }
} catch (e: Exception) { exceptionOccurred = true }
return null
}
override fun onPostExecute(result: Void?) {
super.onPostExecute(result)
if (!exceptionOccured) {
if (!exceptionOccurred) {
try {
mRecyclerView.removeAllViews()
mFoodArrayList.removeAll(mFoodArrayList)
@@ -196,6 +196,4 @@ class FoodFragment : Fragment(R.layout.food_layout) {
}
}
}
}