Skip to content

Commit

Permalink
resources: back from detail page added (fixes open-learning-exchange#…
Browse files Browse the repository at this point in the history
  • Loading branch information
BryanGazali and dogi authored Oct 4, 2023
1 parent 095f0e4 commit df49423
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 3 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 21
targetSdkVersion 34
versionCode 1074
versionName "0.10.74"
versionCode 1075
versionName "0.10.75"
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 @@ -33,7 +33,7 @@

public class LibraryDetailFragment extends BaseContainerFragment implements OnRatingChangeListener {
TextView author, pubishedBy, title, media, subjects, license, language, resource, type;
AppCompatImageButton download, remove;
AppCompatImageButton download, remove, back;
String libraryId;
DatabaseService dbService;
Realm mRealm;
Expand Down Expand Up @@ -90,6 +90,7 @@ private void initView(View v) {
type = v.findViewById(R.id.tv_type);
download = v.findViewById(R.id.btn_download);
remove = v.findViewById(R.id.btn_remove);
back = v.findViewById(R.id.btn_back);
}

private void setLibraryData() {
Expand Down Expand Up @@ -139,6 +140,9 @@ public void setClickListeners() {
Utilities.toast(getActivity(), getString(R.string.resources) + (isAdd ? getString(R.string.added_to) : getString(R.string.removed_from) + getString(R.string.my_library)));
setLibraryData();
});
back.setOnClickListener(view ->
getActivity().onBackPressed()
);
}

@Override
Expand Down
12 changes: 12 additions & 0 deletions app/src/main/res/layout/fragment_library_detail.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,18 @@
android:minHeight="?attr/actionBarSize"
android:padding="8dp">

<ImageButton
android:id="@+id/btn_back"
style="@style/YellowButtons"
android:layout_width="@dimen/_50dp"
android:layout_height="@dimen/_50dp"
android:layout_gravity="center_vertical"
android:background="@drawable/buttonyellow"
android:padding="8dp"
android:src="@drawable/ic_left_arrow"
android:text="@string/btn_back"
app:tint="@color/md_black_1000" />

<TextView
android:id="@+id/tv_title"
android:layout_width="0dp"
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values-ar/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<string name="action_settings">الإعدادات</string>
<string name="hint_name">اسم المستخدم</string>
<string name="hint_password">كلمة المرور</string>
<string name="btn_back">رجع</string>
<string name="btn_sign_in">تسجيل الدخول</string>
<string name="btn_sync">مزامنة</string>
<string name="btn_sync_save">حفظ</string>
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values-es/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<string name="action_settings">Configuración</string>
<string name="hint_name">Nombre</string>
<string name="hint_password">Contraseña</string>
<string name="btn_back">Volver</string>
<string name="btn_sign_in">Iniciar sesión</string>
<string name="btn_sync">Sincronizar</string>
<string name="btn_sync_save">Guardar</string>
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values-fr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<string name="action_settings">Paramètres</string>
<string name="hint_name">Nom d\'utilisateur</string>
<string name="hint_password">Mot de passe</string>
<string name="btn_back">Retourner</string>
<string name="btn_sign_in">Se connecter</string>
<string name="btn_sync">Synchroniser</string>
<string name="btn_sync_save">Enregistrer</string>
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values-ne/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<string name="action_settings">सेटिङ्स</string>
<string name="hint_name">प्रयोगकर्तानाम</string>
<string name="hint_password">पासवर्ड</string>
<string name="btn_back">पछाडी जाउ</string>
<string name="btn_sign_in">साइन इन गर्नुहोस्</string>
<string name="btn_sync">सिङ्क</string>
<string name="btn_sync_save">सुरक्षित गर्नुहोस्</string>
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values-so/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<string name="action_settings">Settings</string>
<string name="hint_name">Magaca isticmaalaha</string>
<string name="hint_password">Password</string>
<string name="btn_back">Dib</string>
<string name="btn_sign_in">Soo gal</string>
<string name="btn_sync">Isku xidh </string>
<string name="btn_sync_save">Keyd</string>
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<string name="action_settings">Settings</string>
<string name="hint_name">Username</string>
<string name="hint_password">Password</string>
<string name="btn_back">Back</string>
<string name="btn_sign_in">Sign In</string>
<string name="btn_sync">Sync</string>
<string name="btn_sync_save">Save</string>
Expand Down

0 comments on commit df49423

Please sign in to comment.