Skip to content

Commit

Permalink
teams: smoother list (fixes #4944) (#4945)
Browse files Browse the repository at this point in the history
Co-authored-by: dogi <dogi@users.noreply.github.com>
  • Loading branch information
deeppp15 and dogi authored Jan 6, 2025
1 parent f452edc commit f0f11d6
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 9 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ android {
applicationId "org.ole.planet.myplanet"
minSdkVersion 26
targetSdkVersion 34
versionCode 2167
versionName "0.21.67"
versionCode 2168
versionName "0.21.68"
ndkVersion '21.3.6528147'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ class TeamFragment : Fragment(), AdapterTeamList.OnClickTeamItem {
}

fragmentTeamBinding.addTeam.setOnClickListener { createTeamAlert(null) }

fragmentTeamBinding.tvFragmentInfo.text = if (TextUtils.equals(type, "enterprise")) {
getString(R.string.enterprises)
} else {
getString(R.string.team)
}
teamList = mRealm.where(RealmMyTeam::class.java).isEmpty("teamId")
.notEqualTo("status", "archived").findAllAsync()

Expand Down
36 changes: 30 additions & 6 deletions app/src/main/res/layout/fragment_team.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,41 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/secondary_bg"
android:padding="@dimen/padding_normal"
tools:context=".ui.team.TeamFragment">

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

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorPrimary"
android:orientation="horizontal"
android:padding="@dimen/padding_normal">
<TextView
android:id="@+id/tv_fragment_info"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_margin="@dimen/_10dp"
android:layout_weight="1"
android:gravity="center_vertical"
android:padding="@dimen/padding_normal"
android:textColor="@color/textColorPrimary"
android:textSize="@dimen/text_size_large"
android:textStyle="bold"
android:minWidth="150dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>

<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:labelFor="@+id/et_search"
android:padding="@dimen/padding_normal"
android:textColorHint="@color/hint_color">

<EditText
Expand All @@ -33,14 +56,15 @@
android:id="@+id/tableTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/padding_normal"
android:layout_marginStart="8dp">

<TextView
android:id="@+id/name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/name_normal"
android:textColor="@color/daynight_textColor"
android:textColor="@color/teams_heading"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
Expand All @@ -50,7 +74,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/created_on"
android:textColor="@color/daynight_textColor"
android:textColor="@color/teams_heading"
android:textStyle="bold"
app:layout_constraintEnd_toStartOf="@id/type"
app:layout_constraintStart_toEndOf="@id/name"
Expand All @@ -63,7 +87,7 @@
android:gravity="center"
android:padding="@dimen/padding_small"
android:text="Type"
android:textColor="@color/daynight_textColor"
android:textColor="@color/teams_heading"
android:textStyle="bold"
app:layout_constraintEnd_toStartOf="@id/no_of_visits"
app:layout_constraintStart_toEndOf="@id/created"
Expand All @@ -75,7 +99,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="@string/total_visits"
android:textColor="@color/daynight_textColor"
android:textColor="@color/teams_heading"
android:textStyle="bold"
app:layout_constraintEnd_toStartOf="@id/ltButtons"
app:layout_constraintHorizontal_weight="1"
Expand All @@ -90,7 +114,7 @@
android:paddingStart="0dp"
android:paddingEnd="12dp"
android:text="@string/action"
android:textColor="@color/daynight_textColor"
android:textColor="@color/teams_heading"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/no_of_visits"
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values-night/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,5 @@
<color name="multi_select_grey">#2E2E2E</color>
<color name="background_color">#000000</color>
<color name="text_color">#FFFFFF</color>
<color name="teams_heading">@color/md_blue_700</color>
</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,5 @@
<color name="multi_select_grey">@color/md_grey_300</color>
<color name="background_color">#FFFFFF</color>
<color name="text_color">#000000</color>
<color name="teams_heading">#000000</color>
</resources>

0 comments on commit f0f11d6

Please sign in to comment.