diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 88dc8ff21fd6dbc957e042ea23207fe2b993823a..369e64e73a432bfebd27f4e553b573fba54f0f8a 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -76,23 +76,17 @@ android:parentActivityName=".ui.chat.ChatActivity" android:windowSoftInputMode="adjustResize" /> <activity - android:name=".ui.coresettings.networkconfig.NetworkConfigActivity" + android:name=".ui.coresettings.identity.IdentityActivity" android:exported="false" - android:label="@string/settings_networkconfig_title" + android:label="@string/settings_identity_title" android:parentActivityName=".ui.coresettings.CoreSettingsActivity" android:windowSoftInputMode="adjustResize" /> <activity - android:name=".ui.coresettings.identity.IdentitiesActivity" + android:name=".ui.coresettings.networkconfig.NetworkConfigActivity" android:exported="false" - android:label="@string/settings_identities_title" + android:label="@string/settings_networkconfig_title" android:parentActivityName=".ui.coresettings.CoreSettingsActivity" android:windowSoftInputMode="adjustResize" /> - <activity - android:name=".ui.coresettings.identity.IdentityActivity" - android:exported="false" - android:label="@string/settings_identity_title" - android:parentActivityName=".ui.coresettings.identity.IdentitiesActivity" - android:windowSoftInputMode="adjustResize" /> <!-- Client Setup Flow --> <activity diff --git a/app/src/main/java/de/kuschku/quasseldroid/dagger/ActivityModule.kt b/app/src/main/java/de/kuschku/quasseldroid/dagger/ActivityModule.kt index 94cef23ec314cd211966767f4a882aedb9e16bd8..16d9f31a2d82efde869c413b51c976968a2d87a7 100644 --- a/app/src/main/java/de/kuschku/quasseldroid/dagger/ActivityModule.kt +++ b/app/src/main/java/de/kuschku/quasseldroid/dagger/ActivityModule.kt @@ -18,8 +18,6 @@ import de.kuschku.quasseldroid.ui.clientsettings.license.LicenseSettingsActivity import de.kuschku.quasseldroid.ui.clientsettings.license.LicenseSettingsFragmentProvider import de.kuschku.quasseldroid.ui.coresettings.CoreSettingsActivity import de.kuschku.quasseldroid.ui.coresettings.CoreSettingsFragmentProvider -import de.kuschku.quasseldroid.ui.coresettings.identity.IdentitiesActivity -import de.kuschku.quasseldroid.ui.coresettings.identity.IdentitiesFragmentProvider import de.kuschku.quasseldroid.ui.coresettings.identity.IdentityActivity import de.kuschku.quasseldroid.ui.coresettings.identity.IdentityFragmentProvider import de.kuschku.quasseldroid.ui.coresettings.networkconfig.NetworkConfigActivity @@ -53,9 +51,6 @@ abstract class ActivityModule { @ContributesAndroidInjector(modules = [CoreSettingsFragmentProvider::class]) abstract fun bindCoreSettingsActivity(): CoreSettingsActivity - @ContributesAndroidInjector(modules = [IdentitiesFragmentProvider::class]) - abstract fun bindIdentitiesActivity(): IdentitiesActivity - @ContributesAndroidInjector(modules = [IdentityFragmentProvider::class]) abstract fun bindIdentityActivity(): IdentityActivity diff --git a/app/src/main/java/de/kuschku/quasseldroid/ui/clientsettings/about/AboutSettingsFragment.kt b/app/src/main/java/de/kuschku/quasseldroid/ui/clientsettings/about/AboutSettingsFragment.kt index 3d86df20c4220fbdb0b5dc01bb77a39836bf2a12..8c95b9b25c5d12997ff79fafb6e63606715d9108 100644 --- a/app/src/main/java/de/kuschku/quasseldroid/ui/clientsettings/about/AboutSettingsFragment.kt +++ b/app/src/main/java/de/kuschku/quasseldroid/ui/clientsettings/about/AboutSettingsFragment.kt @@ -139,6 +139,21 @@ class AboutSettingsFragment : DaggerFragment() { license = apache2, url = "https://github.com/square/leakcanary" ), + Library( + name = "Material Design Icons: Community", + license = License( + shortName = "SIL Open Font License v1.1", + fullName = "SIL OPEN FONT LICENSE", + text = R.string.license_materialdesignicons + ), + url = "https://github.com/Templarian/MaterialDesign" + ), + Library( + name = "Material Design Icons: Google", + version = "3.0.1", + license = apache2, + url = "https://github.com/google/material-design-icons" + ), Library( name = "Material Dialogs", version = "0.9.6.0", @@ -179,27 +194,27 @@ class AboutSettingsFragment : DaggerFragment() { Contributor( name = "Frederik M. J. Vestre", nickName = "freqmod", - description = "Initial qdatastream deserialization attempts" + description = getString(R.string.contributor_description_freqmod) ), Contributor( name = "Martin “Java Sucks” Sandsmark", nickName = "sandsmark", - description = "Legacy protocol implementation, (de)serializers, project (de)moralizer" + description = getString(R.string.contributor_description_sandsmark) ), Contributor( name = "Magnus Fjell", nickName = "magnuf", - description = "Legacy UI" + description = getString(R.string.contributor_description_magnuf) ), Contributor( name = "Ken Børge Viktil", nickName = "Kenji", - description = "Legacy UI" + description = getString(R.string.contributor_description_kenji) ), Contributor( name = "Janne Koschinski", nickName = "justJanne", - description = "Rewrite, UI, Annotation Processors, Backend" + description = getString(R.string.contributor_description_justjanne) ) )) contributors.addItemDecoration(DividerItemDecoration(context, LinearLayoutManager.VERTICAL)) diff --git a/app/src/main/java/de/kuschku/quasseldroid/ui/clientsettings/about/Library.kt b/app/src/main/java/de/kuschku/quasseldroid/ui/clientsettings/about/Library.kt index 87230d5487c9deadb44e61d671d9dbd5a24299e9..21debd0ec63aa6b3527974bb9b4b6fcaee7235e3 100644 --- a/app/src/main/java/de/kuschku/quasseldroid/ui/clientsettings/about/Library.kt +++ b/app/src/main/java/de/kuschku/quasseldroid/ui/clientsettings/about/Library.kt @@ -2,7 +2,7 @@ package de.kuschku.quasseldroid.ui.clientsettings.about data class Library( val name: String, - val version: String, + val version: String? = null, val license: License, val url: String? = null ) \ No newline at end of file diff --git a/app/src/main/java/de/kuschku/quasseldroid/ui/clientsettings/about/LibraryAdapter.kt b/app/src/main/java/de/kuschku/quasseldroid/ui/clientsettings/about/LibraryAdapter.kt index f63a6f3ae4e5ab415423dc130f5365abc24ea656..6cc525cf03cf3a642f2f7468f454739ce3241d78 100644 --- a/app/src/main/java/de/kuschku/quasseldroid/ui/clientsettings/about/LibraryAdapter.kt +++ b/app/src/main/java/de/kuschku/quasseldroid/ui/clientsettings/about/LibraryAdapter.kt @@ -10,6 +10,7 @@ import butterknife.BindView import butterknife.ButterKnife import de.kuschku.quasseldroid.R import de.kuschku.quasseldroid.ui.clientsettings.license.LicenseSettingsActivity +import de.kuschku.quasseldroid.util.helper.visibleIf class LibraryAdapter(private val libraries: List<Library>) : RecyclerView.Adapter<LibraryAdapter.LibraryViewHolder>() { @@ -39,8 +40,7 @@ class LibraryAdapter(private val libraries: List<Library>) : ButterKnife.bind(this, itemView) itemView.setOnClickListener { this.item?.run { - val intent = Intent(itemView.context, - LicenseSettingsActivity::class.java) + val intent = Intent(itemView.context, LicenseSettingsActivity::class.java) intent.putExtra("license_name", license.fullName) intent.putExtra("license_text", license.text) itemView.context.startActivity(intent) @@ -52,6 +52,7 @@ class LibraryAdapter(private val libraries: List<Library>) : this.item = item this.name.text = item.name this.version.text = item.version + this.version.visibleIf(!item.version.isNullOrBlank()) this.license.text = item.license.shortName } } diff --git a/app/src/main/java/de/kuschku/quasseldroid/ui/clientsettings/license/LicenseSettingsActivity.kt b/app/src/main/java/de/kuschku/quasseldroid/ui/clientsettings/license/LicenseSettingsActivity.kt index 24177ec86de797e0aa81421f94cb7b428b3616f7..79630f68098aaa6ef9987f77c13199d13550705b 100644 --- a/app/src/main/java/de/kuschku/quasseldroid/ui/clientsettings/license/LicenseSettingsActivity.kt +++ b/app/src/main/java/de/kuschku/quasseldroid/ui/clientsettings/license/LicenseSettingsActivity.kt @@ -2,4 +2,4 @@ package de.kuschku.quasseldroid.ui.clientsettings.license import de.kuschku.quasseldroid.util.ui.SettingsActivity -class LicenseSettingsActivity : SettingsActivity() \ No newline at end of file +class LicenseSettingsActivity : SettingsActivity(LicenseSettingsFragment()) \ No newline at end of file diff --git a/app/src/main/java/de/kuschku/quasseldroid/ui/clientsettings/license/LicenseSettingsFragment.kt b/app/src/main/java/de/kuschku/quasseldroid/ui/clientsettings/license/LicenseSettingsFragment.kt index b597440f8aee9eae5f50a97485178e27de7fb81b..0e9cfb75eca1460c1cbb67d236575f1c24a8a9d9 100644 --- a/app/src/main/java/de/kuschku/quasseldroid/ui/clientsettings/license/LicenseSettingsFragment.kt +++ b/app/src/main/java/de/kuschku/quasseldroid/ui/clientsettings/license/LicenseSettingsFragment.kt @@ -12,9 +12,6 @@ import dagger.android.support.DaggerFragment import de.kuschku.quasseldroid.R class LicenseSettingsFragment : DaggerFragment() { - @BindView(R.id.name) - lateinit var name: TextView - @BindView(R.id.text) lateinit var text: TextView @@ -23,8 +20,6 @@ class LicenseSettingsFragment : DaggerFragment() { val view = inflater.inflate(R.layout.fragment_license, container, false) ButterKnife.bind(this, view) - name.text = arguments?.getString("license_name") - val textResource = arguments?.getInt("license_text", 0) ?: 0 if (textResource != 0) { text.text = Html.fromHtml(getString(textResource)) diff --git a/app/src/main/java/de/kuschku/quasseldroid/ui/coresettings/CoreSettingsFragment.kt b/app/src/main/java/de/kuschku/quasseldroid/ui/coresettings/CoreSettingsFragment.kt index d522f0dc28b26894eb3267bd7c2743d4888d2b23..5fa61ef00eb1f8d5f0ccccf9523803b3b378ac47 100644 --- a/app/src/main/java/de/kuschku/quasseldroid/ui/coresettings/CoreSettingsFragment.kt +++ b/app/src/main/java/de/kuschku/quasseldroid/ui/coresettings/CoreSettingsFragment.kt @@ -1,91 +1,118 @@ package de.kuschku.quasseldroid.ui.coresettings +import android.arch.lifecycle.Observer import android.content.Intent import android.os.Bundle +import android.support.v4.view.ViewCompat import android.support.v7.widget.DividerItemDecoration import android.support.v7.widget.LinearLayoutManager import android.support.v7.widget.RecyclerView import android.view.LayoutInflater import android.view.View import android.view.ViewGroup -import android.widget.TextView import butterknife.BindView import butterknife.ButterKnife +import de.kuschku.libquassel.quassel.syncables.BufferViewConfig +import de.kuschku.libquassel.quassel.syncables.Identity +import de.kuschku.libquassel.quassel.syncables.Network import de.kuschku.quasseldroid.R -import de.kuschku.quasseldroid.ui.coresettings.identity.IdentitiesActivity +import de.kuschku.quasseldroid.ui.coresettings.identity.IdentityActivity import de.kuschku.quasseldroid.ui.coresettings.networkconfig.NetworkConfigActivity -import de.kuschku.quasseldroid.util.helper.visibleIf +import de.kuschku.quasseldroid.util.helper.combineLatest +import de.kuschku.quasseldroid.util.helper.toLiveData import de.kuschku.quasseldroid.util.service.ServiceBoundFragment class CoreSettingsFragment : ServiceBoundFragment() { - @BindView(R.id.list) - lateinit var list: RecyclerView + @BindView(R.id.networks) + lateinit var networks: RecyclerView + + @BindView(R.id.identities) + lateinit var identities: RecyclerView + + @BindView(R.id.chatlists) + lateinit var chatlists: RecyclerView + + @BindView(R.id.networkconfig) + lateinit var networkConfig: View override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { val view = inflater.inflate(R.layout.settings_list, container, false) ButterKnife.bind(this, view) - val adapter = CoreSettingsAdapter(listOf( - CoreSetting( - getString(R.string.settings_identities_title), - getString(R.string.settings_identities_description), - Intent(requireContext(), IdentitiesActivity::class.java) - ), - CoreSetting( - getString(R.string.settings_networkconfig_title), - getString(R.string.settings_networkconfig_description), - Intent(requireContext(), NetworkConfigActivity::class.java) - ) - )) - list.adapter = adapter - list.layoutManager = LinearLayoutManager(context) - list.addItemDecoration(DividerItemDecoration(requireContext(), DividerItemDecoration.VERTICAL)) - - return view - } - - data class CoreSetting( - val title: CharSequence, - val summary: CharSequence? = null, - val intent: Intent? = null - ) - - class CoreSettingsAdapter(private val data: List<CoreSetting>) : - RecyclerView.Adapter<CoreSettingsAdapter.CoreSettingsViewHolder>() { - override fun getItemCount() = data.size + val networkAdapter = SettingsItemAdapter { + /* + val intent = Intent(requireContext(), NetworkActivity::class.java) + intent.putExtra("network", it) + startActivity(intent) + */ + } - override fun onCreateViewHolder(parent: ViewGroup, viewType: Int) = CoreSettingsViewHolder( - LayoutInflater.from(parent.context).inflate(R.layout.settings_item, parent, false) - ) + val identityAdapter = SettingsItemAdapter { + val intent = Intent(requireContext(), IdentityActivity::class.java) + intent.putExtra("identity", it) + startActivity(intent) + } - override fun onBindViewHolder(holder: CoreSettingsViewHolder, position: Int) { - holder.bind(data[position]) + val chatListAdapter = SettingsItemAdapter { + /* + val intent = Intent(requireContext(), BufferViewConfigActivity::class.java) + intent.putExtra("bufferviewconfig", it) + startActivity(intent) + */ } - class CoreSettingsViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) { - @BindView(R.id.title) - lateinit var title: TextView + val itemDecoration = DividerItemDecoration(requireContext(), DividerItemDecoration.VERTICAL) - @BindView(R.id.summary) - lateinit var summary: TextView + networks.adapter = networkAdapter + networks.layoutManager = LinearLayoutManager(context) + networks.addItemDecoration(itemDecoration) + ViewCompat.setNestedScrollingEnabled(networks, false) + + viewModel.networks.switchMap { + combineLatest(it.values.map(Network::liveNetworkInfo)).map { + it.map { + SettingsItem(it.networkId, it.networkName) + }.sortedBy(SettingsItem::name) + } + }.toLiveData().observe(this, Observer { + networkAdapter.submitList(it.orEmpty()) + }) - var item: CoreSetting? = null + identities.adapter = identityAdapter + identities.layoutManager = LinearLayoutManager(context) + identities.addItemDecoration(itemDecoration) + ViewCompat.setNestedScrollingEnabled(identities, false) - init { - ButterKnife.bind(this, itemView) - itemView.setOnClickListener { - item?.intent?.let(itemView.context::startActivity) - } + viewModel.identities.switchMap { + combineLatest(it.values.map(Identity::liveUpdates)).map { + it.map { + SettingsItem(it.id(), it.identityName()) + }.sortedBy(SettingsItem::name) } + }.toLiveData().observe(this, Observer { + identityAdapter.submitList(it.orEmpty()) + }) - fun bind(item: CoreSetting) { - this.item = item + chatlists.adapter = chatListAdapter + chatlists.layoutManager = LinearLayoutManager(context) + chatlists.addItemDecoration(itemDecoration) + ViewCompat.setNestedScrollingEnabled(chatlists, false) - this.title.text = item.title - this.summary.text = item.summary - this.summary.visibleIf(!item.summary.isNullOrBlank()) + viewModel.bufferViewConfigs.switchMap { + combineLatest(it.map(BufferViewConfig::live_config)).map { + it.map { + SettingsItem(it.bufferViewId(), it.bufferViewName()) + }.sortedBy(SettingsItem::name) } + }.toLiveData().observe(this, Observer { + chatListAdapter.submitList(it.orEmpty()) + }) + + networkConfig.setOnClickListener { + startActivity(Intent(requireContext(), NetworkConfigActivity::class.java)) } + + return view } } \ No newline at end of file diff --git a/app/src/main/java/de/kuschku/quasseldroid/ui/coresettings/SettingsItem.kt b/app/src/main/java/de/kuschku/quasseldroid/ui/coresettings/SettingsItem.kt new file mode 100644 index 0000000000000000000000000000000000000000..939c36527458cf2dd7c865d294855e431c8e388b --- /dev/null +++ b/app/src/main/java/de/kuschku/quasseldroid/ui/coresettings/SettingsItem.kt @@ -0,0 +1,6 @@ +package de.kuschku.quasseldroid.ui.coresettings + +data class SettingsItem( + val id: Int, + val name: String +) \ No newline at end of file diff --git a/app/src/main/java/de/kuschku/quasseldroid/ui/coresettings/SettingsItemAdapter.kt b/app/src/main/java/de/kuschku/quasseldroid/ui/coresettings/SettingsItemAdapter.kt new file mode 100644 index 0000000000000000000000000000000000000000..ac181272004ece8b1f5fbd4d566b164a5dc51d24 --- /dev/null +++ b/app/src/main/java/de/kuschku/quasseldroid/ui/coresettings/SettingsItemAdapter.kt @@ -0,0 +1,53 @@ +package de.kuschku.quasseldroid.ui.coresettings + +import android.support.v7.recyclerview.extensions.ListAdapter +import android.support.v7.util.DiffUtil +import android.support.v7.widget.RecyclerView +import android.view.LayoutInflater +import android.view.View +import android.view.ViewGroup +import android.widget.TextView +import butterknife.BindView +import butterknife.ButterKnife +import de.kuschku.libquassel.protocol.IdentityId +import de.kuschku.quasseldroid.R + +class SettingsItemAdapter(private val clickListener: (Int) -> Unit) : + ListAdapter<SettingsItem, SettingsItemAdapter.SettingsItemViewHolder>( + object : DiffUtil.ItemCallback<SettingsItem>() { + override fun areItemsTheSame(oldItem: SettingsItem, newItem: SettingsItem) = + oldItem.id == newItem.id + + override fun areContentsTheSame(oldItem: SettingsItem, newItem: SettingsItem) = + oldItem == newItem + } + ) { + override fun onCreateViewHolder(parent: ViewGroup, viewType: Int) = SettingsItemViewHolder( + LayoutInflater.from(parent.context).inflate(R.layout.settings_item, parent, false), + clickListener + ) + + override fun onBindViewHolder(holder: SettingsItemViewHolder, position: Int) { + holder.bind(getItem(position)) + } + + class SettingsItemViewHolder(itemView: View, clickListener: (Int) -> Unit) : + RecyclerView.ViewHolder(itemView) { + @BindView(R.id.title) + lateinit var title: TextView + + var id: IdentityId? = null + + init { + ButterKnife.bind(this, itemView) + itemView.setOnClickListener { + id?.let(clickListener::invoke) + } + } + + fun bind(item: SettingsItem) { + this.id = item.id + this.title.text = item.name + } + } +} \ No newline at end of file diff --git a/app/src/main/java/de/kuschku/quasseldroid/ui/coresettings/identity/IdentitiesActivity.kt b/app/src/main/java/de/kuschku/quasseldroid/ui/coresettings/identity/IdentitiesActivity.kt deleted file mode 100644 index ca0cc09af75749d11fdce48e09efa3d64a301f2e..0000000000000000000000000000000000000000 --- a/app/src/main/java/de/kuschku/quasseldroid/ui/coresettings/identity/IdentitiesActivity.kt +++ /dev/null @@ -1,5 +0,0 @@ -package de.kuschku.quasseldroid.ui.coresettings.identity - -import de.kuschku.quasseldroid.util.ui.SettingsActivity - -class IdentitiesActivity : SettingsActivity(IdentitiesFragment()) \ No newline at end of file diff --git a/app/src/main/java/de/kuschku/quasseldroid/ui/coresettings/identity/IdentitiesFragment.kt b/app/src/main/java/de/kuschku/quasseldroid/ui/coresettings/identity/IdentitiesFragment.kt deleted file mode 100644 index a8ad3a124a37577dfe7029385f18454a4ae4e715..0000000000000000000000000000000000000000 --- a/app/src/main/java/de/kuschku/quasseldroid/ui/coresettings/identity/IdentitiesFragment.kt +++ /dev/null @@ -1,103 +0,0 @@ -package de.kuschku.quasseldroid.ui.coresettings.identity - -import android.arch.lifecycle.Observer -import android.content.Intent -import android.os.Bundle -import android.support.v7.recyclerview.extensions.ListAdapter -import android.support.v7.util.DiffUtil -import android.support.v7.widget.DividerItemDecoration -import android.support.v7.widget.LinearLayoutManager -import android.support.v7.widget.RecyclerView -import android.view.LayoutInflater -import android.view.View -import android.view.ViewGroup -import android.widget.TextView -import butterknife.BindView -import butterknife.ButterKnife -import de.kuschku.libquassel.protocol.IdentityId -import de.kuschku.libquassel.quassel.syncables.Identity -import de.kuschku.quasseldroid.R -import de.kuschku.quasseldroid.util.helper.combineLatest -import de.kuschku.quasseldroid.util.helper.toLiveData -import de.kuschku.quasseldroid.util.service.ServiceBoundFragment - -class IdentitiesFragment : ServiceBoundFragment() { - @BindView(R.id.list) - lateinit var list: RecyclerView - - override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, - savedInstanceState: Bundle?): View? { - val view = inflater.inflate(R.layout.settings_list, container, false) - ButterKnife.bind(this, view) - - val adapter = IdentityAdapter { - val intent = Intent(requireContext(), IdentityActivity::class.java) - intent.putExtra("identity", it) - startActivity(intent) - } - - list.adapter = adapter - list.layoutManager = LinearLayoutManager(context) - list.addItemDecoration(DividerItemDecoration(requireContext(), DividerItemDecoration.VERTICAL)) - - viewModel.identities.switchMap { - combineLatest(it.values.map(Identity::liveUpdates)).map { - it.map { - IdentityItem( - it.id(), - it.identityName() - ) - } - } - }.toLiveData().observe(this, Observer { - adapter.submitList(it.orEmpty()) - }) - - return view - } - - data class IdentityItem( - val id: IdentityId, - val name: String - ) - - class IdentityAdapter(private val clickListener: (IdentityId) -> Unit) : - ListAdapter<IdentityItem, IdentityAdapter.IdentityViewHolder>( - object : DiffUtil.ItemCallback<IdentityItem>() { - override fun areItemsTheSame(oldItem: IdentityItem, newItem: IdentityItem) = - oldItem.id == newItem.id - - override fun areContentsTheSame(oldItem: IdentityItem, newItem: IdentityItem) = - oldItem == newItem - } - ) { - override fun onCreateViewHolder(parent: ViewGroup, viewType: Int) = IdentityViewHolder( - LayoutInflater.from(parent.context).inflate(R.layout.settings_item, parent, false), - clickListener - ) - - override fun onBindViewHolder(holder: IdentityViewHolder, position: Int) { - holder.bind(getItem(position)) - } - - class IdentityViewHolder(itemView: View, clickListener: (IdentityId) -> Unit) : - RecyclerView.ViewHolder(itemView) { - @BindView(R.id.title) - lateinit var title: TextView - - var id: IdentityId? = null - - init { - ButterKnife.bind(this, itemView) - itemView.setOnClickListener { - id?.let(clickListener::invoke) - } - } - - fun bind(item: IdentityItem) { - this.id = item.id - this.title.text = item.name - } - } - } -} \ No newline at end of file diff --git a/app/src/main/java/de/kuschku/quasseldroid/ui/coresettings/identity/IdentitiesFragmentProvider.kt b/app/src/main/java/de/kuschku/quasseldroid/ui/coresettings/identity/IdentitiesFragmentProvider.kt deleted file mode 100644 index 54fd243aea1ca4cc04749e04fdadd18812aaed43..0000000000000000000000000000000000000000 --- a/app/src/main/java/de/kuschku/quasseldroid/ui/coresettings/identity/IdentitiesFragmentProvider.kt +++ /dev/null @@ -1,10 +0,0 @@ -package de.kuschku.quasseldroid.ui.coresettings.identity - -import dagger.Module -import dagger.android.ContributesAndroidInjector - -@Module -abstract class IdentitiesFragmentProvider { - @ContributesAndroidInjector - abstract fun bindIdentitiesFragment(): IdentitiesFragment -} diff --git a/app/src/main/java/de/kuschku/quasseldroid/ui/coresettings/identity/IdentityFragment.kt b/app/src/main/java/de/kuschku/quasseldroid/ui/coresettings/identity/IdentityFragment.kt index 52479c3df07fb0d38c92a6d10e6de05451d5e9bf..d83068daf3b850846f3c319528b23a50fb1212fb 100644 --- a/app/src/main/java/de/kuschku/quasseldroid/ui/coresettings/identity/IdentityFragment.kt +++ b/app/src/main/java/de/kuschku/quasseldroid/ui/coresettings/identity/IdentityFragment.kt @@ -2,6 +2,7 @@ package de.kuschku.quasseldroid.ui.coresettings.identity import android.arch.lifecycle.Observer import android.os.Bundle +import android.support.v4.view.ViewCompat import android.support.v7.widget.LinearLayoutManager import android.support.v7.widget.RecyclerView import android.support.v7.widget.RecyclerView.ViewHolder @@ -98,6 +99,8 @@ class IdentityFragment : SettingsFragment() { adapter = IdentityNicksAdapter(::nickClick, ::startDrag) nicks.layoutManager = LinearLayoutManager(requireContext()) nicks.adapter = adapter + ViewCompat.setNestedScrollingEnabled(nicks, false) + val callback = DragSortItemTouchHelperCallback(adapter) helper = ItemTouchHelper(callback) helper.attachToRecyclerView(nicks) diff --git a/app/src/main/res/drawable/ic_list_bulleted.xml b/app/src/main/res/drawable/ic_list_bulleted.xml new file mode 100644 index 0000000000000000000000000000000000000000..701472b216bd6bc5c6e82d4f726726fb481b06fe --- /dev/null +++ b/app/src/main/res/drawable/ic_list_bulleted.xml @@ -0,0 +1,9 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportHeight="24" + android:viewportWidth="24"> + <path + android:fillColor="#000" + android:pathData="M7,5H21V7H7V5M7,13V11H21V13H7M4,4.5A1.5,1.5 0 0,1 5.5,6A1.5,1.5 0 0,1 4,7.5A1.5,1.5 0 0,1 2.5,6A1.5,1.5 0 0,1 4,4.5M4,10.5A1.5,1.5 0 0,1 5.5,12A1.5,1.5 0 0,1 4,13.5A1.5,1.5 0 0,1 2.5,12A1.5,1.5 0 0,1 4,10.5M7,19V17H21V19H7M4,16.5A1.5,1.5 0 0,1 5.5,18A1.5,1.5 0 0,1 4,19.5A1.5,1.5 0 0,1 2.5,18A1.5,1.5 0 0,1 4,16.5Z" /> +</vector> \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_about.xml b/app/src/main/res/layout/fragment_about.xml index 1f91e76b0de0a6fcea69875ef95fe8d2e1bddba8..53c4d37b7ae5deff7f190c0a5985fd4e233b4524 100644 --- a/app/src/main/res/layout/fragment_about.xml +++ b/app/src/main/res/layout/fragment_about.xml @@ -2,7 +2,8 @@ <android.support.v4.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" - android:layout_height="match_parent"> + android:layout_height="match_parent" + android:scrollbars="vertical"> <LinearLayout android:layout_width="match_parent" diff --git a/app/src/main/res/layout/fragment_chat_list.xml b/app/src/main/res/layout/fragment_chat_list.xml index b3de99779cd069092ff9ebc3b929bf26e685deb4..eaf8628d870ab521ecb1e7a73379b05a72263885 100644 --- a/app/src/main/res/layout/fragment_chat_list.xml +++ b/app/src/main/res/layout/fragment_chat_list.xml @@ -32,5 +32,6 @@ android:id="@+id/chatList" android:layout_width="match_parent" android:layout_height="match_parent" + android:scrollbars="vertical" tools:listitem="@layout/widget_buffer" /> </LinearLayout> diff --git a/app/src/main/res/layout/fragment_crash.xml b/app/src/main/res/layout/fragment_crash.xml index d84e8ff1d1a6320ca5470f1df23866b6a0e5792b..7783a1bbada5f70433542c03d30465603d712bfd 100644 --- a/app/src/main/res/layout/fragment_crash.xml +++ b/app/src/main/res/layout/fragment_crash.xml @@ -2,4 +2,5 @@ <android.support.v7.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/list" android:layout_width="match_parent" - android:layout_height="match_parent" /> \ No newline at end of file + android:layout_height="match_parent" + android:scrollbars="vertical" /> \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_license.xml b/app/src/main/res/layout/fragment_license.xml index 26a12b053b5a4e6323460339feeb9ef8adedaa21..e6ec8ca96cebea61299dad65766fe9efd79943ee 100644 --- a/app/src/main/res/layout/fragment_license.xml +++ b/app/src/main/res/layout/fragment_license.xml @@ -5,24 +5,10 @@ android:layout_height="match_parent" android:scrollbars="vertical"> - <LinearLayout + <TextView + android:id="@+id/text" android:layout_width="match_parent" android:layout_height="wrap_content" - android:orientation="vertical" - android:padding="16dp"> - - <TextView - android:id="@+id/name" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginBottom="8dp" - android:textAppearance="@style/TextAppearance.AppCompat.Title" - tools:text="Apache-2.0" /> - - <TextView - android:id="@+id/text" - android:layout_width="match_parent" - android:layout_height="wrap_content" - tools:text="@string/license_apache_2" /> - </LinearLayout> + android:padding="16dp" + tools:text="@string/license_apache_2" /> </android.support.v4.widget.NestedScrollView> \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_messages.xml b/app/src/main/res/layout/fragment_messages.xml index abb48fc544e1a1a76a64639d424ac20d261b1ccf..2605c18120983138f65e57d26ca4de611c719164 100644 --- a/app/src/main/res/layout/fragment_messages.xml +++ b/app/src/main/res/layout/fragment_messages.xml @@ -16,6 +16,7 @@ android:id="@+id/messages" android:layout_width="match_parent" android:layout_height="match_parent" + android:scrollbars="vertical" app:stackFromEnd="true" tools:listitem="@layout/widget_chatmessage_plain" /> diff --git a/app/src/main/res/layout/fragment_nick_list.xml b/app/src/main/res/layout/fragment_nick_list.xml index 58f05b5ebfe6d9f5875126ab19fabadde6cee2c8..a1ef84e92ee1af3a26746c6ab465750a226f9188 100644 --- a/app/src/main/res/layout/fragment_nick_list.xml +++ b/app/src/main/res/layout/fragment_nick_list.xml @@ -6,5 +6,6 @@ android:background="?attr/colorBackground" android:clipToPadding="false" android:fitsSystemWindows="true" + android:scrollbars="vertical" tools:listitem="@layout/widget_nick" tools:showIn="@layout/activity_main" /> diff --git a/app/src/main/res/layout/preference_vertical.xml b/app/src/main/res/layout/preference_vertical.xml index 3799ea31be3edaa1ed04104598ffee600f916fdc..0b1d34f85176e4f1848fd640683fdf5d65798563 100644 --- a/app/src/main/res/layout/preference_vertical.xml +++ b/app/src/main/res/layout/preference_vertical.xml @@ -19,6 +19,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:background="?android:attr/selectableItemBackground" + android:baselineAligned="false" android:clipToPadding="false" android:focusable="true" android:gravity="center_vertical" @@ -26,7 +27,6 @@ android:paddingEnd="?android:attr/listPreferredItemPaddingRight" android:paddingLeft="?android:attr/listPreferredItemPaddingLeft" android:paddingRight="?android:attr/listPreferredItemPaddingRight" - android:baselineAligned="false" android:paddingStart="?android:attr/listPreferredItemPaddingLeft"> <FrameLayout @@ -39,10 +39,10 @@ android:minWidth="60dp" android:orientation="horizontal" android:paddingBottom="4dp" - android:paddingLeft="0dp" - android:paddingStart="0dp" android:paddingEnd="12dp" + android:paddingLeft="0dp" android:paddingRight="12dp" + android:paddingStart="0dp" android:paddingTop="4dp"> <android.support.v7.internal.widget.PreferenceImageView diff --git a/app/src/main/res/layout/settings_identity.xml b/app/src/main/res/layout/settings_identity.xml index 846ecfdbe802cc1fb125d44340f34aee7e862459..6d490acd67b56bb04e1815e46f10b9eb6632f910 100644 --- a/app/src/main/res/layout/settings_identity.xml +++ b/app/src/main/res/layout/settings_identity.xml @@ -3,7 +3,8 @@ xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" - android:layout_height="match_parent"> + android:layout_height="match_parent" + android:scrollbars="vertical"> <LinearLayout style="@style/Widget.CoreSettings.Wrapper"> diff --git a/app/src/main/res/layout/settings_item.xml b/app/src/main/res/layout/settings_item.xml index 3a1a9a6d88d54eb9d701197b70441276e87306d0..8d9ac81731a80f37cff028328f1841f5bee27661 100644 --- a/app/src/main/res/layout/settings_item.xml +++ b/app/src/main/res/layout/settings_item.xml @@ -3,14 +3,15 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="?android:attr/selectableItemBackground" + android:background="?selectableItemBackground" android:focusable="true" android:gravity="center_vertical" - android:minHeight="?android:attr/listPreferredItemHeightSmall" - android:paddingEnd="?android:attr/listPreferredItemPaddingRight" - android:paddingLeft="?android:attr/listPreferredItemPaddingLeft" - android:paddingRight="?android:attr/listPreferredItemPaddingRight" - android:paddingStart="?android:attr/listPreferredItemPaddingLeft"> + android:minHeight="?listPreferredItemHeightSmall" + android:paddingEnd="?listPreferredItemPaddingRight" + android:paddingLeft="8dp" + android:paddingRight="?listPreferredItemPaddingRight" + android:paddingStart="8dp" + tools:showIn="@layout/settings_list"> <LinearLayout android:layout_width="match_parent" @@ -33,7 +34,7 @@ android:id="@+id/summary" android:layout_width="match_parent" android:layout_height="wrap_content" - android:textAppearance="?android:attr/textAppearanceSmall" + android:textAppearance="?android:textAppearanceSmall" android:textColor="?colorTextPrimary" android:visibility="gone" /> </LinearLayout> diff --git a/app/src/main/res/layout/settings_list.xml b/app/src/main/res/layout/settings_list.xml index 627c357e7f0098804f61e8971922a0f0f293790e..31b83f71235b456c75b676deab28a4cfb3cd0071 100644 --- a/app/src/main/res/layout/settings_list.xml +++ b/app/src/main/res/layout/settings_list.xml @@ -1,7 +1,229 @@ <?xml version="1.0" encoding="utf-8"?> -<android.support.v7.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android" +<android.support.v4.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" - android:id="@+id/list" android:layout_width="match_parent" android:layout_height="match_parent" - tools:listitem="@layout/settings_item" /> \ No newline at end of file + android:scrollbars="vertical"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:gravity="center_vertical" + android:minHeight="?listPreferredItemHeightSmall" + android:paddingEnd="?listPreferredItemPaddingRight" + android:paddingLeft="?listPreferredItemPaddingLeft" + android:paddingRight="?listPreferredItemPaddingRight" + android:paddingStart="?listPreferredItemPaddingLeft"> + + <android.support.v7.widget.AppCompatImageView + style="@style/Widget.CoreSettings.PrimaryItemIcon" + app:srcCompat="@drawable/ic_server_network" /> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:paddingBottom="16dp" + android:paddingTop="16dp"> + + <TextView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:ellipsize="marquee" + android:singleLine="true" + android:text="@string/settings_networks_title" + android:textColor="?colorTextPrimary" + android:textSize="16sp" /> + </LinearLayout> + </LinearLayout> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginLeft="72dp" + android:layout_marginStart="72dp" + android:orientation="vertical"> + + <android.support.v7.widget.RecyclerView + android:id="@+id/networks" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:visibility="visible" + tools:itemCount="2" + tools:listitem="@layout/settings_item" /> + + <LinearLayout + style="@style/Widget.CoreSettings.EditTextLayout" + android:orientation="horizontal"> + + <Button + android:id="@+id/new_network" + style="@style/Widget.Button.Borderless.Colored" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/label_new_network" /> + </LinearLayout> + </LinearLayout> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:gravity="center_vertical" + android:minHeight="?listPreferredItemHeightSmall" + android:paddingEnd="?listPreferredItemPaddingRight" + android:paddingLeft="?listPreferredItemPaddingLeft" + android:paddingRight="?listPreferredItemPaddingRight" + android:paddingStart="?listPreferredItemPaddingLeft"> + + <android.support.v7.widget.AppCompatImageView + style="@style/Widget.CoreSettings.PrimaryItemIcon" + app:srcCompat="@drawable/ic_account_card" /> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:paddingBottom="16dp" + android:paddingTop="16dp"> + + <TextView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:ellipsize="marquee" + android:singleLine="true" + android:text="@string/settings_identities_title" + android:textColor="?colorTextPrimary" + android:textSize="16sp" /> + </LinearLayout> + </LinearLayout> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginLeft="72dp" + android:layout_marginStart="72dp" + android:orientation="vertical"> + + <android.support.v7.widget.RecyclerView + android:id="@+id/identities" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:visibility="visible" + tools:itemCount="1" + tools:listitem="@layout/settings_item" /> + + <LinearLayout + style="@style/Widget.CoreSettings.EditTextLayout" + android:orientation="horizontal"> + + <Button + android:id="@+id/new_identity" + style="@style/Widget.Button.Borderless.Colored" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/label_new_identity" /> + </LinearLayout> + </LinearLayout> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:gravity="center_vertical" + android:minHeight="?listPreferredItemHeightSmall" + android:paddingEnd="?listPreferredItemPaddingRight" + android:paddingLeft="?listPreferredItemPaddingLeft" + android:paddingRight="?listPreferredItemPaddingRight" + android:paddingStart="?listPreferredItemPaddingLeft"> + + <android.support.v7.widget.AppCompatImageView + style="@style/Widget.CoreSettings.PrimaryItemIcon" + app:srcCompat="@drawable/ic_list_bulleted" /> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:paddingBottom="16dp" + android:paddingTop="16dp"> + + <TextView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:ellipsize="marquee" + android:singleLine="true" + android:text="@string/settings_chatlists_title" + android:textColor="?colorTextPrimary" + android:textSize="16sp" /> + </LinearLayout> + </LinearLayout> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginLeft="72dp" + android:layout_marginStart="72dp" + android:orientation="vertical"> + + <android.support.v7.widget.RecyclerView + android:id="@+id/chatlists" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:visibility="visible" + tools:itemCount="2" + tools:listitem="@layout/settings_item" /> + + <LinearLayout + style="@style/Widget.CoreSettings.EditTextLayout" + android:orientation="horizontal"> + + <Button + android:id="@+id/new_chatlist" + style="@style/Widget.Button.Borderless.Colored" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/label_new_chatlist" /> + </LinearLayout> + </LinearLayout> + + <LinearLayout + android:id="@+id/networkconfig" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:background="?selectableItemBackground" + android:focusable="true" + android:gravity="center_vertical" + android:minHeight="?listPreferredItemHeightSmall" + android:paddingEnd="?listPreferredItemPaddingRight" + android:paddingLeft="?listPreferredItemPaddingLeft" + android:paddingRight="?listPreferredItemPaddingRight" + android:paddingStart="?listPreferredItemPaddingLeft"> + + <android.support.v7.widget.AppCompatImageView + style="@style/Widget.CoreSettings.PrimaryItemIcon" + app:srcCompat="@drawable/ic_message_bulleted" /> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:paddingBottom="16dp" + android:paddingTop="16dp"> + + <TextView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:ellipsize="marquee" + android:singleLine="true" + android:text="@string/settings_networkconfig_title" + android:textColor="?colorTextPrimary" + android:textSize="16sp" /> + </LinearLayout> + </LinearLayout> + </LinearLayout> +</android.support.v4.widget.NestedScrollView> \ No newline at end of file diff --git a/app/src/main/res/layout/settings_networkconfig.xml b/app/src/main/res/layout/settings_networkconfig.xml index f654040fa37c8b30180ba0149953a21e9419de09..c730dfde5ac189f7a9a4a88612415fde3af3e9be 100644 --- a/app/src/main/res/layout/settings_networkconfig.xml +++ b/app/src/main/res/layout/settings_networkconfig.xml @@ -3,7 +3,8 @@ xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" - android:layout_height="match_parent"> + android:layout_height="match_parent" + android:scrollbars="vertical"> <LinearLayout style="@style/Widget.CoreSettings.Wrapper"> diff --git a/app/src/main/res/layout/setup_account_edit.xml b/app/src/main/res/layout/setup_account_edit.xml index 8c9c4e3954f94b700706fcc9c8e9444d7ec026f9..d2c305e91f51e8c522b2080816a00daa5b2cfa99 100644 --- a/app/src/main/res/layout/setup_account_edit.xml +++ b/app/src/main/res/layout/setup_account_edit.xml @@ -27,8 +27,8 @@ android:layout_width="24dp" android:layout_height="24dp" android:layout_gravity="center_vertical" - app:tint="?android:textColorSecondary" app:srcCompat="@drawable/ic_pencil" + app:tint="?android:textColorSecondary" tools:ignore="ContentDescription" /> </FrameLayout> @@ -65,8 +65,8 @@ android:layout_width="24dp" android:layout_height="24dp" android:layout_gravity="center_vertical" - app:tint="?android:textColorSecondary" app:srcCompat="@drawable/ic_server_network" + app:tint="?android:textColorSecondary" tools:ignore="ContentDescription" /> </FrameLayout> @@ -125,8 +125,8 @@ android:layout_width="24dp" android:layout_height="24dp" android:layout_gravity="center_vertical" - app:tint="?android:textColorSecondary" app:srcCompat="@drawable/ic_account" + app:tint="?android:textColorSecondary" tools:ignore="ContentDescription" /> </FrameLayout> diff --git a/app/src/main/res/layout/widget_formatting.xml b/app/src/main/res/layout/widget_formatting.xml index ba916fcea02cd28d4792ee8a834307f25749aa05..eebeda3c6d6e456a6469d5f46dc1efd70c506b00 100644 --- a/app/src/main/res/layout/widget_formatting.xml +++ b/app/src/main/res/layout/widget_formatting.xml @@ -68,9 +68,9 @@ <android.support.v7.widget.AppCompatImageButton android:id="@+id/action_format_foreground" style="@style/Widget.Button.Format" - android:contentDescription="@string/label_foreground" android:layout_width="match_parent" android:layout_height="match_parent" + android:contentDescription="@string/label_foreground" android:paddingBottom="4dp" app:srcCompat="@drawable/ic_format_foreground" app:tint="?colorControlNormal" /> @@ -97,9 +97,9 @@ <android.support.v7.widget.AppCompatImageButton android:id="@+id/action_format_background" style="@style/Widget.Button.Format" - android:contentDescription="@string/label_background" android:layout_width="match_parent" android:layout_height="match_parent" + android:contentDescription="@string/label_background" android:paddingBottom="4dp" app:srcCompat="@drawable/ic_format_background" app:tint="?colorControlNormal" /> diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 7454727507797d7ebd12625fa580487fa31ef616..e8c655bd028ca66b8156a4840717df66f7d41871 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -33,6 +33,9 @@ <string name="label_libraries">Bibliotheken</string> <string name="label_license">Lizenz</string> <string name="label_new_account">Account hinzufügen</string> + <string name="label_new_chatlist">Chatliste hinzufügen</string> + <string name="label_new_identity">Identität hinzufügen</string> + <string name="label_new_network">Netzwerk hinzufügen</string> <string name="label_new_nick">Spitzname hinzufügen</string> <string name="label_no">Nein</string> <string name="label_reset">Zurücksetzen</string> diff --git a/app/src/main/res/values-de/strings_contributors.xml b/app/src/main/res/values-de/strings_contributors.xml new file mode 100644 index 0000000000000000000000000000000000000000..e66b4f4beeff986dcbcd21fb5a41953455eb86b3 --- /dev/null +++ b/app/src/main/res/values-de/strings_contributors.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <string name="contributor_description_freqmod">Ursprüngliche qdatastream Deserialisierungsversuche</string> + <string name="contributor_description_sandsmark">Historische Protokollimplementierung, (De-)Serialisierer, Projekt (De-)Moralisierer</string> + <string name="contributor_description_magnuf">Historisches UI</string> + <string name="contributor_description_kenji">Historisches UI</string> + <string name="contributor_description_justjanne">Rwerite, UI, Annotation Processors, Backend</string> +</resources> \ No newline at end of file diff --git a/app/src/main/res/values-de/strings_settings.xml b/app/src/main/res/values-de/strings_settings.xml index 9323ec34a66c1e040e22a543bf44dfceff376deb..c527829c02697bc4241beb8c70363d84e9c46cc0 100644 --- a/app/src/main/res/values-de/strings_settings.xml +++ b/app/src/main/res/values-de/strings_settings.xml @@ -1,30 +1,9 @@ <?xml version="1.0" encoding="utf-8"?> <resources> - <string name="settings_networkconfig_title">Network Config</string> - <string name="settings_networkconfig_description" /> - - <string name="settings_networkconfig_ping_timeout">Erkennung von Ping-Zeitüberschreitungen</string> - - <string name="settings_networkconfig_ping_interval">Ping-Intervall</string> - <string name="settings_networkconfig_ping_interval_unit">Sekunden</string> - - <string name="settings_networkconfig_max_ping_count">Verbindungstrennung nach</string> - <string name="settings_networkconfig_max_ping_count_unit">verpassten Pings</string> - - <string name="settings_networkconfig_auto_who">Automatische Suche nach Nutzerinformationen</string> - <string name="settings_networkconfig_auto_who_interval">Aktualisierungs-Intervall</string> - <string name="settings_networkconfig_auto_who_interval_unit">Sekunden</string> - <string name="settings_networkconfig_auto_who_nick_limit">Ignoriere Chats mit mehr als</string> - <string name="settings_networkconfig_auto_who_nick_limit_unit">Nutzern</string> - <string name="settings_networkconfig_auto_who_delay">Mindestabstand zwischen zwei Abfragen</string> - <string name="settings_networkconfig_auto_who_delay_unit">Sekunden</string> - - <string name="settings_networkconfig_standard_ctcp">Standardkonformes CTCP-Verhalten aktivieren</string> - + <string name="settings_networks_title">Netzwerke</string> + <string name="settings_network_title">Netzwerk</string> <string name="settings_identities_title">Identitäten</string> - <string name="settings_identities_description" /> - <string name="settings_identity_title">Identität</string> <string name="settings_identity_names">Namen</string> <string name="settings_identity_identity_name">Identitätsname</string> @@ -39,4 +18,22 @@ <string name="settings_identity_away_reason">Abwesenheitsgrund</string> <string name="settings_identity_detach_away">Abwesend wenn nicht verbunden</string> <string name="settings_identity_detach_away_reason">Abwesenheitsgrund</string> + + <string name="settings_chatlists_title">Chatlisten</string> + <string name="settings_chatlist_title">Chatliste</string> + + <string name="settings_networkconfig_title">IRC Konfiguration</string> + <string name="settings_networkconfig_ping_timeout">Erkennung von Ping-Zeitüberschreitungen</string> + <string name="settings_networkconfig_ping_interval">Ping-Intervall</string> + <string name="settings_networkconfig_ping_interval_unit">Sekunden</string> + <string name="settings_networkconfig_max_ping_count">Verbindungstrennung nach</string> + <string name="settings_networkconfig_max_ping_count_unit">verpassten Pings</string> + <string name="settings_networkconfig_auto_who">Automatische Suche nach Nutzerinformationen</string> + <string name="settings_networkconfig_auto_who_interval">Aktualisierungs-Intervall</string> + <string name="settings_networkconfig_auto_who_interval_unit">Sekunden</string> + <string name="settings_networkconfig_auto_who_nick_limit">Ignoriere Chats mit mehr als</string> + <string name="settings_networkconfig_auto_who_nick_limit_unit">Nutzern</string> + <string name="settings_networkconfig_auto_who_delay">Mindestabstand zwischen zwei Abfragen</string> + <string name="settings_networkconfig_auto_who_delay_unit">Sekunden</string> + <string name="settings_networkconfig_standard_ctcp">Standardkonformes CTCP-Verhalten aktivieren</string> </resources> \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 0485740d40a40c4efd0b450d5ebf163c83b51eb8..5ced578d3030333dcb91ca6b02d4b49d7a534484 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -33,6 +33,9 @@ <string name="label_libraries">Libraries</string> <string name="label_license">License</string> <string name="label_new_account">New Account</string> + <string name="label_new_chatlist">New Chatlist</string> + <string name="label_new_identity">New Identity</string> + <string name="label_new_network">New Network</string> <string name="label_new_nick">New Nick</string> <string name="label_no">No</string> <string name="label_reset">Reset</string> diff --git a/app/src/main/res/values/strings_contributors.xml b/app/src/main/res/values/strings_contributors.xml new file mode 100644 index 0000000000000000000000000000000000000000..a0800dbeeb4ca9a8cb79fb2f3ffa0af01ab54489 --- /dev/null +++ b/app/src/main/res/values/strings_contributors.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <string name="contributor_description_freqmod">Initial qdatastream deserialization attempts</string> + <string name="contributor_description_sandsmark">Legacy protocol implementation, (de)serializers, project (de)moralizer</string> + <string name="contributor_description_magnuf">Legacy UI</string> + <string name="contributor_description_kenji">Legacy UI</string> + <string name="contributor_description_justjanne">Rewrite, UI, Annotation Processors, Backend</string> +</resources> \ No newline at end of file diff --git a/app/src/main/res/values/strings_licenses.xml b/app/src/main/res/values/strings_licenses.xml index 7aa355b38b32f3772ff314c491d990e761828e02..8fde63d09f5923f7df6007612840169e7bf3a58e 100644 --- a/app/src/main/res/values/strings_licenses.xml +++ b/app/src/main/res/values/strings_licenses.xml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <resources xmlns:tools="http://schemas.android.com/tools"> <string name="license_apache_2" translatable="false"><![CDATA[ + <h2>Apache License</h2> <p>Version 2.0, January 2004<br /><br /><a href="http://www.apache.org/licenses/">http://www.apache.org/licenses/</a></p> <p>TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION</p> <p><strong>1. Definitions</strong>.</p> @@ -27,22 +28,48 @@ <p><strong>8. Limitation of Liability</strong>. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.</p> <p><strong>9. Accepting Warranty or Additional Liability</strong>. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.</p> ]]></string> - <string name="license_materialdialogs" tools:ignore="TypographyOther" translatable="false"><![CDATA[ + <string name="license_materialdesignicons" translatable="false" tools:ignore="TypographyOther"><![CDATA[ + <p>Copyright (c) 2014, Austin Andrews (<a href="http://materialdesignicons.com/">http://materialdesignicons.com/<a/>), with Reserved Font Name Material Design Icons.</p> + <p>Copyright (c) 2014, Google (<a href="http://www.google.com/design/">http://www.google.com/design/</a>) uses the license at <a href="https://github.com/google/material-design-icons/blob/master/LICENSE">https://github.com/google/material-design-icons/blob/master/LICENSE</a></p> + <p>This Font Software is licensed under the SIL Open Font License, Version 1.1.</p> + <p>This license is copied below, and is also available with a FAQ at: <a href="http://scripts.sil.org/OFL">http://scripts.sil.org/OFL</a></p> + <h2>SIL OPEN FONT LICENSE </h2> + <p>Version 1.1 - 26 February 2007</p> + <h3>PREAMBLE</h3> + <p>The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others.</p> + <p>The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives.</p><a name="ebb1469e"></a> + <h3>DEFINITIONS</h3> + <p>"Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation.</p> + <p>"Reserved Font Name" refers to any names specified as such after the copyright statement(s).</p> + <p>"Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s).</p> + <p>"Modified Version" refers to any derivative made by adding to, deleting, or substituting — in part or in whole — any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment.</p> + <p>"Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software.</p> + <h3>PERMISSION & CONDITIONS</h3> + <p>Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions:</p> + <p>1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself.</p> + <p>2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user.</p> + <p>3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users.</p> + <p>4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission. </p> + <p>5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software.</p> + <h3>TERMINATION</h3> + <p>This license becomes null and void if any of the above conditions are not met.</p> + <h3>DISCLAIMER</h3> + <p>THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.</p> + ]]></string> + <string name="license_materialdialogs" translatable="false" tools:ignore="TypographyOther"><![CDATA[ + <h2>The MIT License (MIT)</h2> <p>Copyright (c) 2014-2016 Aidan Michael Follestad</p> <p>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</p> <p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p> <p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p> ]]></string> - <string name="license_threetenbp" tools:ignore="TypographyOther" translatable="false"><![CDATA[ + <string name="license_threetenbp" translatable="false" tools:ignore="TypographyOther"><![CDATA[ <p>Copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos</p> <p>All rights reserved.</p> <p>Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:</p> - <ol> - <li>Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.</li> - <li>Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.</li> - <li>Neither the name of JSR-310 nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission..</li> - </ol> + <p>1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.</p> + <p>2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.</p> + <p>3. Neither the name of JSR-310 nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.</p> <p>THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</p> ]]></string> - </resources> diff --git a/app/src/main/res/values/strings_settings.xml b/app/src/main/res/values/strings_settings.xml index ce48dfef43d3fa9e71055030b648936d227d7567..7aaab55a8822aadc87b8b619e0ea143a3b56388f 100644 --- a/app/src/main/res/values/strings_settings.xml +++ b/app/src/main/res/values/strings_settings.xml @@ -1,27 +1,9 @@ <?xml version="1.0" encoding="utf-8"?> <resources> - <string name="settings_networkconfig_title">IRC Config</string> - <string name="settings_networkconfig_description" /> - - <string name="settings_networkconfig_ping_timeout">Ping Timeout Detection</string> - <string name="settings_networkconfig_ping_interval">Ping Interval</string> - <string name="settings_networkconfig_ping_interval_unit">seconds</string> - <string name="settings_networkconfig_max_ping_count">Disconnect after</string> - <string name="settings_networkconfig_max_ping_count_unit">missed pings</string> - <string name="settings_networkconfig_auto_who">Automatic User Info Lookup</string> - <string name="settings_networkconfig_auto_who_interval">Update interval</string> - <string name="settings_networkconfig_auto_who_interval_unit">seconds</string> - <string name="settings_networkconfig_auto_who_nick_limit">Ignore channels with more than</string> - <string name="settings_networkconfig_auto_who_nick_limit_unit">users</string> - <string name="settings_networkconfig_auto_who_delay">Minimum delay between requests</string> - <string name="settings_networkconfig_auto_who_delay_unit">seconds</string> - - <string name="settings_networkconfig_standard_ctcp">Standard-Compliant CTCP behavior</string> - + <string name="settings_networks_title">Networks</string> + <string name="settings_network_title">Network</string> <string name="settings_identities_title">Identities</string> - <string name="settings_identities_description" /> - <string name="settings_identity_title">Identity</string> <string name="settings_identity_names">Names</string> <string name="settings_identity_identity_name">Identity name</string> @@ -36,4 +18,22 @@ <string name="settings_identity_away_reason">Away Reason</string> <string name="settings_identity_detach_away">Away on Detach</string> <string name="settings_identity_detach_away_reason">Away on Detach Reason</string> + + <string name="settings_chatlists_title">Chatlists</string> + <string name="settings_chatlist_title">Chatlist</string> + + <string name="settings_networkconfig_title">IRC Config</string> + <string name="settings_networkconfig_ping_timeout">Ping Timeout Detection</string> + <string name="settings_networkconfig_ping_interval">Ping Interval</string> + <string name="settings_networkconfig_ping_interval_unit">seconds</string> + <string name="settings_networkconfig_max_ping_count">Disconnect after</string> + <string name="settings_networkconfig_max_ping_count_unit">missed pings</string> + <string name="settings_networkconfig_auto_who">Automatic User Info Lookup</string> + <string name="settings_networkconfig_auto_who_interval">Update interval</string> + <string name="settings_networkconfig_auto_who_interval_unit">seconds</string> + <string name="settings_networkconfig_auto_who_nick_limit">Ignore channels with more than</string> + <string name="settings_networkconfig_auto_who_nick_limit_unit">users</string> + <string name="settings_networkconfig_auto_who_delay">Minimum delay between requests</string> + <string name="settings_networkconfig_auto_who_delay_unit">seconds</string> + <string name="settings_networkconfig_standard_ctcp">Standard-Compliant CTCP behavior</string> </resources> \ No newline at end of file diff --git a/app/src/main/res/values/styles_widgets.xml b/app/src/main/res/values/styles_widgets.xml index 425af41b2b85ed12847756c626b46bb09036ea95..1b290b66301a77d34d526dc83cb36d59d1c3fd9d 100644 --- a/app/src/main/res/values/styles_widgets.xml +++ b/app/src/main/res/values/styles_widgets.xml @@ -88,8 +88,10 @@ <style name="Widget.CoreSettings.PrimaryItemSwitch" parent=""> <item name="android:layout_width">match_parent</item> - <item name="android:layout_height">match_parent</item> - <item name="android:layout_gravity">center_vertical</item> + <item name="android:layout_height">wrap_content</item> + <item name="android:layout_gravity">fill_vertical</item> + <item name="android:paddingTop">10dp</item> + <item name="android:paddingBottom">10dp</item> <item name="android:gravity">center_vertical</item> <item name="android:textAppearance">?android:textAppearanceMedium</item> <item name="android:textColor">?colorTextPrimary</item>