Skip to content

Commit

Permalink
Merge pull request #305 from ashutoshgngwr/feat/more-sounds
Browse files Browse the repository at this point in the history
Adds more sounds
  • Loading branch information
ashutoshgngwr authored Sep 1, 2020
2 parents dc38ac6 + 8ec388c commit c08aa87
Show file tree
Hide file tree
Showing 28 changed files with 260 additions and 145 deletions.
Binary file removed app/src/main/assets/birds.mp3
Binary file not shown.
Binary file added app/src/main/assets/birds_0.mp3
Binary file not shown.
Binary file added app/src/main/assets/birds_1.mp3
Binary file not shown.
Binary file modified app/src/main/assets/coffee_shop_0.mp3
Binary file not shown.
Binary file modified app/src/main/assets/coffee_shop_1.mp3
Binary file not shown.
Binary file added app/src/main/assets/creaking_ship_0.mp3
Binary file not shown.
Binary file added app/src/main/assets/creaking_ship_1.mp3
Binary file not shown.
Binary file added app/src/main/assets/crickets_0.mp3
Binary file not shown.
Binary file added app/src/main/assets/crickets_1.mp3
Binary file not shown.
Binary file added app/src/main/assets/electric_car_0.mp3
Binary file not shown.
Binary file added app/src/main/assets/electric_car_1.mp3
Binary file not shown.
Binary file added app/src/main/assets/howling_wolf.mp3
Binary file not shown.
Binary file added app/src/main/assets/human_heartbeat.mp3
Binary file not shown.
Binary file added app/src/main/assets/public_library_0.mp3
Binary file not shown.
Binary file added app/src/main/assets/public_library_1.mp3
Binary file not shown.
Binary file added app/src/main/assets/purring_cat.mp3
Binary file not shown.
Binary file added app/src/main/assets/quiet_conversation_0.mp3
Binary file not shown.
Binary file added app/src/main/assets/quiet_conversation_1.mp3
Binary file not shown.
Binary file added app/src/main/assets/screeching_seagulls.mp3
Binary file not shown.
Binary file added app/src/main/assets/walking_through_the_snow.mp3
Binary file not shown.
Binary file added app/src/main/assets/water_hose_0.mp3
Binary file not shown.
Binary file added app/src/main/assets/water_hose_1.mp3
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ import android.view.ViewGroup
import androidx.fragment.app.Fragment
import com.github.ashutoshgngwr.noice.BuildConfig
import com.github.ashutoshgngwr.noice.R
import com.github.ashutoshgngwr.noice.sound.Sound
import mehdi.sakout.aboutpage.AboutPage
import mehdi.sakout.aboutpage.Element

class AboutFragment : Fragment() {

companion object {
private val CREDITS = arrayOf(
private val OTHER_CREDITS = arrayOf(
arrayOf(
R.string.credits__app_icon,
R.drawable.ic_launcher_24dp,
Expand All @@ -25,111 +26,6 @@ class AboutFragment : Fragment() {
R.string.credits__support_development_icon,
R.drawable.ic_nav_support_development,
R.string.credits__support_development_icon_url
),
arrayOf(
R.string.credits__sound_airplane_inflight,
R.drawable.ic_about_sound,
R.string.credits__sound_airplane_inflight_url
),
arrayOf(
R.string.credits__sound_airplane_seatbelt_beeps,
R.drawable.ic_about_sound,
R.string.credits__sound_airplane_seatbelt_beeps_url
),
arrayOf(
R.string.credits__sound_birds,
R.drawable.ic_about_sound,
R.string.credits__sound_birds_url
),
arrayOf(
R.string.credits__sound_bonfire,
R.drawable.ic_about_sound,
R.string.credits__sound_bonfire_url
),
arrayOf(
R.string.credits__sound_coffee_shop,
R.drawable.ic_about_sound,
R.string.credits__sound_coffee_shop_url
),
arrayOf(
R.string.credits__sound_distant_thunder,
R.drawable.ic_about_sound,
R.string.credits__sound_distant_thunder_url
),
arrayOf(
R.string.credits__sound_heavy_rain,
R.drawable.ic_about_sound,
R.string.credits__sound_heavy_rain_url
),
arrayOf(
R.string.credits__sound_light_rain,
R.drawable.ic_about_sound,
R.string.credits__sound_light_rain_url
),
arrayOf(
R.string.credits__sound_moderate_rain,
R.drawable.ic_about_sound,
R.string.credits__sound_moderate_rain_url
),
arrayOf(
R.string.credits__morning_in_a_village,
R.drawable.ic_about_sound,
R.string.credits__morning_in_a_village_url
),
arrayOf(
R.string.credits__sound_moving_train,
R.drawable.ic_about_sound,
R.string.credits__sound_moving_train_url
),
arrayOf(
R.string.credits__sound_night,
R.drawable.ic_about_sound,
R.string.credits__sound_night_url
),
arrayOf(
R.string.credits__sound_office,
R.drawable.ic_about_sound,
R.string.credits__sound_office_url
),
arrayOf(
R.string.credits__sound_rolling_thunder,
R.drawable.ic_about_sound,
R.string.credits__sound_rolling_thunder_url
),
arrayOf(
R.string.credits__sound_seaside,
R.drawable.ic_about_sound,
R.string.credits__sound_seaside_url
),
arrayOf(
R.string.credits__sound_soft_wind,
R.drawable.ic_about_sound,
R.string.credits__sound_soft_wind_url
),
arrayOf(
R.string.credits__sound_thunder_crack,
R.drawable.ic_about_sound,
R.string.credits__sound_thunder_crack_url
),
arrayOf(
R.string.credits__sound_train_horn,
R.drawable.ic_about_sound,
R.string.credits__sound_train_horn_url
),
arrayOf(
R.string.credits__sound_water_stream,
R.drawable.ic_about_sound,
R.string.credits__sound_water_stream_url
),
arrayOf(
R.string.credits__sound_wind_chimes_of_shells,
R.drawable.ic_about_sound,
R.string.credits__sound_wind_chimes_of_shells_url
),
arrayOf(
R.string.credits__sound_wind_in_palm_trees,
R.drawable.ic_about_sound,
R.string.credits__sound_wind_in_palm_trees_url
)
)

Expand Down Expand Up @@ -222,10 +118,16 @@ class AboutFragment : Fragment() {
}

addGroup(getString(R.string.credits))
for (item in CREDITS) {
for (item in OTHER_CREDITS) {
addItem(createElement(item[0], item[1], item[2]))
}

for (sound in Sound.LIBRARY.values) {
for ((titleResID, urlResID) in sound.credits) {
addItem(createElement(titleResID, R.drawable.ic_about_sound, urlResID))
}
}

create()
}
}
Expand Down
Loading

0 comments on commit c08aa87

Please sign in to comment.