Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import androidx.fragment.app.Fragment
import androidx.lifecycle.Observer
import androidx.navigation.Navigation.findNavController
import com.google.android.material.snackbar.Snackbar
import kotlinx.android.synthetic.main.activity_main.*
import kotlinx.android.synthetic.main.fragment_login.email
import kotlinx.android.synthetic.main.fragment_login.loginButton
import kotlinx.android.synthetic.main.fragment_login.password
Expand Down Expand Up @@ -132,11 +133,17 @@ class LoginFragment : Fragment() {

rootView.tick.setOnClickListener {
rootView.sentEmailLayout.visibility = View.GONE
if (thisActivity is AppCompatActivity)
thisActivity.supportActionBar?.show()
Utils.navAnimVisible(thisActivity?.navigationAuth, context)
rootView.loginLayout.visibility = View.VISIBLE
}

rootView.forgotPassword.setOnClickListener {
hideSoftKeyboard(context, rootView)
if (thisActivity is AppCompatActivity)
thisActivity.supportActionBar?.hide()
Utils.navAnimGone(thisActivity?.navigationAuth, context)
loginViewModel.sendResetPasswordEmail(email.text.toString())
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,14 @@ object Utils {
return builder.build()
}

fun navAnimVisible(navigation: BottomNavigationView?, context: Context) {
fun navAnimVisible(navigation: BottomNavigationView?, context: Context?) {
if (navigation?.visibility == View.GONE) {
navigation.visibility = View.VISIBLE
navigation.animation = AnimationUtils.loadAnimation(context, R.anim.slide_up)
}
}

fun navAnimGone(navigation: BottomNavigationView?, context: Context) {
fun navAnimGone(navigation: BottomNavigationView?, context: Context?) {
if (navigation?.visibility == View.VISIBLE) {
navigation.visibility = View.GONE
navigation.animation = AnimationUtils.loadAnimation(context, R.anim.slide_down)
Expand Down
8 changes: 1 addition & 7 deletions app/src/main/res/layout/fragment_search.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,13 @@
android:layout_width="match_parent"
android:layout_height="match_parent">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">

<LinearLayout
android:id="@+id/searchLinearLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/layout_margin_medium"
android:layout_marginRight="@dimen/layout_margin_medium"
android:layout_marginTop="@dimen/layout_margin_search_view"
android:layout_gravity="center"
android:gravity="center"
android:orientation="vertical">

Expand Down Expand Up @@ -89,7 +84,6 @@
</RelativeLayout>

</LinearLayout>
</LinearLayout>

<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fabSearch"
Expand Down
111 changes: 62 additions & 49 deletions app/src/main/res/layout/fragment_search_time.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="@dimen/layout_margin_medium"
android:layout_marginTop="@dimen/layout_margin_medium"
android:layout_marginLeft="@dimen/layout_margin_medium"
android:layout_marginRight="@dimen/layout_margin_medium"
android:orientation="vertical"
tools:context="org.fossasia.openevent.general.search.SearchTimeFragment">

Expand All @@ -16,59 +18,70 @@
android:textSize="@dimen/text_size_extra_large"
android:textStyle="bold" />


<CheckedTextView
android:id="@+id/anytimeTextView"
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/layout_margin_extra_large"
android:text="@string/anytime"
android:textColor="@color/light_grey"
android:textSize="@dimen/text_size_expanded_title" />
android:layout_height="match_parent"
android:scrollbars="none"
android:overScrollMode="never">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">

<CheckedTextView
android:id="@+id/todayTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/layout_margin_extra_large"
android:text="@string/today"
android:textColor="@color/light_grey"
android:textSize="@dimen/text_size_expanded_title" />
<CheckedTextView
android:id="@+id/anytimeTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/layout_margin_extra_large"
android:text="@string/anytime"
android:textColor="@color/light_grey"
android:textSize="@dimen/text_size_expanded_title" />

<CheckedTextView
android:id="@+id/tomorrowTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/layout_margin_extra_large"
android:text="@string/tomorrow"
android:textColor="@color/light_grey"
android:textSize="@dimen/text_size_expanded_title" />
<CheckedTextView
android:id="@+id/todayTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/layout_margin_extra_large"
android:text="@string/today"
android:textColor="@color/light_grey"
android:textSize="@dimen/text_size_expanded_title" />

<CheckedTextView
android:id="@+id/thisWeekendTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/layout_margin_extra_large"
android:text="@string/weekend"
android:textColor="@color/light_grey"
android:textSize="@dimen/text_size_expanded_title" />
<CheckedTextView
android:id="@+id/tomorrowTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/layout_margin_extra_large"
android:text="@string/tomorrow"
android:textColor="@color/light_grey"
android:textSize="@dimen/text_size_expanded_title" />

<CheckedTextView
android:id="@+id/nextMonthTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/layout_margin_extra_large"
android:text="@string/month"
android:textColor="@color/light_grey"
android:textSize="@dimen/text_size_expanded_title" />
<CheckedTextView
android:id="@+id/thisWeekendTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/layout_margin_extra_large"
android:text="@string/weekend"
android:textColor="@color/light_grey"
android:textSize="@dimen/text_size_expanded_title" />

<CheckedTextView
android:id="@+id/timeTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/layout_margin_extra_large"
android:text="@string/pick_date"
android:textColor="@color/light_grey"
android:textSize="@dimen/text_size_expanded_title" />
<CheckedTextView
android:id="@+id/nextMonthTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/layout_margin_extra_large"
android:text="@string/month"
android:textColor="@color/light_grey"
android:textSize="@dimen/text_size_expanded_title" />

<CheckedTextView
android:id="@+id/timeTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/layout_margin_extra_large"
android:text="@string/pick_date"
android:textColor="@color/light_grey"
android:textSize="@dimen/text_size_expanded_title" />
</LinearLayout>
</ScrollView>
</LinearLayout>