WIP refactor top bar
This commit is contained in:
parent
8268e9e8b5
commit
795b54c3cd
@ -8,7 +8,7 @@
|
|||||||
<intent
|
<intent
|
||||||
android:action="android.intent.action.VIEW"
|
android:action="android.intent.action.VIEW"
|
||||||
android:targetPackage="org.pixeldroid.app.debug"
|
android:targetPackage="org.pixeldroid.app.debug"
|
||||||
android:targetClass="org.pixeldroid.app.postCreation.camera.CameraActivityShortcut" />
|
android:targetClass="org.pixeldroid.app.postCreation.camera.CameraActivity" />
|
||||||
<categories android:name="android.shortcut.conversation" />
|
<categories android:name="android.shortcut.conversation" />
|
||||||
<capability-binding android:key="actions.intent.CREATE_MESSAGE" />
|
<capability-binding android:key="actions.intent.CREATE_MESSAGE" />
|
||||||
</shortcut>
|
</shortcut>
|
||||||
|
@ -42,26 +42,20 @@
|
|||||||
android:theme="@style/AppTheme.ActionBar.Transparent"/>
|
android:theme="@style/AppTheme.ActionBar.Transparent"/>
|
||||||
<activity
|
<activity
|
||||||
android:name=".profile.EditProfileActivity"
|
android:name=".profile.EditProfileActivity"
|
||||||
android:exported="false"/>
|
android:exported="false"
|
||||||
|
android:theme="@style/BaseAppTheme.NoActionBar" />
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".posts.MediaViewerActivity"
|
android:name=".posts.MediaViewerActivity"
|
||||||
android:configChanges="keyboardHidden|orientation|screenSize"
|
android:configChanges="keyboardHidden|orientation|screenSize"
|
||||||
android:exported="false"
|
android:exported="false"
|
||||||
android:theme="@style/BaseAppTheme.NoActionBar" />
|
android:theme="@style/BaseAppTheme.NoActionBar" />
|
||||||
<activity android:name=".postCreation.camera.CameraActivity"/>
|
<activity android:name=".postCreation.camera.CameraActivity"
|
||||||
<activity android:name=".postCreation.camera.CameraActivityShortcut"
|
android:theme="@style/BaseAppTheme.NoActionBar"/>
|
||||||
android:exported = "true"
|
|
||||||
android:parentActivityName=".MainActivity">
|
|
||||||
<meta-data
|
|
||||||
android:name="android.support.PARENT_ACTIVITY"
|
|
||||||
android:value=".MainActivity" />
|
|
||||||
<intent-filter>
|
|
||||||
<action android:name="android.intent.action.VIEW" />
|
|
||||||
</intent-filter>
|
|
||||||
</activity>
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".posts.ReportActivity"
|
android:name=".posts.ReportActivity"
|
||||||
android:screenOrientation="sensorPortrait"
|
android:screenOrientation="sensorPortrait"
|
||||||
|
android:theme="@style/BaseAppTheme.NoActionBar"
|
||||||
tools:ignore="LockedOrientationActivity" />
|
tools:ignore="LockedOrientationActivity" />
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
@ -83,27 +77,32 @@
|
|||||||
</activity>
|
</activity>
|
||||||
<activity
|
<activity
|
||||||
android:name=".profile.FollowsActivity"
|
android:name=".profile.FollowsActivity"
|
||||||
|
android:theme="@style/BaseAppTheme.NoActionBar"
|
||||||
android:screenOrientation="sensorPortrait"
|
android:screenOrientation="sensorPortrait"
|
||||||
tools:ignore="LockedOrientationActivity" />
|
tools:ignore="LockedOrientationActivity" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".posts.feeds.uncachedFeeds.hashtags.HashTagActivity"
|
android:name=".posts.feeds.uncachedFeeds.hashtags.HashTagActivity"
|
||||||
|
android:theme="@style/BaseAppTheme.NoActionBar"
|
||||||
android:screenOrientation="sensorPortrait"
|
android:screenOrientation="sensorPortrait"
|
||||||
tools:ignore="LockedOrientationActivity" />
|
tools:ignore="LockedOrientationActivity" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".posts.PostActivity"
|
android:name=".posts.PostActivity"
|
||||||
android:screenOrientation="sensorPortrait"
|
android:screenOrientation="sensorPortrait"
|
||||||
tools:ignore="LockedOrientationActivity" />
|
tools:ignore="LockedOrientationActivity"
|
||||||
|
android:theme="@style/BaseAppTheme.NoActionBar" />
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".profile.ProfileActivity"
|
android:name=".profile.ProfileActivity"
|
||||||
android:screenOrientation="sensorPortrait"
|
android:screenOrientation="sensorPortrait"
|
||||||
tools:ignore="LockedOrientationActivity" />
|
tools:ignore="LockedOrientationActivity"
|
||||||
<activity android:name=".profile.CollectionActivity"/>
|
android:theme="@style/BaseAppTheme.NoActionBar"/>
|
||||||
|
<activity android:name=".profile.CollectionActivity"
|
||||||
|
android:theme="@style/BaseAppTheme.NoActionBar"/>
|
||||||
<activity
|
<activity
|
||||||
android:name=".settings.SettingsActivity"
|
android:name=".settings.SettingsActivity"
|
||||||
android:label="@string/title_activity_settings2"
|
android:label="@string/title_activity_settings2"
|
||||||
android:parentActivityName=".MainActivity"
|
android:parentActivityName=".MainActivity"
|
||||||
android:screenOrientation="sensorPortrait"
|
android:theme="@style/BaseAppTheme.NoActionBar" />
|
||||||
tools:ignore="LockedOrientationActivity" />
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".MainActivity"
|
android:name=".MainActivity"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
@ -144,6 +143,7 @@
|
|||||||
<activity
|
<activity
|
||||||
android:name=".searchDiscover.SearchActivity"
|
android:name=".searchDiscover.SearchActivity"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
|
android:theme="@style/BaseAppTheme.NoActionBar"
|
||||||
android:launchMode="singleTop"
|
android:launchMode="singleTop"
|
||||||
android:screenOrientation="sensorPortrait"
|
android:screenOrientation="sensorPortrait"
|
||||||
tools:ignore="LockedOrientationActivity">
|
tools:ignore="LockedOrientationActivity">
|
||||||
@ -155,17 +155,19 @@
|
|||||||
android:name="android.app.searchable"
|
android:name="android.app.searchable"
|
||||||
android:resource="@xml/searchable" />
|
android:resource="@xml/searchable" />
|
||||||
</activity>
|
</activity>
|
||||||
<activity android:name=".searchDiscover.TrendingActivity"/>
|
<activity android:name=".searchDiscover.TrendingActivity"
|
||||||
|
android:theme="@style/BaseAppTheme.NoActionBar" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".settings.AboutActivity"
|
android:name=".settings.AboutActivity"
|
||||||
android:parentActivityName=".settings.SettingsActivity"
|
android:parentActivityName=".settings.SettingsActivity"
|
||||||
android:screenOrientation="sensorPortrait"
|
android:theme="@style/BaseAppTheme.NoActionBar" />
|
||||||
tools:ignore="LockedOrientationActivity" />
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".settings.LicenseActivity"
|
android:name=".settings.LicenseActivity"
|
||||||
android:parentActivityName=".settings.AboutActivity"
|
android:parentActivityName=".settings.AboutActivity"
|
||||||
android:screenOrientation="sensorPortrait"
|
android:screenOrientation="sensorPortrait"
|
||||||
tools:ignore="LockedOrientationActivity" />
|
tools:ignore="LockedOrientationActivity"
|
||||||
|
android:theme="@style/BaseAppTheme.NoActionBar" />
|
||||||
|
|
||||||
|
|
||||||
<provider
|
<provider
|
||||||
android:name="androidx.core.content.FileProvider"
|
android:name="androidx.core.content.FileProvider"
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package org.pixeldroid.app
|
package org.pixeldroid.app
|
||||||
|
|
||||||
import android.app.AlertDialog
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.content.SharedPreferences
|
import android.content.SharedPreferences
|
||||||
@ -16,7 +15,7 @@ import kotlinx.coroutines.async
|
|||||||
import kotlinx.coroutines.coroutineScope
|
import kotlinx.coroutines.coroutineScope
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
import org.pixeldroid.app.databinding.ActivityLoginBinding
|
import org.pixeldroid.app.databinding.ActivityLoginBinding
|
||||||
import org.pixeldroid.app.utils.BaseThemedWithoutBarActivity
|
import org.pixeldroid.app.utils.BaseActivity
|
||||||
import org.pixeldroid.app.utils.api.PixelfedAPI
|
import org.pixeldroid.app.utils.api.PixelfedAPI
|
||||||
import org.pixeldroid.app.utils.api.objects.Application
|
import org.pixeldroid.app.utils.api.objects.Application
|
||||||
import org.pixeldroid.app.utils.api.objects.Instance
|
import org.pixeldroid.app.utils.api.objects.Instance
|
||||||
@ -45,7 +44,7 @@ since they do not depend on each other)
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class LoginActivity : BaseThemedWithoutBarActivity() {
|
class LoginActivity : BaseActivity() {
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
private const val PACKAGE_ID = BuildConfig.APPLICATION_ID
|
private const val PACKAGE_ID = BuildConfig.APPLICATION_ID
|
||||||
|
@ -50,8 +50,7 @@ import org.pixeldroid.app.posts.feeds.cachedFeeds.postFeeds.PostFeedFragment
|
|||||||
import org.pixeldroid.app.profile.ProfileActivity
|
import org.pixeldroid.app.profile.ProfileActivity
|
||||||
import org.pixeldroid.app.searchDiscover.SearchDiscoverFragment
|
import org.pixeldroid.app.searchDiscover.SearchDiscoverFragment
|
||||||
import org.pixeldroid.app.settings.SettingsActivity
|
import org.pixeldroid.app.settings.SettingsActivity
|
||||||
import org.pixeldroid.app.stories.StoriesActivity
|
import org.pixeldroid.app.utils.BaseActivity
|
||||||
import org.pixeldroid.app.utils.BaseThemedWithoutBarActivity
|
|
||||||
import org.pixeldroid.app.utils.api.objects.Notification
|
import org.pixeldroid.app.utils.api.objects.Notification
|
||||||
import org.pixeldroid.app.utils.db.addUser
|
import org.pixeldroid.app.utils.db.addUser
|
||||||
import org.pixeldroid.app.utils.db.entities.HomeStatusDatabaseEntity
|
import org.pixeldroid.app.utils.db.entities.HomeStatusDatabaseEntity
|
||||||
@ -66,7 +65,7 @@ import org.pixeldroid.app.utils.notificationsWorker.removeNotificationChannelsFr
|
|||||||
import java.time.Instant
|
import java.time.Instant
|
||||||
|
|
||||||
|
|
||||||
class MainActivity : BaseThemedWithoutBarActivity() {
|
class MainActivity : BaseActivity() {
|
||||||
|
|
||||||
private lateinit var header: AccountHeaderView
|
private lateinit var header: AccountHeaderView
|
||||||
private var user: UserDatabaseEntity? = null
|
private var user: UserDatabaseEntity? = null
|
||||||
|
@ -5,13 +5,13 @@ import androidx.navigation.NavController
|
|||||||
import androidx.navigation.fragment.NavHostFragment
|
import androidx.navigation.fragment.NavHostFragment
|
||||||
import org.pixeldroid.app.R
|
import org.pixeldroid.app.R
|
||||||
import org.pixeldroid.app.databinding.ActivityPostCreationBinding
|
import org.pixeldroid.app.databinding.ActivityPostCreationBinding
|
||||||
import org.pixeldroid.app.utils.BaseThemedWithoutBarActivity
|
import org.pixeldroid.app.utils.BaseActivity
|
||||||
import org.pixeldroid.app.utils.db.entities.InstanceDatabaseEntity
|
import org.pixeldroid.app.utils.db.entities.InstanceDatabaseEntity
|
||||||
import org.pixeldroid.app.utils.db.entities.UserDatabaseEntity
|
import org.pixeldroid.app.utils.db.entities.UserDatabaseEntity
|
||||||
|
|
||||||
const val TAG = "Post Creation Activity"
|
const val TAG = "Post Creation Activity"
|
||||||
|
|
||||||
class PostCreationActivity : BaseThemedWithoutBarActivity() {
|
class PostCreationActivity : BaseActivity() {
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
internal const val PICTURE_DESCRIPTION = "picture_description"
|
internal const val PICTURE_DESCRIPTION = "picture_description"
|
||||||
|
@ -5,15 +5,21 @@ import android.os.Bundle
|
|||||||
import android.view.MenuItem
|
import android.view.MenuItem
|
||||||
import org.pixeldroid.app.MainActivity
|
import org.pixeldroid.app.MainActivity
|
||||||
import org.pixeldroid.app.R
|
import org.pixeldroid.app.R
|
||||||
|
import org.pixeldroid.app.databinding.ActivityCameraBinding
|
||||||
import org.pixeldroid.app.postCreation.camera.CameraFragment.Companion.CAMERA_ACTIVITY
|
import org.pixeldroid.app.postCreation.camera.CameraFragment.Companion.CAMERA_ACTIVITY
|
||||||
import org.pixeldroid.app.postCreation.camera.CameraFragment.Companion.CAMERA_ACTIVITY_STORY
|
import org.pixeldroid.app.postCreation.camera.CameraFragment.Companion.CAMERA_ACTIVITY_STORY
|
||||||
import org.pixeldroid.app.utils.BaseThemedWithBarActivity
|
import org.pixeldroid.app.utils.BaseActivity
|
||||||
|
|
||||||
|
|
||||||
class CameraActivity : BaseThemedWithBarActivity() {
|
class CameraActivity : BaseActivity() {
|
||||||
|
private lateinit var binding: ActivityCameraBinding
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
setContentView(R.layout.activity_camera)
|
|
||||||
|
binding = ActivityCameraBinding.inflate(layoutInflater)
|
||||||
|
setContentView(binding.root)
|
||||||
|
setSupportActionBar(binding.topBar)
|
||||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||||
|
|
||||||
val cameraFragment = CameraFragment()
|
val cameraFragment = CameraFragment()
|
||||||
@ -23,36 +29,27 @@ class CameraActivity : BaseThemedWithBarActivity() {
|
|||||||
if(story) supportActionBar?.setTitle(R.string.add_story)
|
if(story) supportActionBar?.setTitle(R.string.add_story)
|
||||||
else supportActionBar?.setTitle(R.string.add_photo)
|
else supportActionBar?.setTitle(R.string.add_photo)
|
||||||
|
|
||||||
val arguments = Bundle()
|
// If this CameraActivity wasn't started from the shortcut,
|
||||||
arguments.putBoolean(CAMERA_ACTIVITY, true)
|
// tell the fragment it's in an activity (so that it sends back the result instead of
|
||||||
arguments.putBoolean(CAMERA_ACTIVITY_STORY, story)
|
// starting a new post creation process)
|
||||||
cameraFragment.arguments = arguments
|
if (intent.action != "android.intent.action.VIEW") {
|
||||||
|
val arguments = Bundle()
|
||||||
supportFragmentManager.beginTransaction()
|
arguments.putBoolean(CAMERA_ACTIVITY, true)
|
||||||
.add(R.id.camera_activity_fragment, cameraFragment).commit()
|
arguments.putBoolean(CAMERA_ACTIVITY_STORY, story)
|
||||||
}
|
cameraFragment.arguments = arguments
|
||||||
}
|
} else {
|
||||||
|
supportActionBar?.setTitle(R.string.new_post_shortcut_long)
|
||||||
/**
|
}
|
||||||
* Launch without arguments so that it will open the
|
|
||||||
* [org.pixeldroid.app.postCreation.PostCreationActivity] instead of "returning" to a non-existent
|
|
||||||
* [org.pixeldroid.app.postCreation.PostCreationActivity]
|
|
||||||
*/
|
|
||||||
class CameraActivityShortcut : BaseThemedWithBarActivity() {
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
|
||||||
super.onCreate(savedInstanceState)
|
|
||||||
setContentView(R.layout.activity_camera)
|
|
||||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
|
||||||
supportActionBar?.setTitle(R.string.new_post_shortcut_long)
|
|
||||||
|
|
||||||
val cameraFragment = CameraFragment()
|
|
||||||
|
|
||||||
supportFragmentManager.beginTransaction()
|
supportFragmentManager.beginTransaction()
|
||||||
.add(R.id.camera_activity_fragment, cameraFragment).commit()
|
.add(R.id.camera_activity_fragment, cameraFragment).commit()
|
||||||
}
|
}
|
||||||
|
|
||||||
//Start a new MainActivity when "going back" on this activity
|
|
||||||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||||
|
// If this CameraActivity wasn't started from the shortcut, behave as usual
|
||||||
|
if (intent.action != "android.intent.action.VIEW") return super.onOptionsItemSelected(item)
|
||||||
|
|
||||||
|
// Else, start a new MainActivity when "going back" on this activity
|
||||||
when (item.itemId) {
|
when (item.itemId) {
|
||||||
android.R.id.home -> {
|
android.R.id.home -> {
|
||||||
val intent = Intent(this, MainActivity::class.java)
|
val intent = Intent(this, MainActivity::class.java)
|
||||||
|
@ -14,9 +14,9 @@ import androidx.media2.common.MediaMetadata
|
|||||||
import androidx.media2.common.UriMediaItem
|
import androidx.media2.common.UriMediaItem
|
||||||
import androidx.media2.player.MediaPlayer
|
import androidx.media2.player.MediaPlayer
|
||||||
import org.pixeldroid.app.databinding.ActivityMediaviewerBinding
|
import org.pixeldroid.app.databinding.ActivityMediaviewerBinding
|
||||||
import org.pixeldroid.app.utils.BaseThemedWithoutBarActivity
|
import org.pixeldroid.app.utils.BaseActivity
|
||||||
|
|
||||||
class MediaViewerActivity : BaseThemedWithoutBarActivity() {
|
class MediaViewerActivity : BaseActivity() {
|
||||||
|
|
||||||
private lateinit var mediaPlayer: MediaPlayer
|
private lateinit var mediaPlayer: MediaPlayer
|
||||||
private lateinit var binding: ActivityMediaviewerBinding
|
private lateinit var binding: ActivityMediaviewerBinding
|
||||||
|
@ -11,7 +11,7 @@ import org.pixeldroid.app.databinding.ActivityPostBinding
|
|||||||
import org.pixeldroid.app.posts.feeds.uncachedFeeds.comments.CommentFragment
|
import org.pixeldroid.app.posts.feeds.uncachedFeeds.comments.CommentFragment
|
||||||
import org.pixeldroid.app.posts.feeds.uncachedFeeds.comments.CommentFragment.Companion.COMMENT_DOMAIN
|
import org.pixeldroid.app.posts.feeds.uncachedFeeds.comments.CommentFragment.Companion.COMMENT_DOMAIN
|
||||||
import org.pixeldroid.app.posts.feeds.uncachedFeeds.comments.CommentFragment.Companion.COMMENT_STATUS_ID
|
import org.pixeldroid.app.posts.feeds.uncachedFeeds.comments.CommentFragment.Companion.COMMENT_STATUS_ID
|
||||||
import org.pixeldroid.app.utils.BaseThemedWithBarActivity
|
import org.pixeldroid.app.utils.BaseActivity
|
||||||
import org.pixeldroid.app.utils.api.PixelfedAPI
|
import org.pixeldroid.app.utils.api.PixelfedAPI
|
||||||
import org.pixeldroid.app.utils.api.objects.Status
|
import org.pixeldroid.app.utils.api.objects.Status
|
||||||
import org.pixeldroid.app.utils.api.objects.Status.Companion.POST_COMMENT_TAG
|
import org.pixeldroid.app.utils.api.objects.Status.Companion.POST_COMMENT_TAG
|
||||||
@ -19,7 +19,7 @@ import org.pixeldroid.app.utils.api.objects.Status.Companion.POST_TAG
|
|||||||
import org.pixeldroid.app.utils.api.objects.Status.Companion.VIEW_COMMENTS_TAG
|
import org.pixeldroid.app.utils.api.objects.Status.Companion.VIEW_COMMENTS_TAG
|
||||||
import org.pixeldroid.app.utils.displayDimensionsInPx
|
import org.pixeldroid.app.utils.displayDimensionsInPx
|
||||||
|
|
||||||
class PostActivity : BaseThemedWithBarActivity() {
|
class PostActivity : BaseActivity() {
|
||||||
private lateinit var binding: ActivityPostBinding
|
private lateinit var binding: ActivityPostBinding
|
||||||
|
|
||||||
private var commentFragment = CommentFragment()
|
private var commentFragment = CommentFragment()
|
||||||
@ -30,7 +30,7 @@ class PostActivity : BaseThemedWithBarActivity() {
|
|||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
binding = ActivityPostBinding.inflate(layoutInflater)
|
binding = ActivityPostBinding.inflate(layoutInflater)
|
||||||
setContentView(binding.root)
|
setContentView(binding.root)
|
||||||
|
setSupportActionBar(binding.topBar)
|
||||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||||
|
|
||||||
status = intent.getSerializableExtra(POST_TAG) as Status
|
status = intent.getSerializableExtra(POST_TAG) as Status
|
||||||
|
@ -5,10 +5,10 @@ import android.view.View
|
|||||||
import androidx.lifecycle.lifecycleScope
|
import androidx.lifecycle.lifecycleScope
|
||||||
import org.pixeldroid.app.R
|
import org.pixeldroid.app.R
|
||||||
import org.pixeldroid.app.databinding.ActivityReportBinding
|
import org.pixeldroid.app.databinding.ActivityReportBinding
|
||||||
import org.pixeldroid.app.utils.BaseThemedWithBarActivity
|
import org.pixeldroid.app.utils.BaseActivity
|
||||||
import org.pixeldroid.app.utils.api.objects.Status
|
import org.pixeldroid.app.utils.api.objects.Status
|
||||||
|
|
||||||
class ReportActivity : BaseThemedWithBarActivity() {
|
class ReportActivity : BaseActivity() {
|
||||||
|
|
||||||
private lateinit var binding: ActivityReportBinding
|
private lateinit var binding: ActivityReportBinding
|
||||||
|
|
||||||
@ -16,9 +16,9 @@ class ReportActivity : BaseThemedWithBarActivity() {
|
|||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
binding = ActivityReportBinding.inflate(layoutInflater)
|
binding = ActivityReportBinding.inflate(layoutInflater)
|
||||||
setContentView(binding.root)
|
setContentView(binding.root)
|
||||||
|
setSupportActionBar(binding.topBar)
|
||||||
|
|
||||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||||
supportActionBar?.setTitle(R.string.report)
|
|
||||||
|
|
||||||
val status = intent.getSerializableExtra(Status.POST_TAG) as Status?
|
val status = intent.getSerializableExtra(Status.POST_TAG) as Status?
|
||||||
|
|
||||||
|
@ -2,17 +2,23 @@ package org.pixeldroid.app.posts.feeds.uncachedFeeds.hashtags
|
|||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import org.pixeldroid.app.R
|
import org.pixeldroid.app.R
|
||||||
|
import org.pixeldroid.app.databinding.ActivityFollowersBinding
|
||||||
import org.pixeldroid.app.posts.feeds.uncachedFeeds.UncachedPostsFragment
|
import org.pixeldroid.app.posts.feeds.uncachedFeeds.UncachedPostsFragment
|
||||||
import org.pixeldroid.app.utils.BaseThemedWithBarActivity
|
import org.pixeldroid.app.utils.BaseActivity
|
||||||
import org.pixeldroid.app.utils.api.objects.Tag.Companion.HASHTAG_TAG
|
import org.pixeldroid.app.utils.api.objects.Tag.Companion.HASHTAG_TAG
|
||||||
|
|
||||||
|
|
||||||
class HashTagActivity : BaseThemedWithBarActivity() {
|
class HashTagActivity : BaseActivity() {
|
||||||
private var tagFragment = UncachedPostsFragment()
|
private var tagFragment = UncachedPostsFragment()
|
||||||
|
private lateinit var binding: ActivityFollowersBinding
|
||||||
|
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
setContentView(R.layout.activity_followers)
|
binding = ActivityFollowersBinding.inflate(layoutInflater)
|
||||||
|
setContentView(binding.root)
|
||||||
|
setSupportActionBar(binding.topBar)
|
||||||
|
|
||||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||||
|
|
||||||
// Get hashtag tag
|
// Get hashtag tag
|
||||||
|
@ -13,12 +13,12 @@ import org.pixeldroid.app.R
|
|||||||
import org.pixeldroid.app.databinding.ActivityCollectionBinding
|
import org.pixeldroid.app.databinding.ActivityCollectionBinding
|
||||||
import org.pixeldroid.app.profile.ProfileFeedFragment.Companion.COLLECTION
|
import org.pixeldroid.app.profile.ProfileFeedFragment.Companion.COLLECTION
|
||||||
import org.pixeldroid.app.profile.ProfileFeedFragment.Companion.COLLECTION_ID
|
import org.pixeldroid.app.profile.ProfileFeedFragment.Companion.COLLECTION_ID
|
||||||
import org.pixeldroid.app.utils.BaseThemedWithBarActivity
|
import org.pixeldroid.app.utils.BaseActivity
|
||||||
import org.pixeldroid.app.utils.api.PixelfedAPI
|
import org.pixeldroid.app.utils.api.PixelfedAPI
|
||||||
import org.pixeldroid.app.utils.api.objects.Collection
|
import org.pixeldroid.app.utils.api.objects.Collection
|
||||||
import java.lang.Exception
|
import java.lang.Exception
|
||||||
|
|
||||||
class CollectionActivity : BaseThemedWithBarActivity() {
|
class CollectionActivity : BaseActivity() {
|
||||||
private lateinit var binding: ActivityCollectionBinding
|
private lateinit var binding: ActivityCollectionBinding
|
||||||
|
|
||||||
private lateinit var collection: Collection
|
private lateinit var collection: Collection
|
||||||
@ -37,6 +37,7 @@ class CollectionActivity : BaseThemedWithBarActivity() {
|
|||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
binding = ActivityCollectionBinding.inflate(layoutInflater)
|
binding = ActivityCollectionBinding.inflate(layoutInflater)
|
||||||
setContentView(binding.root)
|
setContentView(binding.root)
|
||||||
|
setSupportActionBar(binding.topBar)
|
||||||
|
|
||||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||||
|
|
||||||
|
@ -19,10 +19,10 @@ import com.google.android.material.snackbar.Snackbar
|
|||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
import org.pixeldroid.app.R
|
import org.pixeldroid.app.R
|
||||||
import org.pixeldroid.app.databinding.ActivityEditProfileBinding
|
import org.pixeldroid.app.databinding.ActivityEditProfileBinding
|
||||||
import org.pixeldroid.app.utils.BaseThemedWithBarActivity
|
import org.pixeldroid.app.utils.BaseActivity
|
||||||
import org.pixeldroid.app.utils.openUrl
|
import org.pixeldroid.app.utils.openUrl
|
||||||
|
|
||||||
class EditProfileActivity : BaseThemedWithBarActivity() {
|
class EditProfileActivity : BaseActivity() {
|
||||||
|
|
||||||
private lateinit var model: EditProfileViewModel
|
private lateinit var model: EditProfileViewModel
|
||||||
private lateinit var binding: ActivityEditProfileBinding
|
private lateinit var binding: ActivityEditProfileBinding
|
||||||
@ -31,8 +31,8 @@ class EditProfileActivity : BaseThemedWithBarActivity() {
|
|||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
binding = ActivityEditProfileBinding.inflate(layoutInflater)
|
binding = ActivityEditProfileBinding.inflate(layoutInflater)
|
||||||
setContentView(binding.root)
|
setContentView(binding.root)
|
||||||
|
setSupportActionBar(binding.topBar)
|
||||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||||
supportActionBar?.setTitle(R.string.edit_profile)
|
|
||||||
|
|
||||||
val _model: EditProfileViewModel by viewModels { EditProfileViewModelFactory(application) }
|
val _model: EditProfileViewModel by viewModels { EditProfileViewModelFactory(application) }
|
||||||
model = _model
|
model = _model
|
||||||
|
@ -2,20 +2,25 @@ package org.pixeldroid.app.profile
|
|||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import org.pixeldroid.app.R
|
import org.pixeldroid.app.R
|
||||||
|
import org.pixeldroid.app.databinding.ActivityFollowersBinding
|
||||||
import org.pixeldroid.app.posts.feeds.uncachedFeeds.accountLists.AccountListFragment
|
import org.pixeldroid.app.posts.feeds.uncachedFeeds.accountLists.AccountListFragment
|
||||||
import org.pixeldroid.app.utils.BaseThemedWithBarActivity
|
import org.pixeldroid.app.utils.BaseActivity
|
||||||
import org.pixeldroid.app.utils.api.objects.Account
|
import org.pixeldroid.app.utils.api.objects.Account
|
||||||
import org.pixeldroid.app.utils.api.objects.Account.Companion.ACCOUNT_ID_TAG
|
import org.pixeldroid.app.utils.api.objects.Account.Companion.ACCOUNT_ID_TAG
|
||||||
import org.pixeldroid.app.utils.api.objects.Account.Companion.ACCOUNT_TAG
|
import org.pixeldroid.app.utils.api.objects.Account.Companion.ACCOUNT_TAG
|
||||||
import org.pixeldroid.app.utils.api.objects.Account.Companion.FOLLOWERS_TAG
|
import org.pixeldroid.app.utils.api.objects.Account.Companion.FOLLOWERS_TAG
|
||||||
|
|
||||||
|
|
||||||
class FollowsActivity : BaseThemedWithBarActivity() {
|
class FollowsActivity : BaseActivity() {
|
||||||
private var followsFragment = AccountListFragment()
|
private var followsFragment = AccountListFragment()
|
||||||
|
private lateinit var binding: ActivityFollowersBinding
|
||||||
|
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
setContentView(R.layout.activity_followers)
|
binding = ActivityFollowersBinding.inflate(layoutInflater)
|
||||||
|
setContentView(binding.root)
|
||||||
|
setSupportActionBar(binding.topBar)
|
||||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||||
|
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ import kotlinx.coroutines.launch
|
|||||||
import org.pixeldroid.app.R
|
import org.pixeldroid.app.R
|
||||||
import org.pixeldroid.app.databinding.ActivityProfileBinding
|
import org.pixeldroid.app.databinding.ActivityProfileBinding
|
||||||
import org.pixeldroid.app.posts.parseHTMLText
|
import org.pixeldroid.app.posts.parseHTMLText
|
||||||
import org.pixeldroid.app.utils.BaseThemedWithBarActivity
|
import org.pixeldroid.app.utils.BaseActivity
|
||||||
import org.pixeldroid.app.utils.api.PixelfedAPI
|
import org.pixeldroid.app.utils.api.PixelfedAPI
|
||||||
import org.pixeldroid.app.utils.api.objects.Account
|
import org.pixeldroid.app.utils.api.objects.Account
|
||||||
import org.pixeldroid.app.utils.db.entities.UserDatabaseEntity
|
import org.pixeldroid.app.utils.db.entities.UserDatabaseEntity
|
||||||
@ -25,7 +25,7 @@ import org.pixeldroid.app.utils.setProfileImageFromURL
|
|||||||
import retrofit2.HttpException
|
import retrofit2.HttpException
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
|
|
||||||
class ProfileActivity : BaseThemedWithBarActivity() {
|
class ProfileActivity : BaseActivity() {
|
||||||
|
|
||||||
private lateinit var domain : String
|
private lateinit var domain : String
|
||||||
private lateinit var accountId : String
|
private lateinit var accountId : String
|
||||||
@ -36,7 +36,10 @@ class ProfileActivity : BaseThemedWithBarActivity() {
|
|||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
binding = ActivityProfileBinding.inflate(layoutInflater)
|
binding = ActivityProfileBinding.inflate(layoutInflater)
|
||||||
|
|
||||||
setContentView(binding.root)
|
setContentView(binding.root)
|
||||||
|
setSupportActionBar(binding.topBar)
|
||||||
|
|
||||||
|
|
||||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||||
|
|
||||||
|
@ -9,17 +9,21 @@ import androidx.viewpager2.widget.ViewPager2
|
|||||||
import com.google.android.material.tabs.TabLayout
|
import com.google.android.material.tabs.TabLayout
|
||||||
import com.google.android.material.tabs.TabLayoutMediator
|
import com.google.android.material.tabs.TabLayoutMediator
|
||||||
import org.pixeldroid.app.R
|
import org.pixeldroid.app.R
|
||||||
|
import org.pixeldroid.app.databinding.ActivitySearchBinding
|
||||||
import org.pixeldroid.app.posts.feeds.uncachedFeeds.UncachedPostsFragment
|
import org.pixeldroid.app.posts.feeds.uncachedFeeds.UncachedPostsFragment
|
||||||
import org.pixeldroid.app.posts.feeds.uncachedFeeds.search.SearchAccountFragment
|
import org.pixeldroid.app.posts.feeds.uncachedFeeds.search.SearchAccountFragment
|
||||||
import org.pixeldroid.app.posts.feeds.uncachedFeeds.search.SearchHashtagFragment
|
import org.pixeldroid.app.posts.feeds.uncachedFeeds.search.SearchHashtagFragment
|
||||||
import org.pixeldroid.app.utils.BaseThemedWithBarActivity
|
import org.pixeldroid.app.utils.BaseActivity
|
||||||
import org.pixeldroid.app.utils.api.objects.Results
|
import org.pixeldroid.app.utils.api.objects.Results
|
||||||
|
|
||||||
class SearchActivity : BaseThemedWithBarActivity() {
|
class SearchActivity : BaseActivity() {
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
setContentView(R.layout.activity_search)
|
val binding = ActivitySearchBinding.inflate(layoutInflater)
|
||||||
|
|
||||||
|
setContentView(binding.root)
|
||||||
|
setSupportActionBar(binding.topBar)
|
||||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||||
|
|
||||||
var query = ""
|
var query = ""
|
||||||
|
@ -15,7 +15,7 @@ import org.pixeldroid.app.posts.PostActivity
|
|||||||
import org.pixeldroid.app.posts.feeds.uncachedFeeds.accountLists.AccountViewHolder
|
import org.pixeldroid.app.posts.feeds.uncachedFeeds.accountLists.AccountViewHolder
|
||||||
import org.pixeldroid.app.posts.feeds.uncachedFeeds.search.HashTagViewHolder
|
import org.pixeldroid.app.posts.feeds.uncachedFeeds.search.HashTagViewHolder
|
||||||
import org.pixeldroid.app.profile.ProfilePostViewHolder
|
import org.pixeldroid.app.profile.ProfilePostViewHolder
|
||||||
import org.pixeldroid.app.utils.BaseThemedWithBarActivity
|
import org.pixeldroid.app.utils.BaseActivity
|
||||||
import org.pixeldroid.app.utils.api.PixelfedAPI
|
import org.pixeldroid.app.utils.api.PixelfedAPI
|
||||||
import org.pixeldroid.app.utils.api.objects.Account
|
import org.pixeldroid.app.utils.api.objects.Account
|
||||||
import org.pixeldroid.app.utils.api.objects.Attachment
|
import org.pixeldroid.app.utils.api.objects.Attachment
|
||||||
@ -24,7 +24,7 @@ import org.pixeldroid.app.utils.api.objects.Status
|
|||||||
import org.pixeldroid.app.utils.api.objects.Tag
|
import org.pixeldroid.app.utils.api.objects.Tag
|
||||||
import org.pixeldroid.app.utils.setSquareImageFromURL
|
import org.pixeldroid.app.utils.setSquareImageFromURL
|
||||||
|
|
||||||
class TrendingActivity : BaseThemedWithBarActivity() {
|
class TrendingActivity : BaseActivity() {
|
||||||
|
|
||||||
private lateinit var binding: ActivityTrendingBinding
|
private lateinit var binding: ActivityTrendingBinding
|
||||||
private lateinit var trendingAdapter : TrendingRecyclerViewAdapter
|
private lateinit var trendingAdapter : TrendingRecyclerViewAdapter
|
||||||
@ -33,6 +33,7 @@ class TrendingActivity : BaseThemedWithBarActivity() {
|
|||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
binding = ActivityTrendingBinding.inflate(layoutInflater)
|
binding = ActivityTrendingBinding.inflate(layoutInflater)
|
||||||
setContentView(binding.root)
|
setContentView(binding.root)
|
||||||
|
setSupportActionBar(binding.topBar)
|
||||||
|
|
||||||
val recycler = binding.list
|
val recycler = binding.list
|
||||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||||
|
@ -3,19 +3,18 @@ package org.pixeldroid.app.settings
|
|||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import org.pixeldroid.app.BuildConfig
|
import org.pixeldroid.app.BuildConfig
|
||||||
import org.pixeldroid.app.R
|
|
||||||
import org.pixeldroid.app.databinding.ActivityAboutBinding
|
import org.pixeldroid.app.databinding.ActivityAboutBinding
|
||||||
import org.pixeldroid.app.utils.BaseThemedWithBarActivity
|
import org.pixeldroid.app.utils.ThemedActivity
|
||||||
|
|
||||||
class AboutActivity : BaseThemedWithBarActivity() {
|
class AboutActivity : ThemedActivity() {
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
val binding = ActivityAboutBinding.inflate(layoutInflater)
|
val binding = ActivityAboutBinding.inflate(layoutInflater)
|
||||||
|
|
||||||
setContentView(binding.root)
|
setContentView(binding.root)
|
||||||
|
setSupportActionBar(binding.topBar)
|
||||||
|
|
||||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||||
supportActionBar?.setTitle(R.string.about_pixeldroid)
|
|
||||||
|
|
||||||
binding.aboutVersionNumber.text = BuildConfig.VERSION_NAME
|
binding.aboutVersionNumber.text = BuildConfig.VERSION_NAME
|
||||||
binding.licensesButton.setOnClickListener{
|
binding.licensesButton.setOnClickListener{
|
||||||
|
@ -4,13 +4,13 @@ import android.os.Bundle
|
|||||||
import com.mikepenz.aboutlibraries.Libs
|
import com.mikepenz.aboutlibraries.Libs
|
||||||
import org.pixeldroid.app.R
|
import org.pixeldroid.app.R
|
||||||
import org.pixeldroid.app.databinding.OpenSourceLicenseBinding
|
import org.pixeldroid.app.databinding.OpenSourceLicenseBinding
|
||||||
import org.pixeldroid.app.utils.BaseThemedWithBarActivity
|
import org.pixeldroid.app.utils.ThemedActivity
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Displays licenses for all app dependencies. JSON is
|
* Displays licenses for all app dependencies. JSON is
|
||||||
* generated by the plugin https://github.com/cookpad/LicenseToolsPlugin.
|
* generated by the plugin https://github.com/cookpad/LicenseToolsPlugin.
|
||||||
*/
|
*/
|
||||||
class LicenseActivity: BaseThemedWithBarActivity() {
|
class LicenseActivity: ThemedActivity() {
|
||||||
|
|
||||||
private lateinit var binding: OpenSourceLicenseBinding
|
private lateinit var binding: OpenSourceLicenseBinding
|
||||||
|
|
||||||
@ -19,10 +19,9 @@ class LicenseActivity: BaseThemedWithBarActivity() {
|
|||||||
binding = OpenSourceLicenseBinding.inflate(layoutInflater)
|
binding = OpenSourceLicenseBinding.inflate(layoutInflater)
|
||||||
|
|
||||||
setContentView(binding.root)
|
setContentView(binding.root)
|
||||||
|
setSupportActionBar(binding.topBar)
|
||||||
|
|
||||||
supportActionBar?.setTitle(R.string.dependencies_licenses)
|
|
||||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||||
supportActionBar?.setHomeButtonEnabled(true)
|
|
||||||
|
|
||||||
setupRecyclerView()
|
setupRecyclerView()
|
||||||
}
|
}
|
||||||
|
@ -16,23 +16,26 @@ import androidx.preference.PreferenceManager
|
|||||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||||
import org.pixeldroid.app.MainActivity
|
import org.pixeldroid.app.MainActivity
|
||||||
import org.pixeldroid.app.R
|
import org.pixeldroid.app.R
|
||||||
import org.pixeldroid.app.utils.BaseThemedWithBarActivity
|
import org.pixeldroid.app.databinding.SettingsBinding
|
||||||
|
import org.pixeldroid.app.utils.ThemedActivity
|
||||||
import org.pixeldroid.app.utils.setThemeFromPreferences
|
import org.pixeldroid.app.utils.setThemeFromPreferences
|
||||||
|
|
||||||
|
|
||||||
class SettingsActivity : BaseThemedWithBarActivity(), SharedPreferences.OnSharedPreferenceChangeListener {
|
class SettingsActivity : ThemedActivity(), SharedPreferences.OnSharedPreferenceChangeListener {
|
||||||
private var restartMainOnExit = false
|
private var restartMainOnExit = false
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
|
val binding = SettingsBinding.inflate(layoutInflater)
|
||||||
|
|
||||||
|
setContentView(binding.root)
|
||||||
|
setSupportActionBar(binding.topBar)
|
||||||
|
|
||||||
setContentView(R.layout.settings)
|
|
||||||
supportFragmentManager
|
supportFragmentManager
|
||||||
.beginTransaction()
|
.beginTransaction()
|
||||||
.replace(R.id.settings, SettingsFragment())
|
.replace(R.id.settings, SettingsFragment())
|
||||||
.commit()
|
.commit()
|
||||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||||
supportActionBar?.setTitle(R.string.menu_settings)
|
|
||||||
|
|
||||||
restartMainOnExit = intent.getBooleanExtra("restartMain", false)
|
restartMainOnExit = intent.getBooleanExtra("restartMain", false)
|
||||||
}
|
}
|
||||||
|
@ -24,12 +24,12 @@ import kotlinx.coroutines.launch
|
|||||||
import org.pixeldroid.app.R
|
import org.pixeldroid.app.R
|
||||||
import org.pixeldroid.app.databinding.ActivityStoriesBinding
|
import org.pixeldroid.app.databinding.ActivityStoriesBinding
|
||||||
import org.pixeldroid.app.posts.setTextViewFromISO8601
|
import org.pixeldroid.app.posts.setTextViewFromISO8601
|
||||||
import org.pixeldroid.app.utils.BaseThemedWithoutBarActivity
|
import org.pixeldroid.app.utils.BaseActivity
|
||||||
import org.pixeldroid.app.utils.api.objects.Account
|
import org.pixeldroid.app.utils.api.objects.Account
|
||||||
import org.pixeldroid.app.utils.api.objects.StoryCarousel
|
import org.pixeldroid.app.utils.api.objects.StoryCarousel
|
||||||
|
|
||||||
|
|
||||||
class StoriesActivity: BaseThemedWithoutBarActivity() {
|
class StoriesActivity: BaseActivity() {
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
const val STORY_CAROUSEL = "LaunchStoryCarousel"
|
const val STORY_CAROUSEL = "LaunchStoryCarousel"
|
||||||
|
@ -6,7 +6,7 @@ import org.pixeldroid.app.utils.db.AppDatabase
|
|||||||
import org.pixeldroid.app.utils.di.PixelfedAPIHolder
|
import org.pixeldroid.app.utils.di.PixelfedAPIHolder
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
open class BaseActivity : AppCompatActivity() {
|
open class BaseActivity : ThemedActivity() {
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
lateinit var db: AppDatabase
|
lateinit var db: AppDatabase
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
package org.pixeldroid.app.utils
|
|
||||||
|
|
||||||
import android.os.Bundle
|
|
||||||
|
|
||||||
open class BaseThemedWithBarActivity : BaseActivity() {
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
|
||||||
// Set theme when we chose one
|
|
||||||
themeActionBar()?.let { setTheme(it) }
|
|
||||||
super.onCreate(savedInstanceState)
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,8 +1,9 @@
|
|||||||
package org.pixeldroid.app.utils
|
package org.pixeldroid.app.utils
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
|
|
||||||
open class BaseThemedWithoutBarActivity : BaseActivity() {
|
open class ThemedActivity : AppCompatActivity() {
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
// Set theme when we chose one
|
// Set theme when we chose one
|
||||||
themeNoActionBar()?.let { setTheme(it) }
|
themeNoActionBar()?.let { setTheme(it) }
|
@ -1,136 +1,157 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:fadeScrollbars="false">
|
android:fitsSystemWindows="true">
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
tools:context=".settings.AboutActivity">
|
|
||||||
|
|
||||||
<ImageView
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
android:importantForAccessibility="no"
|
android:layout_width="match_parent"
|
||||||
android:id="@+id/imageView"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="24dp"
|
android:background="?attr/colorSecondaryContainer"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
android:fitsSystemWindows="true"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
android:theme="@style/ThemeOverlay.AppCompat.ActionBar">
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:srcCompat="@drawable/mascot" />
|
|
||||||
|
|
||||||
<TextView
|
<com.google.android.material.appbar.MaterialToolbar
|
||||||
android:id="@+id/aboutAppName"
|
android:id="@+id/top_bar"
|
||||||
android:layout_width="wrap_content"
|
app:title="@string/about_pixeldroid"
|
||||||
android:layout_height="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_marginTop="11dp"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/app_name"
|
android:minHeight="?attr/actionBarSize" />
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Large"
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/imageView" />
|
|
||||||
|
|
||||||
<TextView
|
<ScrollView xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/aboutVersionNumber"
|
android:layout_width="match_parent"
|
||||||
android:layout_width="wrap_content"
|
android:layout_height="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:fadeScrollbars="false"
|
||||||
android:layout_marginTop="16dp"
|
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||||
android:textStyle="bold"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/aboutAppName"
|
|
||||||
tools:text="v1.0.realversion" />
|
|
||||||
|
|
||||||
<TextView
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/aboutAppDescription"
|
android:layout_width="match_parent"
|
||||||
android:layout_width="0dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
tools:context=".settings.AboutActivity">
|
||||||
android:layout_marginStart="16dp"
|
|
||||||
android:layout_marginTop="16dp"
|
|
||||||
android:layout_marginEnd="16dp"
|
|
||||||
android:text="@string/license_info"
|
|
||||||
android:textAlignment="center"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/aboutVersionNumber" />
|
|
||||||
|
|
||||||
<TextView
|
<ImageView
|
||||||
android:id="@+id/aboutWebsite"
|
android:id="@+id/imageView"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="24dp"
|
||||||
android:autoLink="web"
|
android:importantForAccessibility="no"
|
||||||
android:textAlignment="center"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
android:text="@string/project_website"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:srcCompat="@drawable/mascot" />
|
||||||
app:layout_constraintTop_toBottomOf="@+id/aboutAppDescription" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/contributeTranslationsText"
|
android:id="@+id/aboutAppName"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="11dp"
|
||||||
android:autoLink="web"
|
android:text="@string/app_name"
|
||||||
android:drawablePadding="6dp"
|
android:textAppearance="@style/TextAppearance.AppCompat.Large"
|
||||||
android:textAlignment="center"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
android:text="@string/help_translate"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintTop_toBottomOf="@+id/imageView" />
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/aboutWebsite"
|
|
||||||
app:drawableLeftCompat="@drawable/translate_black_24dp" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/contributeTranslationsUrl"
|
android:id="@+id/aboutVersionNumber"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:autoLink="web"
|
android:layout_marginTop="16dp"
|
||||||
android:textAlignment="center"
|
android:textStyle="bold"
|
||||||
android:text="https://weblate.pixeldroid.org"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintTop_toBottomOf="@+id/aboutAppName"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/contributeTranslationsText"
|
tools:text="v1.0.realversion" />
|
||||||
tools:ignore="HardcodedText" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/contributeForgeText"
|
android:id="@+id/aboutAppDescription"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginStart="16dp"
|
||||||
android:autoLink="web"
|
android:layout_marginTop="16dp"
|
||||||
android:drawablePadding="6dp"
|
android:layout_marginEnd="16dp"
|
||||||
android:textAlignment="center"
|
android:text="@string/license_info"
|
||||||
android:text="@string/issues_contribute"
|
android:textAlignment="center"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/contributeTranslationsUrl"
|
app:layout_constraintTop_toBottomOf="@+id/aboutVersionNumber" />
|
||||||
app:drawableLeftCompat="@drawable/bug_report_black_24dp" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/contributeForgeUrl"
|
android:id="@+id/aboutWebsite"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:autoLink="web"
|
android:layout_marginTop="16dp"
|
||||||
android:textAlignment="center"
|
android:autoLink="web"
|
||||||
android:text="https://gitlab.shinice.net/pixeldroid/PixelDroid"
|
android:text="@string/project_website"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
android:textAlignment="center"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/contributeForgeText"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
tools:ignore="HardcodedText" />
|
app:layout_constraintTop_toBottomOf="@+id/aboutAppDescription" />
|
||||||
|
|
||||||
<Button
|
<TextView
|
||||||
android:id="@+id/licensesButton"
|
android:id="@+id/contributeTranslationsText"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:text="@string/dependencies_licenses"
|
android:autoLink="web"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
android:drawablePadding="6dp"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
android:text="@string/help_translate"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/contributeForgeUrl" />
|
android:textAlignment="center"
|
||||||
|
app:drawableLeftCompat="@drawable/translate_black_24dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/aboutWebsite" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
<TextView
|
||||||
|
android:id="@+id/contributeTranslationsUrl"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:autoLink="web"
|
||||||
|
android:text="https://weblate.pixeldroid.org"
|
||||||
|
android:textAlignment="center"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/contributeTranslationsText"
|
||||||
|
tools:ignore="HardcodedText" />
|
||||||
|
|
||||||
</ScrollView>
|
<TextView
|
||||||
|
android:id="@+id/contributeForgeText"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:autoLink="web"
|
||||||
|
android:drawablePadding="6dp"
|
||||||
|
android:text="@string/issues_contribute"
|
||||||
|
android:textAlignment="center"
|
||||||
|
app:drawableLeftCompat="@drawable/bug_report_black_24dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/contributeTranslationsUrl" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/contributeForgeUrl"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:autoLink="web"
|
||||||
|
android:text="https://gitlab.shinice.net/pixeldroid/PixelDroid"
|
||||||
|
android:textAlignment="center"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/contributeForgeText"
|
||||||
|
tools:ignore="HardcodedText" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/licensesButton"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="16dp"
|
||||||
|
android:text="@string/dependencies_licenses"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/contributeForgeUrl" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
</ScrollView>
|
||||||
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
@ -1,13 +1,34 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<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"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:fitsSystemWindows="true"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:background="?attr/colorSecondaryContainer"
|
||||||
tools:context=".postCreation.camera.CameraActivity">
|
tools:context=".postCreation.camera.CameraActivity">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<com.google.android.material.appbar.MaterialToolbar
|
||||||
|
android:id="@+id/top_bar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:minHeight="?attr/actionBarSize"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<androidx.fragment.app.FragmentContainerView
|
<androidx.fragment.app.FragmentContainerView
|
||||||
android:id="@+id/camera_activity_fragment"
|
android:id="@+id/camera_activity_fragment"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"/>
|
android:layout_height="0dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/top_bar" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
@ -1,14 +1,30 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<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"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:fitsSystemWindows="true"
|
||||||
tools:context=".searchDiscover.TrendingActivity">
|
tools:context=".searchDiscover.TrendingActivity">
|
||||||
|
|
||||||
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="?attr/colorSecondaryContainer"
|
||||||
|
android:fitsSystemWindows="true"
|
||||||
|
android:theme="@style/ThemeOverlay.AppCompat.ActionBar">
|
||||||
|
|
||||||
|
<com.google.android.material.appbar.MaterialToolbar
|
||||||
|
android:id="@+id/top_bar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:minHeight="?attr/actionBarSize" />
|
||||||
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
|
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||||
android:id = "@+id/collectionFragment"
|
android:id = "@+id/collectionFragment"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"/>
|
android:layout_height="match_parent"/>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
@ -1,184 +1,211 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
|
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
|
android:fitsSystemWindows="true">
|
||||||
|
|
||||||
<ImageView
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
android:id="@+id/profilePic"
|
android:layout_width="match_parent"
|
||||||
android:layout_width="48dp"
|
|
||||||
android:layout_height="48dp"
|
|
||||||
android:layout_marginStart="24dp"
|
|
||||||
android:layout_marginTop="24dp"
|
|
||||||
app:layout_constraintBottom_toTopOf="@+id/textInputLayoutName"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
tools:srcCompat="@tools:sample/avatars"
|
|
||||||
android:contentDescription="@string/profile_picture" />
|
|
||||||
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
|
||||||
android:id="@+id/textInputLayoutName"
|
|
||||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="8dp"
|
android:background="?attr/colorSecondaryContainer"
|
||||||
android:layout_marginTop="8dp"
|
android:fitsSystemWindows="true"
|
||||||
android:layout_marginEnd="8dp"
|
android:theme="@style/ThemeOverlay.AppCompat.ActionBar">
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/profilePic">
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
<com.google.android.material.appbar.MaterialToolbar
|
||||||
android:id="@+id/nameEditText"
|
android:id="@+id/top_bar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:hint="@string/your_name"
|
android:minHeight="?attr/actionBarSize"
|
||||||
android:ems="10"
|
app:title="@string/edit_profile" />
|
||||||
android:imeOptions="actionDone" />
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/textInputLayoutBio"
|
android:layout_width="match_parent"
|
||||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
android:layout_height="match_parent"
|
||||||
android:layout_width="0dp"
|
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="8dp"
|
|
||||||
android:layout_marginTop="24dp"
|
|
||||||
android:layout_marginEnd="8dp"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/textInputLayoutName">
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
<ImageView
|
||||||
android:id="@+id/bioEditText"
|
android:id="@+id/profilePic"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="48dp"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
android:layout_marginStart="24dp"
|
||||||
|
android:layout_marginTop="24dp"
|
||||||
|
android:contentDescription="@string/profile_picture"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/textInputLayoutName"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tools:srcCompat="@tools:sample/avatars" />
|
||||||
|
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/textInputLayoutName"
|
||||||
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:hint="@string/your_bio" />
|
android:layout_marginStart="8dp"
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/profilePic">
|
||||||
|
|
||||||
<com.google.android.material.materialswitch.MaterialSwitch
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:id="@+id/privateSwitch"
|
android:id="@+id/nameEditText"
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="8dp"
|
|
||||||
android:layout_marginTop="24dp"
|
|
||||||
android:layout_marginEnd="8dp"
|
|
||||||
app:layout_constraintEnd_toStartOf="@+id/privateText"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/textInputLayoutBio" />
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:id="@+id/privateText"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@+id/privateSwitch"
|
|
||||||
app:layout_constraintTop_toTopOf="@+id/privateSwitch"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@+id/privateSwitch">
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/privateTitle"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/private_account"
|
|
||||||
android:textStyle="bold"
|
|
||||||
app:layout_constraintHorizontal_bias="0.0"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/private_account_explanation"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintHorizontal_bias="0.0"
|
|
||||||
app:layout_constraintStart_toStartOf="@+id/privateTitle"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/privateTitle" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/editButton"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/more_profile_settings"
|
|
||||||
android:layout_marginTop="24dp"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:icon="@drawable/ic_baseline_open_in_browser_24"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/privateText" />
|
|
||||||
|
|
||||||
|
|
||||||
<com.google.android.material.card.MaterialCardView
|
|
||||||
android:id="@+id/progressCard"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_margin="8dp"
|
|
||||||
style="?attr/materialCardViewElevatedStyle"
|
|
||||||
app:cardBackgroundColor="?attr/colorSecondaryContainer"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" >
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:layout_margin="8dp"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:id="@+id/progressIcon"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
android:ems="10"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
android:hint="@string/your_name"
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
android:imeOptions="actionDone" />
|
||||||
<ProgressBar
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
android:id="@+id/savingProgressBar"
|
|
||||||
style="?android:attr/progressBarStyle"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"/>
|
|
||||||
|
|
||||||
<ImageView
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/error"
|
android:id="@+id/textInputLayoutBio"
|
||||||
app:tint="?attr/colorOnSecondaryContainer"
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
android:src="@drawable/error"
|
android:layout_width="0dp"
|
||||||
android:visibility="gone"
|
android:layout_height="wrap_content"
|
||||||
android:layout_width="wrap_content"
|
android:layout_marginStart="8dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_marginTop="24dp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
android:layout_marginEnd="8dp"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
android:contentDescription="@string/profile_saved" />
|
app:layout_constraintTop_toBottomOf="@+id/textInputLayoutName">
|
||||||
|
|
||||||
<ImageView
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:id="@+id/done"
|
android:id="@+id/bioEditText"
|
||||||
android:src="@drawable/check_circle_24"
|
android:layout_width="match_parent"
|
||||||
android:visibility="gone"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
android:hint="@string/your_bio" />
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
android:contentDescription="@string/profile_saved" />
|
<com.google.android.material.materialswitch.MaterialSwitch
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
android:id="@+id/privateSwitch"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:layout_marginTop="24dp"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
app:layout_constraintEnd_toStartOf="@+id/privateText"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/textInputLayoutBio" />
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/privateText"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/privateSwitch"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/privateSwitch"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/privateSwitch">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/progressText"
|
android:id="@+id/privateTitle"
|
||||||
tools:text="@string/fetching_profile"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
android:text="@string/private_account"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintHorizontal_bias="0.0"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/progressIcon"/>
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/private_account_explanation"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.0"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/privateTitle"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/privateTitle" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
</com.google.android.material.card.MaterialCardView>
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
<Button
|
||||||
|
android:id="@+id/editButton"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="24dp"
|
||||||
|
android:text="@string/more_profile_settings"
|
||||||
|
app:icon="@drawable/ic_baseline_open_in_browser_24"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/privateText" />
|
||||||
|
|
||||||
|
|
||||||
|
<com.google.android.material.card.MaterialCardView
|
||||||
|
android:id="@+id/progressCard"
|
||||||
|
style="?attr/materialCardViewElevatedStyle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="8dp"
|
||||||
|
app:cardBackgroundColor="?attr/colorSecondaryContainer"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_margin="8dp">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/progressIcon"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<ProgressBar
|
||||||
|
android:id="@+id/savingProgressBar"
|
||||||
|
style="?android:attr/progressBarStyle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/error"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:contentDescription="@string/profile_saved"
|
||||||
|
android:src="@drawable/error"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:tint="?attr/colorOnSecondaryContainer" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/done"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:contentDescription="@string/profile_saved"
|
||||||
|
android:src="@drawable/check_circle_24"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/progressText"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/progressIcon"
|
||||||
|
tools:text="@string/fetching_profile" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
@ -1,5 +1,30 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:id="@+id/followsFragment"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"/>
|
android:fitsSystemWindows="true"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:fitsSystemWindows="true"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="?attr/colorSecondaryContainer"
|
||||||
|
android:theme="@style/ThemeOverlay.AppCompat.ActionBar">
|
||||||
|
<com.google.android.material.appbar.MaterialToolbar
|
||||||
|
android:id="@+id/top_bar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:minHeight="?attr/actionBarSize" />
|
||||||
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/followsFragment"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/top_bar" />
|
||||||
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
@ -3,16 +3,27 @@
|
|||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/scrollview"
|
android:id="@+id/scrollview"
|
||||||
|
android:fitsSystemWindows="true"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context=".posts.PostActivity">
|
tools:context=".posts.PostActivity">
|
||||||
|
|
||||||
<com.google.android.material.appbar.AppBarLayout
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
android:id="@+id/app_bar_layout"
|
android:id="@+id/app_bar_layout"
|
||||||
|
android:background="?attr/colorSecondaryContainer"
|
||||||
|
android:fitsSystemWindows="true"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<com.google.android.material.appbar.MaterialToolbar
|
||||||
|
android:id="@+id/top_bar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:minHeight="?attr/actionBarSize"
|
||||||
|
app:layout_scrollFlags="scroll|enterAlways"/>
|
||||||
|
|
||||||
<com.google.android.material.appbar.CollapsingToolbarLayout
|
<com.google.android.material.appbar.CollapsingToolbarLayout
|
||||||
|
android:background="?attr/colorSurface"
|
||||||
android:id="@+id/collapsing_toolbar_layout"
|
android:id="@+id/collapsing_toolbar_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -3,16 +3,27 @@
|
|||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
android:fitsSystemWindows="true"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context=".profile.ProfileActivity">
|
tools:context=".profile.ProfileActivity">
|
||||||
|
|
||||||
<com.google.android.material.appbar.AppBarLayout
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
android:id="@+id/app_bar_layout"
|
android:id="@+id/app_bar_layout"
|
||||||
|
android:background="?attr/colorSecondaryContainer"
|
||||||
|
android:fitsSystemWindows="true"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<com.google.android.material.appbar.MaterialToolbar
|
||||||
|
android:id="@+id/top_bar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:minHeight="?attr/actionBarSize"
|
||||||
|
app:layout_scrollFlags="scroll|enterAlways"/>
|
||||||
|
|
||||||
<com.google.android.material.appbar.CollapsingToolbarLayout
|
<com.google.android.material.appbar.CollapsingToolbarLayout
|
||||||
android:id="@+id/collapsing_toolbar_layout"
|
android:id="@+id/collapsing_toolbar_layout"
|
||||||
|
android:background="?attr/colorSurface"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
app:layout_scrollFlags="scroll|exitUntilCollapsed">
|
app:layout_scrollFlags="scroll|exitUntilCollapsed">
|
||||||
|
@ -1,11 +1,29 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:fitsSystemWindows="true"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="?attr/colorSecondaryContainer"
|
||||||
|
tools:context=".posts.ReportActivity">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:background="?attr/colorSurface"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context=".posts.ReportActivity">
|
tools:context=".posts.ReportActivity">
|
||||||
|
|
||||||
|
<com.google.android.material.appbar.MaterialToolbar
|
||||||
|
android:id="@+id/top_bar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:minHeight="?attr/actionBarSize"
|
||||||
|
app:title="@string/report"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/report_target_textview"
|
android:id="@+id/report_target_textview"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@ -14,8 +32,8 @@
|
|||||||
app:layout_constraintBottom_toTopOf="@+id/textInputLayout"
|
app:layout_constraintBottom_toTopOf="@+id/textInputLayout"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toBottomOf="@+id/top_bar"
|
||||||
tools:text="Reporting @user's post:" />
|
tools:text="Report @user's post" />
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/textInputLayout"
|
android:id="@+id/textInputLayout"
|
||||||
@ -96,3 +114,4 @@
|
|||||||
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
@ -1,13 +1,29 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
|
android:fitsSystemWindows="true">
|
||||||
|
|
||||||
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="?attr/colorSecondaryContainer"
|
||||||
|
android:fitsSystemWindows="true"
|
||||||
|
android:theme="@style/ThemeOverlay.AppCompat.ActionBar">
|
||||||
|
|
||||||
|
<com.google.android.material.appbar.MaterialToolbar
|
||||||
|
android:id="@+id/top_bar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:minHeight="?attr/actionBarSize"
|
||||||
|
app:title="@string/menu_settings" />
|
||||||
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
|
||||||
@ -26,5 +42,4 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -1,11 +1,28 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:fitsSystemWindows="true"
|
||||||
|
android:background="?attr/colorSecondaryContainer"
|
||||||
tools:context=".searchDiscover.TrendingActivity">
|
tools:context=".searchDiscover.TrendingActivity">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:background="?attr/colorSurface"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<com.google.android.material.appbar.MaterialToolbar
|
||||||
|
android:id="@+id/top_bar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:minHeight="?attr/actionBarSize"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
|
||||||
<ProgressBar
|
<ProgressBar
|
||||||
android:id="@+id/progressBar"
|
android:id="@+id/progressBar"
|
||||||
style="?android:attr/progressBarStyle"
|
style="?android:attr/progressBarStyle"
|
||||||
@ -25,7 +42,7 @@
|
|||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
app:layout_constraintTop_toBottomOf="@+id/top_bar">
|
||||||
<androidx.core.widget.NestedScrollView
|
<androidx.core.widget.NestedScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
@ -59,3 +76,4 @@
|
|||||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
@ -1,16 +1,33 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical">
|
android:fitsSystemWindows="true">
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
android:id="@+id/open_source_license_recycler_view"
|
android:layout_width="match_parent"
|
||||||
android:layout_width="match_parent"
|
android:fitsSystemWindows="true"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:fadeScrollbars="false"
|
android:background="?attr/colorSecondaryContainer"
|
||||||
android:scrollbars="vertical"
|
android:theme="@style/ThemeOverlay.AppCompat.ActionBar">
|
||||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
|
<com.google.android.material.appbar.MaterialToolbar
|
||||||
|
android:id="@+id/top_bar"
|
||||||
|
app:title="@string/dependencies_licenses"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:minHeight="?attr/actionBarSize" />
|
||||||
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:background="?attr/colorSurface"
|
||||||
|
android:id="@+id/open_source_license_recycler_view"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:fadeScrollbars="false"
|
||||||
|
android:scrollbars="vertical"
|
||||||
|
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||||
|
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
|
||||||
|
|
||||||
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
|
@ -1,9 +1,27 @@
|
|||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
|
android:fitsSystemWindows="true">
|
||||||
|
|
||||||
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="?attr/colorSecondaryContainer"
|
||||||
|
android:fitsSystemWindows="true"
|
||||||
|
android:theme="@style/ThemeOverlay.AppCompat.ActionBar">
|
||||||
|
|
||||||
|
<com.google.android.material.appbar.MaterialToolbar
|
||||||
|
android:id="@+id/top_bar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:minHeight="?attr/actionBarSize"
|
||||||
|
app:title="@string/menu_settings" />
|
||||||
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
|
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||||
android:id="@+id/settings"
|
android:id="@+id/settings"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent" />
|
android:layout_height="match_parent" />
|
||||||
</LinearLayout>
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
@ -52,8 +52,10 @@
|
|||||||
|
|
||||||
|
|
||||||
<style name="BaseAppTheme" parent="Theme.Material3.Light">
|
<style name="BaseAppTheme" parent="Theme.Material3.Light">
|
||||||
<item name="android:navigationBarColor">?attr/colorSurface</item>
|
<item name="android:navigationBarColor">?attr/colorSurface</item>
|
||||||
<item name="android:statusBarColor">?attr/colorSecondaryContainer</item>
|
<item name="android:statusBarColor">
|
||||||
|
@android:color/transparent
|
||||||
|
</item>
|
||||||
<item name="android:windowLightNavigationBar" tools:targetApi="o_mr1">?attr/isLightTheme</item>
|
<item name="android:windowLightNavigationBar" tools:targetApi="o_mr1">?attr/isLightTheme</item>
|
||||||
<item name="android:windowDrawsSystemBarBackgrounds" tools:targetApi="o_mr1">true</item>
|
<item name="android:windowDrawsSystemBarBackgrounds" tools:targetApi="o_mr1">true</item>
|
||||||
<item name="android:windowLightStatusBar">?attr/isLightTheme</item>
|
<item name="android:windowLightStatusBar">?attr/isLightTheme</item>
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
<intent
|
<intent
|
||||||
android:action="android.intent.action.VIEW"
|
android:action="android.intent.action.VIEW"
|
||||||
android:targetPackage="org.pixeldroid.app"
|
android:targetPackage="org.pixeldroid.app"
|
||||||
android:targetClass="org.pixeldroid.app.postCreation.camera.CameraActivityShortcut" />
|
android:targetClass="org.pixeldroid.app.postCreation.camera.CameraActivity" />
|
||||||
<categories android:name="android.shortcut.conversation" />
|
<categories android:name="android.shortcut.conversation" />
|
||||||
<capability-binding android:key="actions.intent.CREATE_MESSAGE" />
|
<capability-binding android:key="actions.intent.CREATE_MESSAGE" />
|
||||||
</shortcut>
|
</shortcut>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user