#SA-16 #SA-29 #SA-4 improve design, add post history activity
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
@ -6,9 +6,18 @@
|
||||
android:allowBackup="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:roundIcon="@mipmap/ic_launcher"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme">
|
||||
<activity
|
||||
android:name=".activity.PostHistoryActivity"
|
||||
android:label="@string/title_activity_post_history"
|
||||
android:parentActivityName=".activity.MainActivity"
|
||||
android:theme="@style/AppTheme.NoActionBar">
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value="pl.edu.amu.wmi.socialaggregator.activity.MainActivity" />
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".activity.AddSocialActivity"
|
||||
android:label="@string/title_activity_add_social"
|
||||
|
@ -27,7 +27,7 @@ class AddSocialActivity : AppCompatActivity() {
|
||||
layoutManager = LinearLayoutManager(this@AddSocialActivity)
|
||||
adapter = SocialWithImageRecycler(
|
||||
loggedInSocials,
|
||||
R.drawable.ic_remove_circle
|
||||
R.mipmap.ic_opaque_remove
|
||||
) {
|
||||
it.logout(context)
|
||||
loggedInSocials.remove(it)
|
||||
@ -41,7 +41,7 @@ class AddSocialActivity : AppCompatActivity() {
|
||||
layoutManager = LinearLayoutManager(this@AddSocialActivity)
|
||||
adapter = SocialWithImageRecycler(
|
||||
notLoggedInSocials,
|
||||
R.drawable.ic_add_circle
|
||||
R.mipmap.ic_opaque_add
|
||||
) {
|
||||
it.login(context)
|
||||
notLoggedInSocials.remove(it)
|
||||
|
@ -9,7 +9,7 @@ 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.PostSummaryRecycler
|
||||
import pl.edu.amu.wmi.socialaggregator.viewholders.SocialWithImageRecycler
|
||||
|
||||
class MainActivity : AppCompatActivity() {
|
||||
@ -30,6 +30,11 @@ class MainActivity : AppCompatActivity() {
|
||||
.subscribe {
|
||||
val intent = Intent(this, AddSocialActivity::class.java)
|
||||
startActivity(intent)
|
||||
},
|
||||
RxView.clicks(previousPostsButton)
|
||||
.subscribe {
|
||||
val intent = Intent(this, PostHistoryActivity::class.java)
|
||||
startActivity(intent)
|
||||
}
|
||||
)
|
||||
|
||||
@ -40,13 +45,12 @@ class MainActivity : AppCompatActivity() {
|
||||
|
||||
connectedSocialsRecyclerView.apply {
|
||||
layoutManager = LinearLayoutManager(this@MainActivity)
|
||||
adapter = SocialWithImageRecycler(SocialPlatformsManager.getLoggedIn(this@MainActivity),
|
||||
R.drawable.ic_launcher_background) {}
|
||||
adapter = SocialWithImageRecycler(SocialPlatformsManager.getLoggedIn(this@MainActivity)) {}
|
||||
}
|
||||
|
||||
previousPostsRecyclerView.apply {
|
||||
layoutManager = LinearLayoutManager(this@MainActivity)
|
||||
adapter = PostTextRecycler(SocialPlatformsManager.getLoggedIn(this@MainActivity)
|
||||
adapter = PostSummaryRecycler(SocialPlatformsManager.getLoggedIn(this@MainActivity)
|
||||
.map { it to it.getPosts(this@MainActivity).size })
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,31 @@
|
||||
package pl.edu.amu.wmi.socialaggregator.activity
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import pl.edu.amu.wmi.socialaggregator.R
|
||||
|
||||
import kotlinx.android.synthetic.main.activity_post_history.*
|
||||
import kotlinx.android.synthetic.main.content_post_history.*
|
||||
import pl.edu.amu.wmi.socialaggregator.utils.SocialPlatformsManager
|
||||
import pl.edu.amu.wmi.socialaggregator.viewholders.PostDetailsRecycler
|
||||
|
||||
class PostHistoryActivity : AppCompatActivity() {
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_post_history)
|
||||
setSupportActionBar(toolbar)
|
||||
|
||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||
|
||||
postHistoryRecycler.apply {
|
||||
layoutManager = LinearLayoutManager(this@PostHistoryActivity)
|
||||
adapter = PostDetailsRecycler(
|
||||
SocialPlatformsManager.getLoggedIn(this@PostHistoryActivity)
|
||||
.flatMap { it.getPosts(this@PostHistoryActivity) }
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -3,9 +3,12 @@ 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.R
|
||||
import pl.edu.amu.wmi.socialaggregator.utils.InternalStorage
|
||||
import java.io.ByteArrayOutputStream
|
||||
import java.io.File
|
||||
import java.text.DateFormat
|
||||
import java.util.*
|
||||
|
||||
class FacebookMock : SocialPlatform {
|
||||
|
||||
@ -15,6 +18,8 @@ class FacebookMock : SocialPlatform {
|
||||
|
||||
override fun getName(): String = "Facebook"
|
||||
|
||||
override fun getLogo(): Int = R.mipmap.ic_logo_facebook
|
||||
|
||||
override fun login(context: Context) {
|
||||
val loginsDir = InternalStorage.getFileOrDir(context, "logins")
|
||||
loginsDir?.mkdir()
|
||||
@ -59,8 +64,13 @@ class FacebookMock : SocialPlatform {
|
||||
}
|
||||
}
|
||||
|
||||
override fun getPosts(context: Context): List<String> {
|
||||
override fun getPosts(context: Context): List<Post> {
|
||||
val postsDir = InternalStorage.getFileOrDir(context, "posts/facebook")
|
||||
return postsDir?.listFiles()?.map { it.name }?.toList() ?: emptyList()
|
||||
return postsDir?.listFiles()?.flatMap {
|
||||
it.listFiles().map {
|
||||
val dt = Date(it.lastModified())
|
||||
Post(this, it.readText(), DateFormat.getDateTimeInstance().format(dt))
|
||||
}
|
||||
}?.toList() ?: emptyList()
|
||||
}
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
package pl.edu.amu.wmi.socialaggregator.socialplatforms
|
||||
|
||||
data class Post(val social: SocialPlatform, val content: String, val dateTime: String)
|
@ -10,5 +10,6 @@ interface SocialPlatform {
|
||||
fun logout(context: Context)
|
||||
fun isLoggedIn(context: Context): Boolean
|
||||
fun addPost(context: Context, text: String, images: List<Bitmap>)
|
||||
fun getPosts(context: Context): List<String>
|
||||
fun getPosts(context: Context): List<Post>
|
||||
fun getLogo(): Int
|
||||
}
|
@ -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 pl.edu.amu.wmi.socialaggregator.R
|
||||
import pl.edu.amu.wmi.socialaggregator.socialplatforms.Post
|
||||
|
||||
class PostDetailsRecycler(
|
||||
val posts: List<Post>) : RecyclerView.Adapter<PostDetailsRecycler.ViewHolder>() {
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
|
||||
val layout = LayoutInflater.from(parent.context)
|
||||
.inflate(R.layout.item_post, parent, false) as ConstraintLayout
|
||||
|
||||
val dateTime = layout.findViewById<TextView>(R.id.postDateTimeTextView)
|
||||
val postContent = layout.findViewById<TextView>(R.id.postContentTextView)
|
||||
val imageView = layout.findViewById<ImageView>(R.id.postSocialImage)
|
||||
|
||||
return ViewHolder(layout, dateTime, postContent, imageView)
|
||||
}
|
||||
|
||||
override fun getItemCount(): Int {
|
||||
return posts.size
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
|
||||
val post = posts[position]
|
||||
holder.dateTime.text = post.dateTime
|
||||
holder.postContent.text = post.content
|
||||
|
||||
}
|
||||
|
||||
class ViewHolder(
|
||||
root: ConstraintLayout,
|
||||
val dateTime: TextView,
|
||||
val postContent: TextView,
|
||||
val imageView: ImageView
|
||||
) : RecyclerView.ViewHolder(root)
|
||||
|
||||
}
|
@ -6,22 +6,21 @@ 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<Pair<SocialPlatform, Int>>) : RecyclerView.Adapter<PostTextRecycler.ViewHolder>() {
|
||||
class PostSummaryRecycler(
|
||||
val socials: List<Pair<SocialPlatform, Int>>) : RecyclerView.Adapter<PostSummaryRecycler.ViewHolder>() {
|
||||
|
||||
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<TextView>(R.id.socialTextView)
|
||||
val postCount = layout.findViewById<TextView>(R.id.postCountTextView)
|
||||
val postCount = layout.findViewById<TextView>(R.id.post)
|
||||
val imageView = layout.findViewById<ImageView>(R.id.postSocialImage)
|
||||
|
||||
return ViewHolder(layout, socialName, postCount)
|
||||
return ViewHolder(layout, socialName, postCount, imageView)
|
||||
}
|
||||
|
||||
override fun getItemCount(): Int {
|
||||
@ -29,16 +28,17 @@ class PostTextRecycler(
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
|
||||
val pair = socials[position]
|
||||
holder.socialName.text = pair.first.getName()
|
||||
val count = pair.second
|
||||
val (social, count) = socials[position]
|
||||
holder.socialName.text = social.getName()
|
||||
holder.postCount.text = count.toString() + if (count > 1) " posts" else " post"
|
||||
holder.imageView.setImageResource(social.getLogo())
|
||||
}
|
||||
|
||||
class ViewHolder(
|
||||
root: ConstraintLayout,
|
||||
val socialName: TextView,
|
||||
val postCount: TextView
|
||||
val postCount: TextView,
|
||||
val imageView: ImageView
|
||||
) : RecyclerView.ViewHolder(root)
|
||||
|
||||
}
|
@ -13,7 +13,7 @@ import pl.edu.amu.wmi.socialaggregator.socialplatforms.SocialPlatform
|
||||
|
||||
class SocialWithImageRecycler(
|
||||
val availableSocials: List<SocialPlatform>,
|
||||
private val imageResource: Int,
|
||||
private val imageResource: Int? = null,
|
||||
private val action: (SocialPlatform) -> Unit
|
||||
) : RecyclerView.Adapter<SocialWithImageRecycler.ViewHolder>() {
|
||||
|
||||
@ -36,7 +36,7 @@ class SocialWithImageRecycler(
|
||||
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
|
||||
val social = availableSocials[position]
|
||||
holder.text.text = social.getName()
|
||||
holder.image.setImageResource(imageResource)
|
||||
holder.image.setImageResource(imageResource ?: social.getLogo())
|
||||
|
||||
disposables[social] = RxView.clicks(holder.image)
|
||||
.map { social }
|
||||
|
BIN
app/src/main/res/drawable-hdpi/logo.png
Normal file
After Width: | Height: | Size: 8.7 KiB |
BIN
app/src/main/res/drawable-ldpi/logo.png
Normal file
After Width: | Height: | Size: 4.5 KiB |
BIN
app/src/main/res/drawable-mdpi/logo.png
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
app/src/main/res/drawable-xhdpi/logo.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
app/src/main/res/drawable-xxhdpi/logo.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
app/src/main/res/drawable-xxxhdpi/logo.png
Normal file
After Width: | Height: | Size: 4.6 KiB |
@ -14,7 +14,7 @@
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@mipmap/ic_launcher" />
|
||||
app:srcCompat="@drawable/logo" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/connectedSocialsTextView"
|
||||
@ -129,11 +129,11 @@
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:clickable="true"
|
||||
android:tint="#00FFFFFF"
|
||||
android:tint="@android:color/background_light"
|
||||
app:fabSize="auto"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/previousPostsButton"
|
||||
app:srcCompat="@android:drawable/ic_input_add" />
|
||||
app:srcCompat="@mipmap/ic_opaque_add" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
25
app/src/main/res/layout/activity_post_history.xml
Normal file
@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout 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:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".activity.PostHistoryActivity">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/AppTheme.AppBarOverlay">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="?attr/colorPrimary"
|
||||
app:popupTheme="@style/AppTheme.PopupOverlay" />
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<include layout="@layout/content_post_history" />
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
@ -61,10 +61,11 @@
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:clickable="true"
|
||||
android:tint="@android:color/background_light"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/availableSocials"
|
||||
app:srcCompat="@drawable/ic_add_circle" />
|
||||
app:srcCompat="@mipmap/ic_opaque_send" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</ScrollView>
|
23
app/src/main/res/layout/content_post_history.xml
Normal file
@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout 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:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
tools:context=".activity.PostHistoryActivity"
|
||||
tools:showIn="@layout/activity_post_history">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/postHistoryRecycler"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
45
app/src/main/res/layout/item_post.xml
Normal file
@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout 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/linearLayout2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/postContentTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="TextView"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/postSocialImage"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/postDateTimeTextView" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/postSocialImage"
|
||||
android:layout_width="@dimen/social_logo_size"
|
||||
android:layout_height="@dimen/social_logo_size"
|
||||
android:layout_marginBottom="8dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.0"
|
||||
app:srcCompat="@mipmap/ic_logo_facebook" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/postDateTimeTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="TextView"
|
||||
android:textSize="10sp"
|
||||
app:layout_constraintEnd_toStartOf="@+id/postSocialImage"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -13,32 +13,32 @@
|
||||
android:layout_marginEnd="8dp"
|
||||
android:text="Bla bla bla"
|
||||
android:textColor="@android:color/primary_text_light"
|
||||
app:layout_constraintBottom_toTopOf="@+id/postCountTextView"
|
||||
app:layout_constraintEnd_toStartOf="@+id/imageView3"
|
||||
app:layout_constraintBottom_toTopOf="@+id/post"
|
||||
app:layout_constraintEnd_toStartOf="@+id/postSocialImage"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/imageView3"
|
||||
app:layout_constraintTop_toTopOf="@+id/postSocialImage"
|
||||
app:layout_constraintVertical_chainStyle="packed" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/postCountTextView"
|
||||
android:id="@+id/post"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:text="Bla bla bla"
|
||||
android:textColor="@android:color/secondary_text_light"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/imageView3"
|
||||
app:layout_constraintEnd_toStartOf="@+id/postSocialImage"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/socialTextView" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/postSocialImage"
|
||||
android:layout_width="@dimen/social_logo_size"
|
||||
android:layout_height="@dimen/social_logo_size"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@mipmap/ic_launcher_round" />
|
||||
app:srcCompat="@mipmap/ic_logo_facebook" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -9,23 +9,23 @@
|
||||
android:id="@+id/socialPlatformName"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/socialPlatformImage"
|
||||
app:layout_constraintEnd_toStartOf="@+id/socialPlatformImage"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/socialPlatformImage"
|
||||
tools:text="Some Sample Text" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/socialPlatformImage"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="-4dp"
|
||||
android:layout_marginBottom="-4dp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/socialPlatformName"
|
||||
android:layout_width="@dimen/social_logo_size"
|
||||
android:layout_height="@dimen/social_logo_size"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/socialPlatformName"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:srcCompat="@mipmap/ic_launcher_round" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 4.8 KiB |
BIN
app/src/main/res/mipmap-hdpi/ic_logo_facebook.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
app/src/main/res/mipmap-hdpi/ic_opaque_add.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
app/src/main/res/mipmap-hdpi/ic_opaque_remove.png
Normal file
After Width: | Height: | Size: 634 B |
BIN
app/src/main/res/mipmap-hdpi/ic_opaque_send.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 2.7 KiB |
BIN
app/src/main/res/mipmap-mdpi/ic_logo_facebook.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
app/src/main/res/mipmap-mdpi/ic_opaque_add.png
Normal file
After Width: | Height: | Size: 742 B |
BIN
app/src/main/res/mipmap-mdpi/ic_opaque_remove.png
Normal file
After Width: | Height: | Size: 459 B |
BIN
app/src/main/res/mipmap-mdpi/ic_opaque_send.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 7.8 KiB |
Before Width: | Height: | Size: 6.7 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_logo_facebook.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_opaque_add.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_opaque_remove.png
Normal file
After Width: | Height: | Size: 907 B |
BIN
app/src/main/res/mipmap-xhdpi/ic_opaque_send.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 10 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_logo_facebook.png
Normal file
After Width: | Height: | Size: 7.7 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_opaque_add.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_opaque_remove.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_opaque_send.png
Normal file
After Width: | Height: | Size: 5.4 KiB |
Before Width: | Height: | Size: 8.9 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 15 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/ic_logo_facebook.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/ic_opaque_add.png
Normal file
After Width: | Height: | Size: 4.6 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/ic_opaque_remove.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/ic_opaque_send.png
Normal file
After Width: | Height: | Size: 7.6 KiB |
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="colorPrimary">#4267b2</color>
|
||||
<color name="colorPrimaryDark">#4267b2</color>
|
||||
<color name="colorAccent">#4267b2</color>
|
||||
<color name="colorPrimary">#845EC2</color>
|
||||
<color name="colorAccent">#4E8397</color>
|
||||
<color name="colorPrimaryDark">#D5CABD</color>
|
||||
</resources>
|
||||
|
@ -1,3 +1,4 @@
|
||||
<resources>
|
||||
<dimen name="fab_margin">16dp</dimen>
|
||||
<dimen name="social_logo_size">32dp</dimen>
|
||||
</resources>
|
||||
|
@ -2,4 +2,5 @@
|
||||
<string name="app_name">Social Aggregator</string>
|
||||
<string name="title_activity_new_post">NewPostActivity</string>
|
||||
<string name="title_activity_add_social">AddSocialActivity</string>
|
||||
<string name="title_activity_post_history">PostHistoryActivity</string>
|
||||
</resources>
|
||||
|