From 6cb7b0fa66f9e8c14b2f042fba76327ab3c1efa2 Mon Sep 17 00:00:00 2001 From: Mateusz Hinc Date: Sun, 8 Dec 2019 19:02:08 +0100 Subject: [PATCH 1/2] SA-28 implement facebook api --- .idea/misc.xml | 2 +- app/build.gradle | 10 +- app/src/main/AndroidManifest.xml | 20 ++- .../amu/wmi/socialaggregator/MainActivity.kt | 12 -- .../activity/AddSocialActivity.kt | 56 ++++++++ .../socialaggregator/activity/MainActivity.kt | 53 +++++++ .../activity/NewPostActivity.kt | 51 +++++++ .../socialplatforms/FacebookMock.kt | 65 +++++++++ .../socialplatforms/SocialPlatform.kt | 14 ++ .../socialaggregator/utils/InternalStorage.kt | 25 ++++ .../utils/SocialPlatformsManager.kt | 17 +++ .../viewholders/PostTextRecycler.kt | 44 ++++++ .../viewholders/SocialWithImageRecycler.kt | 52 +++++++ .../viewholders/SocialWithToggleRecycler.kt | 46 ++++++ .../main/res/drawable-hdpi/ic_add_circle.png | Bin 0 -> 1431 bytes .../res/drawable-hdpi/ic_remove_circle.png | Bin 0 -> 1316 bytes .../main/res/drawable-mdpi/ic_add_circle.png | Bin 0 -> 1032 bytes .../res/drawable-mdpi/ic_remove_circle.png | Bin 0 -> 936 bytes .../main/res/drawable-xhdpi/ic_add_circle.png | Bin 0 -> 2091 bytes .../res/drawable-xhdpi/ic_remove_circle.png | Bin 0 -> 1972 bytes .../res/drawable-xxhdpi/ic_add_circle.png | Bin 0 -> 2902 bytes .../res/drawable-xxhdpi/ic_remove_circle.png | Bin 0 -> 2753 bytes .../res/drawable-xxxhdpi/ic_add_circle.png | Bin 0 -> 4394 bytes .../res/drawable-xxxhdpi/ic_remove_circle.png | Bin 0 -> 4211 bytes .../main/res/layout/activity_add_social.xml | 25 ++++ app/src/main/res/layout/activity_main.xml | 133 +++++++++++++++++- app/src/main/res/layout/activity_new_post.xml | 25 ++++ .../main/res/layout/content_add_social.xml | 70 +++++++++ app/src/main/res/layout/content_new_post.xml | 70 +++++++++ app/src/main/res/layout/previous_posts.xml | 44 ++++++ .../main/res/layout/social_platform_image.xml | 31 ++++ .../res/layout/social_platform_toggle.xml | 28 ++++ app/src/main/res/values/colors.xml | 6 +- app/src/main/res/values/dimens.xml | 3 + app/src/main/res/values/strings.xml | 2 + app/src/main/res/values/styles.xml | 9 ++ build.gradle | 2 +- 37 files changed, 887 insertions(+), 28 deletions(-) delete mode 100644 app/src/main/java/pl/edu/amu/wmi/socialaggregator/MainActivity.kt create mode 100644 app/src/main/java/pl/edu/amu/wmi/socialaggregator/activity/AddSocialActivity.kt create mode 100644 app/src/main/java/pl/edu/amu/wmi/socialaggregator/activity/MainActivity.kt create mode 100644 app/src/main/java/pl/edu/amu/wmi/socialaggregator/activity/NewPostActivity.kt create mode 100644 app/src/main/java/pl/edu/amu/wmi/socialaggregator/socialplatforms/FacebookMock.kt create mode 100644 app/src/main/java/pl/edu/amu/wmi/socialaggregator/socialplatforms/SocialPlatform.kt create mode 100644 app/src/main/java/pl/edu/amu/wmi/socialaggregator/utils/InternalStorage.kt create mode 100644 app/src/main/java/pl/edu/amu/wmi/socialaggregator/utils/SocialPlatformsManager.kt create mode 100644 app/src/main/java/pl/edu/amu/wmi/socialaggregator/viewholders/PostTextRecycler.kt create mode 100644 app/src/main/java/pl/edu/amu/wmi/socialaggregator/viewholders/SocialWithImageRecycler.kt create mode 100644 app/src/main/java/pl/edu/amu/wmi/socialaggregator/viewholders/SocialWithToggleRecycler.kt create mode 100644 app/src/main/res/drawable-hdpi/ic_add_circle.png create mode 100644 app/src/main/res/drawable-hdpi/ic_remove_circle.png create mode 100644 app/src/main/res/drawable-mdpi/ic_add_circle.png create mode 100644 app/src/main/res/drawable-mdpi/ic_remove_circle.png create mode 100644 app/src/main/res/drawable-xhdpi/ic_add_circle.png create mode 100644 app/src/main/res/drawable-xhdpi/ic_remove_circle.png create mode 100644 app/src/main/res/drawable-xxhdpi/ic_add_circle.png create mode 100644 app/src/main/res/drawable-xxhdpi/ic_remove_circle.png create mode 100644 app/src/main/res/drawable-xxxhdpi/ic_add_circle.png create mode 100644 app/src/main/res/drawable-xxxhdpi/ic_remove_circle.png create mode 100644 app/src/main/res/layout/activity_add_social.xml create mode 100644 app/src/main/res/layout/activity_new_post.xml create mode 100644 app/src/main/res/layout/content_add_social.xml create mode 100644 app/src/main/res/layout/content_new_post.xml create mode 100644 app/src/main/res/layout/previous_posts.xml create mode 100644 app/src/main/res/layout/social_platform_image.xml create mode 100644 app/src/main/res/layout/social_platform_toggle.xml create mode 100644 app/src/main/res/values/dimens.xml diff --git a/.idea/misc.xml b/.idea/misc.xml index 6f32454..f797995 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,6 +1,6 @@ - + diff --git a/app/build.gradle b/app/build.gradle index b25250a..337d30b 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -26,14 +26,16 @@ android { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - implementation 'androidx.appcompat:appcompat:1.0.2' - implementation 'androidx.core:core-ktx:1.0.2' + implementation 'androidx.appcompat:appcompat:1.1.0' + implementation 'androidx.core:core-ktx:1.1.0' implementation 'androidx.constraintlayout:constraintlayout:1.1.3' implementation "io.reactivex.rxjava2:rxjava:2.2.2" implementation "io.reactivex.rxjava2:rxandroid:2.1.0" implementation 'com.jakewharton.rxbinding2:rxbinding:2.2.0' implementation 'com.jakewharton.rxbinding2:rxbinding-appcompat-v7:2.2.0' testImplementation 'junit:junit:4.12' - androidTestImplementation 'androidx.test.ext:junit:1.1.0' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' + androidTestImplementation 'androidx.test.ext:junit:1.1.1' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' + implementation 'androidx.recyclerview:recyclerview:1.1.0' + implementation 'com.google.android.material:material:1.0.0' } diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 043bfbb..b5431ae 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -9,7 +9,25 @@ android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/AppTheme"> - + + + + + + + diff --git a/app/src/main/java/pl/edu/amu/wmi/socialaggregator/MainActivity.kt b/app/src/main/java/pl/edu/amu/wmi/socialaggregator/MainActivity.kt deleted file mode 100644 index 1b0a67a..0000000 --- a/app/src/main/java/pl/edu/amu/wmi/socialaggregator/MainActivity.kt +++ /dev/null @@ -1,12 +0,0 @@ -package pl.edu.amu.wmi.socialaggregator - -import androidx.appcompat.app.AppCompatActivity -import android.os.Bundle - -class MainActivity : AppCompatActivity() { - - override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - setContentView(R.layout.activity_main) - } -} diff --git a/app/src/main/java/pl/edu/amu/wmi/socialaggregator/activity/AddSocialActivity.kt b/app/src/main/java/pl/edu/amu/wmi/socialaggregator/activity/AddSocialActivity.kt new file mode 100644 index 0000000..36ba7e2 --- /dev/null +++ b/app/src/main/java/pl/edu/amu/wmi/socialaggregator/activity/AddSocialActivity.kt @@ -0,0 +1,56 @@ +package pl.edu.amu.wmi.socialaggregator.activity + +import android.os.Bundle +import android.widget.Toast +import androidx.appcompat.app.AppCompatActivity +import androidx.recyclerview.widget.LinearLayoutManager +import kotlinx.android.synthetic.main.activity_add_social.* +import kotlinx.android.synthetic.main.content_add_social.* +import pl.edu.amu.wmi.socialaggregator.R +import pl.edu.amu.wmi.socialaggregator.utils.SocialPlatformsManager +import pl.edu.amu.wmi.socialaggregator.viewholders.SocialWithImageRecycler + +class AddSocialActivity : AppCompatActivity() { + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_add_social) + setSupportActionBar(toolbar) + + supportActionBar?.setDisplayHomeAsUpEnabled(true) + + val notLoggedInSocials = SocialPlatformsManager.getNotLoggedIn(this) + val loggedInSocials = SocialPlatformsManager.getLoggedIn(this) + val recyclers = mutableListOf(availableSocialsRecyclerView, addSocialRecyclerView) + + availableSocialsRecyclerView.apply { + layoutManager = LinearLayoutManager(this@AddSocialActivity) + adapter = SocialWithImageRecycler( + loggedInSocials, + R.drawable.ic_remove_circle + ) { + it.logout(context) + loggedInSocials.remove(it) + notLoggedInSocials.add(it) + recyclers.forEach { it.adapter?.notifyDataSetChanged() } + Toast.makeText(context, "Logged out from ${it.getName()}!", Toast.LENGTH_SHORT).show() + } + } + + addSocialRecyclerView.apply { + layoutManager = LinearLayoutManager(this@AddSocialActivity) + adapter = SocialWithImageRecycler( + notLoggedInSocials, + R.drawable.ic_add_circle + ) { + it.login(context) + notLoggedInSocials.remove(it) + loggedInSocials.add(it) + recyclers.forEach { it.adapter?.notifyDataSetChanged() } + Toast.makeText(context, "Logged in to ${it.getName()}!", Toast.LENGTH_SHORT).show() + } + } + + } + +} diff --git a/app/src/main/java/pl/edu/amu/wmi/socialaggregator/activity/MainActivity.kt b/app/src/main/java/pl/edu/amu/wmi/socialaggregator/activity/MainActivity.kt new file mode 100644 index 0000000..12d68da --- /dev/null +++ b/app/src/main/java/pl/edu/amu/wmi/socialaggregator/activity/MainActivity.kt @@ -0,0 +1,53 @@ +package pl.edu.amu.wmi.socialaggregator.activity + +import android.content.Intent +import android.os.Bundle +import androidx.appcompat.app.AppCompatActivity +import androidx.recyclerview.widget.LinearLayoutManager +import com.jakewharton.rxbinding2.view.RxView +import io.reactivex.disposables.CompositeDisposable +import kotlinx.android.synthetic.main.activity_main.* +import pl.edu.amu.wmi.socialaggregator.R +import pl.edu.amu.wmi.socialaggregator.utils.SocialPlatformsManager +import pl.edu.amu.wmi.socialaggregator.viewholders.PostTextRecycler +import pl.edu.amu.wmi.socialaggregator.viewholders.SocialWithImageRecycler + +class MainActivity : AppCompatActivity() { + + private val subs = CompositeDisposable() + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + subs.addAll( + RxView.clicks(createPostButton) + .subscribe { + val intent = Intent(this, NewPostActivity::class.java) + startActivity(intent) + }, + RxView.clicks(connectedSocialsButton) + .subscribe { + val intent = Intent(this, AddSocialActivity::class.java) + startActivity(intent) + } + ) + + connectedSocialsRecyclerView.apply { + layoutManager = LinearLayoutManager(this@MainActivity) + adapter = SocialWithImageRecycler(SocialPlatformsManager.getLoggedIn(this@MainActivity), + R.drawable.ic_launcher_background) {} + } + + previousPostsRecyclerView.apply { + layoutManager = LinearLayoutManager(this@MainActivity) + adapter = PostTextRecycler(SocialPlatformsManager.getLoggedIn(this@MainActivity) + .map { it to it.getPosts(this@MainActivity).size }) + } + } + + override fun onDestroy() { + super.onDestroy() + subs.clear() + } +} diff --git a/app/src/main/java/pl/edu/amu/wmi/socialaggregator/activity/NewPostActivity.kt b/app/src/main/java/pl/edu/amu/wmi/socialaggregator/activity/NewPostActivity.kt new file mode 100644 index 0000000..ecb0e0e --- /dev/null +++ b/app/src/main/java/pl/edu/amu/wmi/socialaggregator/activity/NewPostActivity.kt @@ -0,0 +1,51 @@ +package pl.edu.amu.wmi.socialaggregator.activity + +import android.annotation.SuppressLint +import android.os.Bundle +import android.widget.Toast +import androidx.appcompat.app.AppCompatActivity +import androidx.recyclerview.widget.LinearLayoutManager +import com.google.android.material.snackbar.Snackbar +import com.jakewharton.rxbinding2.view.RxView +import kotlinx.android.synthetic.main.activity_new_post.* +import kotlinx.android.synthetic.main.content_new_post.* +import pl.edu.amu.wmi.socialaggregator.R +import pl.edu.amu.wmi.socialaggregator.utils.SocialPlatformsManager +import pl.edu.amu.wmi.socialaggregator.viewholders.SocialWithToggleRecycler + +class NewPostActivity : AppCompatActivity() { + + @SuppressLint("CheckResult") + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_new_post) + setSupportActionBar(toolbar) + + publishPost.setOnClickListener { view -> + Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG) + .setAction("Action", null).show() + } + supportActionBar?.setDisplayHomeAsUpEnabled(true) + + val loggedInSocials = SocialPlatformsManager.getLoggedIn(this) + + val availablesRecycler = SocialWithToggleRecycler(loggedInSocials) + availableSocials.apply { + layoutManager = LinearLayoutManager(this@NewPostActivity) + adapter = availablesRecycler + } + + RxView.clicks(publishPost) + .subscribe { + availablesRecycler.chips.entries.forEach { (social, chip) -> + if (chip.isChecked) { + social.addPost(this, postText.text?.toString() ?: "test", emptyList()) + Toast.makeText(this, "Posted to ${social.getName()}!", Toast.LENGTH_LONG) + .show() + } + } + finish() + } + } + +} diff --git a/app/src/main/java/pl/edu/amu/wmi/socialaggregator/socialplatforms/FacebookMock.kt b/app/src/main/java/pl/edu/amu/wmi/socialaggregator/socialplatforms/FacebookMock.kt new file mode 100644 index 0000000..2e3f651 --- /dev/null +++ b/app/src/main/java/pl/edu/amu/wmi/socialaggregator/socialplatforms/FacebookMock.kt @@ -0,0 +1,65 @@ +package pl.edu.amu.wmi.socialaggregator.socialplatforms + +import android.content.Context +import android.graphics.Bitmap +import android.util.Log +import pl.edu.amu.wmi.socialaggregator.utils.InternalStorage +import java.io.ByteArrayOutputStream +import java.io.File + +class FacebookMock : SocialPlatform { + + companion object { + val TAG = FacebookMock::class.java.canonicalName + } + + override fun getName(): String = "Facebook" + + override fun login(context: Context) { + val loginsDir = InternalStorage.getFileOrDir(context, "logins") + if (loginsDir != null) { + val loginFile = File(loginsDir, "facebook") + loginFile.createNewFile() + } else { + Log.e(TAG, "Could not create logins directory") + } + } + + override fun logout(context: Context) { + InternalStorage.getFileOrDir(context, "logins/facebook")?.delete() + } + + override fun isLoggedIn(context: Context): Boolean { + return InternalStorage.getFileOrDir(context, "logins/facebook")?.exists() ?: false + } + + override fun addPost(context: Context, text: String, images: List) { + val postsDir = InternalStorage.getFileOrDir(context, "posts/facebook") + if (postsDir != null) { + val postDir = File(postsDir, System.currentTimeMillis().toString()) + postDir.mkdirs() + + val textFile = File(postDir, "content") + textFile.createNewFile() + textFile.writeText(text) + + images.forEachIndexed { index, image -> + val imageFile = File(postDir, "image$index") + imageFile.createNewFile() + + ByteArrayOutputStream().use { stream -> + image.compress(Bitmap.CompressFormat.JPEG, 100, stream) + imageFile.writeBytes(stream.toByteArray()) + } + } + + } else { + Log.e(TAG, "Could not create posts directory") + } + } + + override fun getPosts(context: Context): List { + val postsDir = InternalStorage.getFileOrDir(context, "posts/facebook") + return postsDir?.listFiles()?.map { it.name }?.toList() ?: emptyList() + } +} \ No newline at end of file diff --git a/app/src/main/java/pl/edu/amu/wmi/socialaggregator/socialplatforms/SocialPlatform.kt b/app/src/main/java/pl/edu/amu/wmi/socialaggregator/socialplatforms/SocialPlatform.kt new file mode 100644 index 0000000..ce822f6 --- /dev/null +++ b/app/src/main/java/pl/edu/amu/wmi/socialaggregator/socialplatforms/SocialPlatform.kt @@ -0,0 +1,14 @@ +package pl.edu.amu.wmi.socialaggregator.socialplatforms + +import android.content.Context +import android.graphics.Bitmap + +interface SocialPlatform { + + fun getName(): String + fun login(context: Context) + fun logout(context: Context) + fun isLoggedIn(context: Context): Boolean + fun addPost(context: Context, text: String, images: List) + fun getPosts(context: Context): List +} \ No newline at end of file diff --git a/app/src/main/java/pl/edu/amu/wmi/socialaggregator/utils/InternalStorage.kt b/app/src/main/java/pl/edu/amu/wmi/socialaggregator/utils/InternalStorage.kt new file mode 100644 index 0000000..1c12a13 --- /dev/null +++ b/app/src/main/java/pl/edu/amu/wmi/socialaggregator/utils/InternalStorage.kt @@ -0,0 +1,25 @@ +package pl.edu.amu.wmi.socialaggregator.utils + +import android.content.Context +import java.io.File + +object InternalStorage { + + fun getFileOrDir(context: Context, name: String): File? { + var file = context.filesDir + + if (name.indexOf("/") > 0) { + val subdirs = name.split("/") + subdirs.subList(0, subdirs.size - 1).forEach { + file = File(file, it) + file.mkdir() + } + file = File(file, subdirs.last()) + } else { + file = File(file, name) + } + + return file + } + +} \ No newline at end of file diff --git a/app/src/main/java/pl/edu/amu/wmi/socialaggregator/utils/SocialPlatformsManager.kt b/app/src/main/java/pl/edu/amu/wmi/socialaggregator/utils/SocialPlatformsManager.kt new file mode 100644 index 0000000..0b656a4 --- /dev/null +++ b/app/src/main/java/pl/edu/amu/wmi/socialaggregator/utils/SocialPlatformsManager.kt @@ -0,0 +1,17 @@ +package pl.edu.amu.wmi.socialaggregator.utils + +import android.content.Context +import pl.edu.amu.wmi.socialaggregator.socialplatforms.FacebookMock +import pl.edu.amu.wmi.socialaggregator.socialplatforms.SocialPlatform + +object SocialPlatformsManager { + private val IMPLEMENTED_PLATFORMS = listOf( + FacebookMock() + ) + + fun getLoggedIn(context: Context) = + IMPLEMENTED_PLATFORMS.filter { it.isLoggedIn(context) }.toMutableList() + + fun getNotLoggedIn(context: Context) = + (IMPLEMENTED_PLATFORMS - getLoggedIn(context)).toMutableList() +} diff --git a/app/src/main/java/pl/edu/amu/wmi/socialaggregator/viewholders/PostTextRecycler.kt b/app/src/main/java/pl/edu/amu/wmi/socialaggregator/viewholders/PostTextRecycler.kt new file mode 100644 index 0000000..8066cab --- /dev/null +++ b/app/src/main/java/pl/edu/amu/wmi/socialaggregator/viewholders/PostTextRecycler.kt @@ -0,0 +1,44 @@ +package pl.edu.amu.wmi.socialaggregator.viewholders + +import android.view.LayoutInflater +import android.view.ViewGroup +import android.widget.ImageView +import android.widget.TextView +import androidx.constraintlayout.widget.ConstraintLayout +import androidx.recyclerview.widget.RecyclerView +import com.jakewharton.rxbinding2.view.RxView +import io.reactivex.disposables.Disposable +import pl.edu.amu.wmi.socialaggregator.R +import pl.edu.amu.wmi.socialaggregator.socialplatforms.SocialPlatform + +class PostTextRecycler( + val socials: List>) : RecyclerView.Adapter() { + + override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder { + val layout = LayoutInflater.from(parent.context) + .inflate(R.layout.previous_posts, parent, false) as ConstraintLayout + + val socialName = layout.findViewById(R.id.socialTextView) + val postCount = layout.findViewById(R.id.postCountTextView) + + return ViewHolder(layout, socialName, postCount) + } + + override fun getItemCount(): Int { + return socials.size + } + + override fun onBindViewHolder(holder: ViewHolder, position: Int) { + val pair = socials[position] + holder.socialName.text = pair.first.getName() + val count = pair.second + holder.postCount.text = count.toString() + if (count > 1) " posts" else " post" + } + + class ViewHolder( + root: ConstraintLayout, + val socialName: TextView, + val postCount: TextView + ) : RecyclerView.ViewHolder(root) + +} \ No newline at end of file diff --git a/app/src/main/java/pl/edu/amu/wmi/socialaggregator/viewholders/SocialWithImageRecycler.kt b/app/src/main/java/pl/edu/amu/wmi/socialaggregator/viewholders/SocialWithImageRecycler.kt new file mode 100644 index 0000000..e500063 --- /dev/null +++ b/app/src/main/java/pl/edu/amu/wmi/socialaggregator/viewholders/SocialWithImageRecycler.kt @@ -0,0 +1,52 @@ +package pl.edu.amu.wmi.socialaggregator.viewholders + +import android.view.LayoutInflater +import android.view.ViewGroup +import android.widget.ImageView +import android.widget.TextView +import androidx.constraintlayout.widget.ConstraintLayout +import androidx.recyclerview.widget.RecyclerView +import com.jakewharton.rxbinding2.view.RxView +import io.reactivex.disposables.Disposable +import pl.edu.amu.wmi.socialaggregator.R +import pl.edu.amu.wmi.socialaggregator.socialplatforms.SocialPlatform + +class SocialWithImageRecycler( + val availableSocials: List, + private val imageResource: Int, + private val action: (SocialPlatform) -> Unit +) : RecyclerView.Adapter() { + + private val disposables = HashMap() + + override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder { + val layout = LayoutInflater.from(parent.context) + .inflate(R.layout.social_platform_image, parent, false) as ConstraintLayout + + val textView = layout.findViewById(R.id.socialPlatformName) + val imageView = layout.findViewById(R.id.socialPlatformImage) + + return ViewHolder(layout, textView, imageView) + } + + override fun getItemCount(): Int { + return availableSocials.size + } + + override fun onBindViewHolder(holder: ViewHolder, position: Int) { + val social = availableSocials[position] + holder.text.text = social.getName() + holder.image.setImageResource(imageResource) + + disposables[social] = RxView.clicks(holder.image) + .map { social } + .subscribe(action) + } + + class ViewHolder( + root: ConstraintLayout, + val text: TextView, + val image: ImageView + ) : RecyclerView.ViewHolder(root) + +} \ No newline at end of file diff --git a/app/src/main/java/pl/edu/amu/wmi/socialaggregator/viewholders/SocialWithToggleRecycler.kt b/app/src/main/java/pl/edu/amu/wmi/socialaggregator/viewholders/SocialWithToggleRecycler.kt new file mode 100644 index 0000000..3284ded --- /dev/null +++ b/app/src/main/java/pl/edu/amu/wmi/socialaggregator/viewholders/SocialWithToggleRecycler.kt @@ -0,0 +1,46 @@ +package pl.edu.amu.wmi.socialaggregator.viewholders + +import android.view.LayoutInflater +import android.view.ViewGroup +import android.widget.CheckBox +import android.widget.TextView +import androidx.constraintlayout.widget.ConstraintLayout +import androidx.recyclerview.widget.RecyclerView +import com.google.android.material.chip.Chip +import pl.edu.amu.wmi.socialaggregator.R +import pl.edu.amu.wmi.socialaggregator.socialplatforms.SocialPlatform + +class SocialWithToggleRecycler( + private val availableSocials: List +) : RecyclerView.Adapter() { + + val chips = HashMap() + + override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder { + val layout = LayoutInflater.from(parent.context) + .inflate(R.layout.social_platform_toggle, parent, false) as ConstraintLayout + + val textView = layout.findViewById(R.id.socialPlatformName) + val chip = layout.findViewById(R.id.chip) + + return ViewHolder(layout, textView, chip) + } + + override fun getItemCount(): Int { + return availableSocials.size + } + + override fun onBindViewHolder(holder: ViewHolder, position: Int) { + val social = availableSocials[position] + holder.text.text = social.getName() + + chips[social] = holder.chip + } + + class ViewHolder( + root: ConstraintLayout, + val text: TextView, + val chip: CheckBox + ) : RecyclerView.ViewHolder(root) + +} \ No newline at end of file diff --git a/app/src/main/res/drawable-hdpi/ic_add_circle.png b/app/src/main/res/drawable-hdpi/ic_add_circle.png new file mode 100644 index 0000000000000000000000000000000000000000..4491a3429d554e50d68e12fb897ca8cb42f4622f GIT binary patch literal 1431 zcmV;I1!($-P)9wVgzrQ zamZ{Jf**`An^D)v=9jgLmuN7c5j5UWnXqI*g9FxXea~awvdwnu<-G0N2F}O6&-tI{ zcg}Ne&ndyA;`8~GPll^21d9qH%cX!QC5Ba(X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~;oK{{T<&JE_$x*O34K002ovPDHLkV1kD(u5JJT literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-hdpi/ic_remove_circle.png b/app/src/main/res/drawable-hdpi/ic_remove_circle.png new file mode 100644 index 0000000000000000000000000000000000000000..6859a5d85ccfe47621bee6237f8a938dddec1a1d GIT binary patch literal 1316 zcmV+<1>5?GP)qM7j$Z}EN`ZX^WFWP=v^y~lioB89fRZNJv?{_Q!>d7i%K zyqEKS1cQdp=Tkly-DVRkY(%CD0Z~c}vkuRMX@&Vb1dVH~p0TezdD`dm2_r&NHXyaN z-RAL&R@rz)>?Y!R0Ba=i&NBFTkw!<$&xZc&>8YER^jl(_O_*mV!baB!WV81VDRm>A!ChQ|%UAnPdikTax+z&~ zX#rK9cQ-SX9srwV!85e`nH1hN*irMPjK7osr?;;G%r62ckpVTpW{Me41pTg;mcvRZ zV4J(Ms9dRN1@prIEX#oz`#a45{EEe_J~q(4Bb*F7sQ{h)1ypf}!Og}JOB0RJX0fQv z$wVX-;PeEZ1F%2MaJeyOIy&U9ZcGH8P{3Tyx92}?k|xRwm=6s3U3wkHjU@u+R+~@q zSg^9QHYJ4V#^J8pzgXxHCm_1cTP8lu!%`_rI?j%PUrU*`^!ckNV?V?RaJmC~^vxtA z^n5unnuq+ZBTEG6$Afdk-xz=fkVc}Gaiwdo(=k| zADwVv{T z!`=4`5g*7mi)`XCqciAtc`166I7Aell8#%D~qDPm$2r(MKV4T0-f!AVI0g=MBMqxSm#wTdZns<4>Ju^~lSA3I9? z1)yBctzfLe!d6x~dzka|zCfUT1w&1O2m{B1ov!+*fDASei4Zw8(OBS`V3+HgsDQZ( z&9?y7=QONw;J;bS>Q(a>8Xec^4m<_ILE~cN5Q)(?Zv!-=1 zmsIU_{dFW^OFRF9xNE4h#+@i`QUTi=`z_&cq!om{`6v8eL;{X!;j%}EUvq@g5}+H; ziqM`1!Sg>fy&?d=D#ELql96Asj3)c1=epKU=drLu41O|E&P&(8VnchwiEByG-X@?j zw<*OVBxu*-)h1a?sb|)hv)+O~4{ieC5dfDMDugh`g4H^`iCA_ akADFtDA1b8B75rq0000HLXZDm7*YMUm81;G=f;IMyRqXij78! zC1jHle5k%ut8Au)rgT%gsa6U>C?YD@H&Llo*4i}5?A{}H(~bF>>|E$Hy~1y2028qu6HkQnz9n&pgk zw4GTq6`gEgLA3zV2;yDq{n+dcN%ffJdzp zbp_TQAn+1^m6c6C<2^3K5tr(Ni+wx)o*i=@fUwzik_27=P*kHu!Bko?4qD6q_j&v(E4ZuBqgNX2z^8<)4%IXP=$ekh`#xWzLV)W+ z*ymHNC#L~Azqk|m@Sp&@e9c}ol4AruEB*tX0=Un=FHX5r;k~0DKYs21hNNTYVWpV` zB;qrWX-Le^4AYGGY)Fu&Qrj|pJ4cP<+?LF8I%WD?U*QuXsM#%ohcf+%4@-`70Fue1 zy72p^w<&lYz^b6p%h=x_Bo(XwuFJD2H31qrPTf(X<)A=JXIw2MZi(<{v=BKwJowmO zvq2ZVm>4CpzisLS*b`t+cnOdv_-d?v?1-<6$?Pa`+u1CFE>N}rxGUf%F?YgCRI0nQ z;TH2Rd)G55DuqZRL~jS!2ylb9Ds%z)g+NvlXY-TctVy+{z{>)ZoVV{8UMY1Gb*_tb zBsNlWy-=plc`~O2SD|r5)yS{R)#lC~-*MBAV*df4!?7gs94tft0000Qb literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-mdpi/ic_remove_circle.png b/app/src/main/res/drawable-mdpi/ic_remove_circle.png new file mode 100644 index 0000000000000000000000000000000000000000..057993fa2942629e1af65b50432ad9ed66b17de2 GIT binary patch literal 936 zcmV;Z16TZsP)x9d$wYA_R5w26nx;^EVFX)7MX8|?Q9>RP zTv#`P%48IbI94aNb`u0Cr7hH5X~h@gBPO|X&tFdB#3aq+&Sb{qZ14X)&VSDT-~SL< zu248O>!nwfz{Wz4M=#M@F9tEkz!jJT|@)^5K(Z_qzb zK}Xd9QVHTC07V&a0|5UN=!6n=6F$2q-m>ZGWEztisIsD;D)1nH3IGcLxEdZ2BOX)m zv!n3c?bfm7z4pwU6u%% z3%K*~doY#Jc&okcO!~u!fwvd#r~J>{EpN05tctgX?wQCT1E$n$@8DSgo7~_9`7Z3D z&)#NAbjUz;eYB36#=wUK5pXAY0y2E7Ep&yZ!@UMhfYOjtox6*;L`a*ruXrD;zPz?j zrJQaMOY`Q;jo>$rPik1T^V%m$Ii^!(YOlG`W*tpiL$5F$?+X$6A!}R#1BJ4k)#2zj zB#&g^?HAwzgnvv$m(=9|w*n}h5HC2!YAf1Ia8Cw-Bq5vQ?HjI7#X!)C)(ChJ82)XK zUjk{Fc>_VK>stX1&%_Z3ahyRbx<$bAQ%P~Y7y>(Hv<#_bB?IA0Wj^}50r@!J9p#As z-Q$zsP%C~#-9*r|;%Qq1Iy`+vX7B-m;n+q|(g7Ko`=(<(6~g+lt?tsWfriT;Am!~8 zV8e8%1Gs7rdbjnQTmSgoKvLheTxli%@x5mgDJr!(-dfvZbjFTk;aG!EngGmtPbS_F zJQQyaolNtOF%XGF)SZ8q9i`wa03`)B@sg0XK-vAqj6_w@Ax=ftbm-P?>lm z!ZUuyccQy<-LugfoA6;`GLiUaSp&f40^Erd!2^M^-cwmUOh&s4TCvYW&s!y1s5rh#h+YG*5@31etk4GJF9Hco+(-?06Qy(f790000< KMNUMnLSTaUo3b7N literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xhdpi/ic_add_circle.png b/app/src/main/res/drawable-xhdpi/ic_add_circle.png new file mode 100644 index 0000000000000000000000000000000000000000..36b842f73ec0406b032ebbe1e99cd69f084c4a9d GIT binary patch literal 2091 zcmV+`2-Nq9P)aq=Y6akAQh3RVfuvq=+_zm%W5gN7*$GIaMP9NlI)dU{Fd60fZDH zL}?lxE{fyb07^lK)_FKy8wWzXc8L&a#iL&;BHjYiB$Y_>0JD#od(fS=Eyv#Hc*i>y z%-5NF@43Hw?z!ilbA~VhPhDM`_y0dcxe$7p0gnfo&`Gk!W|GwKq{!-8vw0~39+w-gvI|L_QGm0#MV`eM&rOJ_hF70954DaS6YP0eHz{cz^%uv%fl$OOBiX ztd$qo2t`FN7=&ZP-i0jNDMd?)S!jnTy{HMODh&@2_>)WQ8n3sP05O?f}3PNocf;7BucW&48yJ%=0E<_AW7k zYO3!_O-=?P5Sgx=n zUl_n*JF~IT#uWenbR~qim1>&0%i;;+VF35pn2en!t^lCw8wSc_Ypv_>U<#~d0>WW# z35XbAzAG9Iwx$52(qLNwoM&fA3vA;C4fp~~D^x{EDk5}y$LUg|?F3v|;AHH4?gjw= z)HPYRr{#vv2cyDF{)SGK1-|Dy5flZ7qM_jG;h?A$7E7hXRNBa){M@jzlv)D}lCnm{ z1C>O>d4Z~Ry}CGf;uWQ!BHNJ^D9vg=*t!=aP_ zm?f%vw**xH$a=U;o=zrYH5pMgYH=1e%~q zUv`kmYkHokJ)8@EUI0`lDNRrnB-G?$n{a}_t!7+4nrr1VdV<-ASvCP!&cu(n@N_s% z%f*OyC!)q4YsPa){uOh?_gZ9uvXsv6tR6Rh10 z#$pg=<|C;C-yCM}b{(QQos*N#czN4^v=COeP1TID%a|;;xpo3i2_{fCAe&=J?9cU6 zgd-X-y3?vvk-0+h20+XOSY4;b1vib*D*0j(@RpQVJMv1K&q~{JgbMB0`bm05`8+9c zGl=H^TnW$_G@F52E6X9c)d;kz1>ALyeo|fAF!cuVgEuTXGMh?z& z`I>D$Emq;viOO`t^s**&3DYA6|3{EOTtG{bDGfu{5(abJ^bN$`e6lX)#H2?`_boND VWBh8~(_H`n002ovPDHLkV1jxK-wOZ$ literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xhdpi/ic_remove_circle.png b/app/src/main/res/drawable-xhdpi/ic_remove_circle.png new file mode 100644 index 0000000000000000000000000000000000000000..beb4b3ca3ee80b4603b8c0299ce79bd2c5ad3a3c GIT binary patch literal 1972 zcmV;l2TS;gP)3$g6#mYAZ>H0Nq7XNL)Nr=p zSpc%}T{gS*D5p!F!7RrU(`gbsj);oEd<=ji0E__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n#>4Xd-HS>i8` zzMeq!B|JQVHx%~+EY1!%J*=232Yr0-_1of1%czUs4MgIXsP;7EfAf z5E$6p+T7EsHsZ-wu98}S5HxtY{t*BRE6rg>+AEyTeHs786&HS3irkU`!%Qeze0J(RA zw>|CwXRpI)sen&liEjr#PlRQ&ru3{gqt*|HW&wbM>INgQmjiUX4M$6906PdA%on{- zZcQJPE-0VUnL*ioc+HgKq>S`ECcfGhFKVWhibTI?a7+If9k*ka<8yK?Z2_YTBSuVa zs+|k4*llYC&}4Rj2jz>a8M=wEjudPd9;<1Qelz9)<(a;C@v7QAlN!z=D2tfsR3e(p z;7JCANQx_h_X4yV;8&TjhIJJtE!c?(OUUA|Rb9 z5zl1Mi9q%s;Zb?JF2ZgocpDP76Vp~=e!*SmdgVjc{#4z>$tgV_*(~3++9cQ#fST#z zG|#qeUvll3h8mG}+74t+I_b5v*&`M;yGr^0|LDZO53$41jsO4v07*qoM6N<$f&uVn AUH||9 literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xxhdpi/ic_remove_circle.png b/app/src/main/res/drawable-xxhdpi/ic_remove_circle.png new file mode 100644 index 0000000000000000000000000000000000000000..963ee7956f4f3fd0ebe17685bc580c712a15093f GIT binary patch literal 2753 zcmV;y3O@CTP)zF1DX^wO2@GzCw1QzaO zVk>}8X(BkO5N-ui6A|q;h0L%0as9jtNvr5oAnODyS+ce0((uypp(0)m(6<2$)5*6K z#ZnN=zXih2$YV#G+TUOarC3puVp%0%w$ndJ5U?K1QvvkEZ%zErLP#fo69VzFeeT*f zv=EqzjI0n~arti~a07sO07_FaZ1BoZkih`~^wWT7KdiSMx)Si!hrMINL3$Lxcl35d zANlNt$+TK}=FU_4$WMQCk;EP*>k98o2*Tc;QH);pXG88M0No>rHH`o%qbf}w&3k|{ zvXN2d25}t#K~rl7Pna@)*c0qBEkCev{y8np(3Ak%3g694cpii)S{j)5j z=hFSp)?H4=m$V76IDKvd{9ed+Nupz6)(9x%uoD+##*322u~aPys(L_V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p`>D4QsslC3Uk2uq@^@jiDXlWkn9%*_b`^gF}!H+O}`k0};2Bx5zeYJ6b-OQu#K zd%7G6;HM1ws*8KxXbCJnZpR2e8CP3fA{77b*tA$oTr32xS7%lkxF*M@koySqvIN3R@&BEAB)0#|3zvYrEUNx z0GtGH9N-TK;=cg-bGVIn!cX6H#8yYMpe!#4a3(HuR_-q8>A_UDh)yzCl)=pt1!F9j z#!1FF0WM-9H^^)?00{#GHARatQx}7}LEPmcI%Y7A7P*Yh6D84(Z0yHpA*Lyb%u50! zMu4fl{;TxfdzaDS%cq+DPkrw&Uw--fTwlM2b7gv#QWP^N{Qt7yt%P)DpcViC002ov JPDHLkV1jxz)@}d* literal 0 HcmV?d00001 diff --git a/app/src/main/res/layout/activity_add_social.xml b/app/src/main/res/layout/activity_add_social.xml new file mode 100644 index 0000000..0073ff6 --- /dev/null +++ b/app/src/main/res/layout/activity_add_social.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index ca0c0de..e51cb25 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -4,15 +4,136 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" - tools:context=".MainActivity"> + tools:context=".activity.MainActivity"> - + + + + + + + +