Merge branch 'androidx' into 'master'
Androidx See merge request agosto182/p2play!12
This commit is contained in:
		| @@ -36,12 +36,12 @@ android { | |||||||
| dependencies { | dependencies { | ||||||
|     implementation fileTree(include: ['*.jar'], dir: 'libs') |     implementation fileTree(include: ['*.jar'], dir: 'libs') | ||||||
|     implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" |     implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" | ||||||
|     implementation 'com.android.support:appcompat-v7:28.0.0' |  | ||||||
|     implementation 'com.android.support.constraint:constraint-layout:2.0.4' |  | ||||||
|     implementation 'com.android.support:support-v4:28.0.0' |  | ||||||
|     implementation 'com.android.support:design:28.0.0' |  | ||||||
|     implementation 'com.squareup.picasso:picasso:2.71828' |     implementation 'com.squareup.picasso:picasso:2.71828' | ||||||
|  |     implementation 'androidx.appcompat:appcompat:1.0.2' | ||||||
|  |     implementation 'androidx.constraintlayout:constraintlayout:1.1.3' | ||||||
|  |     implementation 'androidx.legacy:legacy-support-v4:1.0.0' | ||||||
|  |     implementation 'com.google.android.material:material:1.4.0' | ||||||
|     testImplementation 'junit:junit:4.12' |     testImplementation 'junit:junit:4.12' | ||||||
|     androidTestImplementation 'com.android.support.test:runner:1.0.2' |     androidTestImplementation 'androidx.test:runner:1.5.2' | ||||||
|     androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' |     androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0' | ||||||
| } | } | ||||||
|   | |||||||
| @@ -1,24 +0,0 @@ | |||||||
| package org.libre.agosto.p2play |  | ||||||
|  |  | ||||||
| import android.support.test.InstrumentationRegistry |  | ||||||
| import android.support.test.runner.AndroidJUnit4 |  | ||||||
|  |  | ||||||
| import org.junit.Test |  | ||||||
| import org.junit.runner.RunWith |  | ||||||
|  |  | ||||||
| import org.junit.Assert.* |  | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * Instrumented test, which will execute on an Android device. |  | ||||||
|  * |  | ||||||
|  * See [testing documentation](http://d.android.com/tools/testing). |  | ||||||
|  */ |  | ||||||
| @RunWith(AndroidJUnit4::class) |  | ||||||
| class ExampleInstrumentedTest { |  | ||||||
|     @Test |  | ||||||
|     fun useAppContext() { |  | ||||||
|         // Context of the app under test. |  | ||||||
|         val appContext = InstrumentationRegistry.getTargetContext() |  | ||||||
|         assertEquals("org.libre.agosto.p2play", appContext.packageName) |  | ||||||
|     } |  | ||||||
| } |  | ||||||
| @@ -11,33 +11,36 @@ | |||||||
|         android:label="@string/app_name" |         android:label="@string/app_name" | ||||||
|         android:roundIcon="@mipmap/ic_launcher_round" |         android:roundIcon="@mipmap/ic_launcher_round" | ||||||
|         android:supportsRtl="true" |         android:supportsRtl="true" | ||||||
|         android:theme="@style/P2playTheme"> |         android:theme="@style/Theme.P2play"> | ||||||
|         <activity android:name=".ChannelActivity" |         <activity android:name=".ChannelActivity" | ||||||
|             android:theme="@style/P2playTheme.noBar" /> |             android:theme="@style/Theme.P2play.NoActionBar" /> | ||||||
|         <activity |         <activity | ||||||
|             android:name=".SplashActivity" |             android:name=".SplashActivity" | ||||||
|             android:theme="@style/Theme.AppCompat.Light.NoActionBar"> |             android:theme="@style/Theme.P2play.NoActionBar"> | ||||||
|             <intent-filter> |             <intent-filter> | ||||||
|                 <action android:name="android.intent.action.MAIN" /> |                 <action android:name="android.intent.action.MAIN" /> | ||||||
|  |  | ||||||
|                 <category android:name="android.intent.category.LAUNCHER" /> |                 <category android:name="android.intent.category.LAUNCHER" /> | ||||||
|             </intent-filter> |             </intent-filter> | ||||||
|         </activity> |         </activity> | ||||||
|         <activity android:name=".HostActivity" /> |         <activity | ||||||
|  |             android:name=".HostActivity" | ||||||
|  |             android:theme="@style/Theme.P2play.NoActionBar"/> | ||||||
|         <activity |         <activity | ||||||
|             android:name=".MainActivity" |             android:name=".MainActivity" | ||||||
|             android:theme="@style/P2playTheme.NoActionBar" /> |             android:theme="@style/Theme.P2play.NoActionBar" /> | ||||||
|         <activity |         <activity | ||||||
|             android:name=".ReproductorActivity" |             android:name=".ReproductorActivity" | ||||||
|             android:configChanges="orientation|screenSize" |             android:configChanges="orientation|screenSize" | ||||||
|             android:hardwareAccelerated="true" |             android:hardwareAccelerated="true" | ||||||
|             android:theme="@style/P2playTheme.noBar" /> |             android:theme="@style/Theme.P2play.NoActionBar" /> | ||||||
|         <activity android:name=".LoginActivity" /> |         <activity android:name=".LoginActivity" /> | ||||||
|         <activity android:name=".RegisterActivity" /> |         <activity android:name=".RegisterActivity" /> | ||||||
|         <activity android:name=".AboutActivity" /> |         <activity android:name=".AboutActivity" /> | ||||||
|         <activity |         <activity | ||||||
|             android:name=".SettingsActivity" |             android:name=".SettingsActivity" | ||||||
|             android:label="@string/title_activity_settings" /> |             android:label="@string/title_activity_settings" | ||||||
|  |             android:theme="@style/Theme.P2play"/> | ||||||
|     </application> |     </application> | ||||||
|  |  | ||||||
| </manifest> | </manifest> | ||||||
| @@ -1,8 +1,8 @@ | |||||||
| package org.libre.agosto.p2play | package org.libre.agosto.p2play | ||||||
|  |  | ||||||
| import android.support.v7.app.AppCompatActivity |  | ||||||
| import android.os.Bundle | import android.os.Bundle | ||||||
| import android.text.method.LinkMovementMethod | import androidx.appcompat.app.AppCompatActivity | ||||||
| import kotlinx.android.synthetic.main.activity_about.* | import kotlinx.android.synthetic.main.activity_about.* | ||||||
|  |  | ||||||
| class AboutActivity : AppCompatActivity() { | class AboutActivity : AppCompatActivity() { | ||||||
|   | |||||||
| @@ -1,15 +1,15 @@ | |||||||
| package org.libre.agosto.p2play | package org.libre.agosto.p2play | ||||||
|  |  | ||||||
|  | import androidx.appcompat.app.ActionBar | ||||||
| import android.content.res.Configuration | import android.content.res.Configuration | ||||||
| import android.os.Bundle | import android.os.Bundle | ||||||
| import android.preference.PreferenceActivity | import android.preference.PreferenceActivity | ||||||
| import android.support.annotation.LayoutRes |  | ||||||
| import android.support.v7.app.ActionBar |  | ||||||
| import android.support.v7.app.AppCompatDelegate |  | ||||||
| import android.support.v7.widget.Toolbar |  | ||||||
| import android.view.MenuInflater | import android.view.MenuInflater | ||||||
| import android.view.View | import android.view.View | ||||||
| import android.view.ViewGroup | import android.view.ViewGroup | ||||||
|  | import androidx.annotation.LayoutRes | ||||||
|  | import androidx.appcompat.app.AppCompatDelegate | ||||||
|  | import androidx.appcompat.widget.Toolbar | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * A [android.preference.PreferenceActivity] which implements and proxies the necessary calls |  * A [android.preference.PreferenceActivity] which implements and proxies the necessary calls | ||||||
|   | |||||||
| @@ -1,10 +1,10 @@ | |||||||
| package org.libre.agosto.p2play | package org.libre.agosto.p2play | ||||||
|  |  | ||||||
| import android.os.AsyncTask | import android.os.AsyncTask | ||||||
| import android.support.v7.app.AppCompatActivity | import androidx.appcompat.app.AppCompatActivity | ||||||
| import android.os.Bundle | import android.os.Bundle | ||||||
| import android.support.v7.widget.LinearLayoutManager | import androidx.recyclerview.widget.LinearLayoutManager | ||||||
| import android.support.v7.widget.RecyclerView | import androidx.recyclerview.widget.RecyclerView | ||||||
| import android.view.View | import android.view.View | ||||||
| import com.squareup.picasso.Picasso | import com.squareup.picasso.Picasso | ||||||
| import kotlinx.android.synthetic.main.activity_channel.* | import kotlinx.android.synthetic.main.activity_channel.* | ||||||
|   | |||||||
| @@ -3,14 +3,12 @@ package org.libre.agosto.p2play | |||||||
| import android.content.Intent | import android.content.Intent | ||||||
| import android.content.SharedPreferences | import android.content.SharedPreferences | ||||||
| import android.os.AsyncTask | import android.os.AsyncTask | ||||||
| import android.support.v7.app.AppCompatActivity | import androidx.appcompat.app.AppCompatActivity | ||||||
| import android.os.Bundle | import android.os.Bundle | ||||||
| import android.os.Looper | import android.os.Looper | ||||||
| import android.preference.PreferenceManager | import android.preference.PreferenceManager | ||||||
| import android.util.Log |  | ||||||
| import kotlinx.android.synthetic.main.activity_host.* | import kotlinx.android.synthetic.main.activity_host.* | ||||||
| import org.libre.agosto.p2play.ajax.Auth | import org.libre.agosto.p2play.ajax.Auth | ||||||
| import org.libre.agosto.p2play.ajax.Client |  | ||||||
|  |  | ||||||
| class HostActivity : AppCompatActivity() { | class HostActivity : AppCompatActivity() { | ||||||
|     lateinit var settings: SharedPreferences |     lateinit var settings: SharedPreferences | ||||||
|   | |||||||
| @@ -3,11 +3,10 @@ package org.libre.agosto.p2play | |||||||
| import android.content.Intent | import android.content.Intent | ||||||
| import android.content.SharedPreferences | import android.content.SharedPreferences | ||||||
| import android.os.AsyncTask | import android.os.AsyncTask | ||||||
| import android.support.v7.app.AppCompatActivity | import androidx.appcompat.app.AppCompatActivity | ||||||
| import android.os.Bundle | import android.os.Bundle | ||||||
| import android.os.Looper | import android.os.Looper | ||||||
| import android.preference.PreferenceManager | import android.preference.PreferenceManager | ||||||
| import android.util.Log |  | ||||||
| import kotlinx.android.synthetic.main.activity_login.* | import kotlinx.android.synthetic.main.activity_login.* | ||||||
| import org.libre.agosto.p2play.ajax.Auth | import org.libre.agosto.p2play.ajax.Auth | ||||||
|  |  | ||||||
|   | |||||||
| @@ -2,24 +2,25 @@ package org.libre.agosto.p2play | |||||||
|  |  | ||||||
| import android.content.Intent | import android.content.Intent | ||||||
| import android.os.AsyncTask | import android.os.AsyncTask | ||||||
|  | import android.os.Build | ||||||
| import android.os.Bundle | import android.os.Bundle | ||||||
| import android.os.Handler | import android.os.Handler | ||||||
| import android.support.design.widget.Snackbar |  | ||||||
| import android.support.design.widget.NavigationView |  | ||||||
| import android.support.v4.view.GravityCompat |  | ||||||
| import android.support.v7.app.ActionBarDrawerToggle |  | ||||||
| import android.support.v7.app.AppCompatActivity |  | ||||||
| import android.support.v7.widget.LinearLayoutManager |  | ||||||
| import android.support.v7.widget.RecyclerView |  | ||||||
| import android.view.Menu | import android.view.Menu | ||||||
| import android.view.MenuInflater |  | ||||||
| import android.view.MenuItem | import android.view.MenuItem | ||||||
| import android.widget.ImageView | import android.view.WindowManager | ||||||
| import android.widget.SearchView |  | ||||||
|  | import androidx.appcompat.app.ActionBarDrawerToggle | ||||||
|  | import androidx.appcompat.app.AppCompatActivity | ||||||
|  | import androidx.appcompat.widget.SearchView | ||||||
|  | import androidx.core.view.GravityCompat | ||||||
|  | import androidx.recyclerview.widget.LinearLayoutManager | ||||||
|  | import androidx.recyclerview.widget.RecyclerView | ||||||
|  | import com.google.android.material.navigation.NavigationView | ||||||
| import com.squareup.picasso.Picasso | import com.squareup.picasso.Picasso | ||||||
| import kotlinx.android.synthetic.main.activity_main.* | import kotlinx.android.synthetic.main.activity_main.drawer_layout | ||||||
| import kotlinx.android.synthetic.main.app_bar_main.* | import kotlinx.android.synthetic.main.activity_main.nav_view | ||||||
| import kotlinx.android.synthetic.main.content_main.* | import kotlinx.android.synthetic.main.app_bar_main.toolbar | ||||||
|  | import kotlinx.android.synthetic.main.content_main.swipeContainer | ||||||
| import kotlinx.android.synthetic.main.nav_header_main.* | import kotlinx.android.synthetic.main.nav_header_main.* | ||||||
| import org.libre.agosto.p2play.adapters.VideosAdapter | import org.libre.agosto.p2play.adapters.VideosAdapter | ||||||
| import org.libre.agosto.p2play.ajax.Videos | import org.libre.agosto.p2play.ajax.Videos | ||||||
| @@ -49,6 +50,8 @@ class MainActivity : AppCompatActivity(), NavigationView.OnNavigationItemSelecte | |||||||
|                     .setAction("Action", null).show() |                     .setAction("Action", null).show() | ||||||
|         } */ |         } */ | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|         val toggle = ActionBarDrawerToggle(this, drawer_layout, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close) |         val toggle = ActionBarDrawerToggle(this, drawer_layout, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close) | ||||||
|         drawer_layout.addDrawerListener(toggle) |         drawer_layout.addDrawerListener(toggle) | ||||||
|         toggle.syncState() |         toggle.syncState() | ||||||
| @@ -101,7 +104,7 @@ class MainActivity : AppCompatActivity(), NavigationView.OnNavigationItemSelecte | |||||||
|                 } |                 } | ||||||
|             }) |             }) | ||||||
|         } |         } | ||||||
|         // swipeContainer.isRefreshing = false |         swipeContainer.isRefreshing = false | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     private fun addVideos(videos: ArrayList<VideoModel>){ |     private fun addVideos(videos: ArrayList<VideoModel>){ | ||||||
| @@ -251,10 +254,10 @@ class MainActivity : AppCompatActivity(), NavigationView.OnNavigationItemSelecte | |||||||
|  |  | ||||||
|     override fun onBackPressed() { |     override fun onBackPressed() { | ||||||
|         if (drawer_layout.isDrawerOpen(GravityCompat.START)) { |         if (drawer_layout.isDrawerOpen(GravityCompat.START)) { | ||||||
|             drawer_layout.closeDrawer(GravityCompat.START) |           drawer_layout.closeDrawer(GravityCompat.START) | ||||||
|         } |         } | ||||||
|         else if(!section.equals("trending")) { |         else if(!section.equals("trending")) { | ||||||
|             this.getTrengindVideos() |            this.getTrengindVideos() | ||||||
|         } |         } | ||||||
|         else { |         else { | ||||||
|             super.onBackPressed() |             super.onBackPressed() | ||||||
| @@ -363,11 +366,11 @@ class MainActivity : AppCompatActivity(), NavigationView.OnNavigationItemSelecte | |||||||
|             if(ManagerSingleton.user.avatar!="" && side_imageView != null) { |             if(ManagerSingleton.user.avatar!="" && side_imageView != null) { | ||||||
|                 Picasso.get().load("https://" + ManagerSingleton.url + ManagerSingleton.user.avatar).into(side_imageView) |                 Picasso.get().load("https://" + ManagerSingleton.url + ManagerSingleton.user.avatar).into(side_imageView) | ||||||
|             } |             } | ||||||
| //            side_imageView?.setOnClickListener { |            side_imageView?.setOnClickListener { | ||||||
| //                pagination = 0 |                pagination = 0 | ||||||
| //                getMyVideos() |                 getMyVideos() | ||||||
| //                drawer_layout.closeDrawer(GravityCompat.START) |             drawer_layout.closeDrawer(GravityCompat.START) | ||||||
| //            } |            } | ||||||
|             if(::myMenu.isInitialized){ |             if(::myMenu.isInitialized){ | ||||||
|                 myMenu.findItem(R.id.action_login).isVisible = false |                 myMenu.findItem(R.id.action_login).isVisible = false | ||||||
|                 myMenu.findItem(R.id.action_logout).isVisible = true |                 myMenu.findItem(R.id.action_logout).isVisible = true | ||||||
| @@ -381,7 +384,7 @@ class MainActivity : AppCompatActivity(), NavigationView.OnNavigationItemSelecte | |||||||
|             myMenu.findItem(R.id.action_login).isVisible = true |             myMenu.findItem(R.id.action_login).isVisible = true | ||||||
|             myMenu.findItem(R.id.action_logout).isVisible = false |             myMenu.findItem(R.id.action_logout).isVisible = false | ||||||
|         } |         } | ||||||
|         nav_view.menu.findItem(R.id.ml).isVisible = false |         //nav_view.menu.findItem(R.id.ml).isVisible = false | ||||||
|         side_usernameTxt?.text = getString(R.string.nav_header_title) |         side_usernameTxt?.text = getString(R.string.nav_header_title) | ||||||
|         side_emailTxt?.text = getString(R.string.nav_header_subtitle) + " " + this.packageManager.getPackageInfo(this.packageName, 0).versionName |         side_emailTxt?.text = getString(R.string.nav_header_subtitle) + " " + this.packageManager.getPackageInfo(this.packageName, 0).versionName | ||||||
|         side_imageView?.setImageResource(R.drawable.default_avatar) |         side_imageView?.setImageResource(R.drawable.default_avatar) | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ package org.libre.agosto.p2play | |||||||
|  |  | ||||||
| import android.content.SharedPreferences | import android.content.SharedPreferences | ||||||
| import android.os.AsyncTask | import android.os.AsyncTask | ||||||
| import android.support.v7.app.AppCompatActivity | import androidx.appcompat.app.AppCompatActivity | ||||||
| import android.os.Bundle | import android.os.Bundle | ||||||
| import android.os.Looper | import android.os.Looper | ||||||
| import android.preference.PreferenceManager | import android.preference.PreferenceManager | ||||||
|   | |||||||
| @@ -8,19 +8,18 @@ import android.content.pm.ActivityInfo | |||||||
| import android.graphics.Bitmap | import android.graphics.Bitmap | ||||||
| import android.graphics.BitmapFactory | import android.graphics.BitmapFactory | ||||||
| import android.os.AsyncTask | import android.os.AsyncTask | ||||||
| import android.support.v7.app.AppCompatActivity |  | ||||||
| import android.os.Bundle | import android.os.Bundle | ||||||
| import android.os.Looper | import android.os.Looper | ||||||
| import android.support.v4.content.ContextCompat | import androidx.appcompat.app.AlertDialog | ||||||
| import android.support.v7.app.AlertDialog |  | ||||||
| import android.support.v7.widget.LinearLayoutManager |  | ||||||
| import android.support.v7.widget.RecyclerView |  | ||||||
| import android.util.Log |  | ||||||
| import android.view.View | import android.view.View | ||||||
| import android.view.WindowManager | import android.view.WindowManager | ||||||
| import android.webkit.WebChromeClient | import android.webkit.WebChromeClient | ||||||
| import android.widget.EditText | import android.widget.EditText | ||||||
| import android.widget.FrameLayout | import android.widget.FrameLayout | ||||||
|  | import androidx.appcompat.app.AppCompatActivity | ||||||
|  | import androidx.core.content.ContextCompat | ||||||
|  | import androidx.recyclerview.widget.LinearLayoutManager | ||||||
|  | import androidx.recyclerview.widget.RecyclerView | ||||||
| import com.squareup.picasso.Picasso | import com.squareup.picasso.Picasso | ||||||
| import kotlinx.android.synthetic.main.activity_reproductor.* | import kotlinx.android.synthetic.main.activity_reproductor.* | ||||||
| import org.libre.agosto.p2play.adapters.CommentariesAdapter | import org.libre.agosto.p2play.adapters.CommentariesAdapter | ||||||
| @@ -233,7 +232,7 @@ class ReproductorActivity : AppCompatActivity() { | |||||||
|             runOnUiThread { |             runOnUiThread { | ||||||
|                 if (res) { |                 if (res) { | ||||||
|                     ManagerSingleton.Toast(getString(R.string.makedCommentaryMsg), this) |                     ManagerSingleton.Toast(getString(R.string.makedCommentaryMsg), this) | ||||||
|                     commentaryText.text.clear() |                     commentaryText.text?.clear() | ||||||
|                     this.getComments() |                     this.getComments() | ||||||
|                 } else { |                 } else { | ||||||
|                     ManagerSingleton.Toast(getString(R.string.errorCommentaryMsg), this) |                     ManagerSingleton.Toast(getString(R.string.errorCommentaryMsg), this) | ||||||
|   | |||||||
| @@ -3,7 +3,7 @@ package org.libre.agosto.p2play | |||||||
| import android.content.Intent | import android.content.Intent | ||||||
| import android.content.SharedPreferences | import android.content.SharedPreferences | ||||||
| import android.os.AsyncTask | import android.os.AsyncTask | ||||||
| import android.support.v7.app.AppCompatActivity | import androidx.appcompat.app.AppCompatActivity | ||||||
| import android.os.Bundle | import android.os.Bundle | ||||||
| import android.os.Handler | import android.os.Handler | ||||||
| import android.os.Looper | import android.os.Looper | ||||||
|   | |||||||
| @@ -1,25 +1,16 @@ | |||||||
| package org.libre.agosto.p2play.adapters | package org.libre.agosto.p2play.adapters | ||||||
|  |  | ||||||
| import android.app.Activity |  | ||||||
| import android.content.Context | import android.content.Context | ||||||
| import android.content.Intent | import androidx.recyclerview.widget.RecyclerView | ||||||
| import android.graphics.drawable.Drawable |  | ||||||
| import android.os.AsyncTask |  | ||||||
| import android.support.v7.widget.RecyclerView |  | ||||||
| import android.text.Html | import android.text.Html | ||||||
| import android.view.LayoutInflater | import android.view.LayoutInflater | ||||||
| import android.view.View | import android.view.View | ||||||
| import android.view.ViewGroup | import android.view.ViewGroup | ||||||
| import android.widget.ImageView | import android.widget.ImageView | ||||||
| import android.widget.LinearLayout |  | ||||||
| import android.widget.TextView | import android.widget.TextView | ||||||
| import com.squareup.picasso.Picasso | import com.squareup.picasso.Picasso | ||||||
| import org.libre.agosto.p2play.* | import org.libre.agosto.p2play.* | ||||||
| import org.libre.agosto.p2play.models.CommentaryModel | import org.libre.agosto.p2play.models.CommentaryModel | ||||||
| import org.libre.agosto.p2play.models.VideoModel |  | ||||||
| import java.io.InputStream |  | ||||||
| import java.io.Serializable |  | ||||||
| import java.net.URL |  | ||||||
|  |  | ||||||
| @Suppress("DEPRECATION") | @Suppress("DEPRECATION") | ||||||
| class CommentariesAdapter(private val myDataset: ArrayList<CommentaryModel>) : | class CommentariesAdapter(private val myDataset: ArrayList<CommentaryModel>) : | ||||||
|   | |||||||
| @@ -1,24 +1,17 @@ | |||||||
| package org.libre.agosto.p2play.adapters | package org.libre.agosto.p2play.adapters | ||||||
|  |  | ||||||
| import android.app.Activity |  | ||||||
| import android.content.Context | import android.content.Context | ||||||
| import android.content.Intent | import android.content.Intent | ||||||
| import android.graphics.drawable.Drawable | import androidx.recyclerview.widget.RecyclerView | ||||||
| import android.os.AsyncTask |  | ||||||
| import android.support.v7.widget.RecyclerView |  | ||||||
| import android.view.LayoutInflater | import android.view.LayoutInflater | ||||||
| import android.view.View | import android.view.View | ||||||
| import android.view.ViewGroup | import android.view.ViewGroup | ||||||
| import android.widget.ImageView | import android.widget.ImageView | ||||||
| import android.widget.LinearLayout |  | ||||||
| import android.widget.TextView | import android.widget.TextView | ||||||
| import com.squareup.picasso.Picasso | import com.squareup.picasso.Picasso | ||||||
| import org.libre.agosto.p2play.* | import org.libre.agosto.p2play.* | ||||||
| import org.libre.agosto.p2play.models.VideoModel | import org.libre.agosto.p2play.models.VideoModel | ||||||
| import java.io.InputStream |  | ||||||
| import java.io.Serializable | import java.io.Serializable | ||||||
| import java.net.URL |  | ||||||
| import java.util.concurrent.TimeUnit |  | ||||||
|  |  | ||||||
| class VideosAdapter(private val myDataset: ArrayList<VideoModel>) : | class VideosAdapter(private val myDataset: ArrayList<VideoModel>) : | ||||||
|         RecyclerView.Adapter<VideosAdapter.ViewHolder>() { |         RecyclerView.Adapter<VideosAdapter.ViewHolder>() { | ||||||
| @@ -46,8 +39,7 @@ class VideosAdapter(private val myDataset: ArrayList<VideoModel>) : | |||||||
|     } |     } | ||||||
|  |  | ||||||
|     // Create new views (invoked by the layout manager) |     // Create new views (invoked by the layout manager) | ||||||
|     override fun onCreateViewHolder(parent: ViewGroup, |     override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder { | ||||||
|                                     viewType: Int): VideosAdapter.ViewHolder { |  | ||||||
|         // create a new view |         // create a new view | ||||||
|         val view = LayoutInflater.from(parent.context) |         val view = LayoutInflater.from(parent.context) | ||||||
|                 .inflate(R.layout.view_video, parent, false) as View |                 .inflate(R.layout.view_video, parent, false) as View | ||||||
|   | |||||||
| @@ -1,5 +1,5 @@ | |||||||
| <?xml version="1.0" encoding="utf-8"?> | <?xml version="1.0" encoding="utf-8"?> | ||||||
| <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | <androidx.constraintlayout.widget.ConstraintLayout 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" | ||||||
| @@ -29,7 +29,7 @@ | |||||||
|                 android:contentDescription="Logo" |                 android:contentDescription="Logo" | ||||||
|                 app:srcCompat="@mipmap/ic_launcher" /> |                 app:srcCompat="@mipmap/ic_launcher" /> | ||||||
|  |  | ||||||
|             <Space |             <androidx.legacy.widget.Space | ||||||
|                 android:layout_width="match_parent" |                 android:layout_width="match_parent" | ||||||
|                 android:layout_height="30dp" /> |                 android:layout_height="30dp" /> | ||||||
|  |  | ||||||
| @@ -39,11 +39,10 @@ | |||||||
|                 android:layout_height="wrap_content" |                 android:layout_height="wrap_content" | ||||||
|                 android:text="@string/aboutLabel" |                 android:text="@string/aboutLabel" | ||||||
|                 android:textAlignment="center" |                 android:textAlignment="center" | ||||||
|                 android:textAppearance="@android:style/TextAppearance.Material.Medium.Inverse" |                 android:textAppearance="@android:style/TextAppearance.Material.Medium" | ||||||
|                 android:textColor="@android:color/black" |  | ||||||
|                 android:textStyle="bold" /> |                 android:textStyle="bold" /> | ||||||
|  |  | ||||||
|             <Space |             <androidx.legacy.widget.Space | ||||||
|                 android:layout_width="match_parent" |                 android:layout_width="match_parent" | ||||||
|                 android:layout_height="30dp" /> |                 android:layout_height="30dp" /> | ||||||
|  |  | ||||||
| @@ -55,7 +54,7 @@ | |||||||
|                 android:textAlignment="textStart" |                 android:textAlignment="textStart" | ||||||
|                 android:textSize="16sp" /> |                 android:textSize="16sp" /> | ||||||
|  |  | ||||||
|             <TextView |             <com.google.android.material.textview.MaterialTextView | ||||||
|                 android:id="@+id/gitlabUrl" |                 android:id="@+id/gitlabUrl" | ||||||
|                 android:layout_width="match_parent" |                 android:layout_width="match_parent" | ||||||
|                 android:layout_height="wrap_content" |                 android:layout_height="wrap_content" | ||||||
| @@ -66,7 +65,7 @@ | |||||||
|                 android:textSize="16sp" |                 android:textSize="16sp" | ||||||
|                 android:textStyle="bold" /> |                 android:textStyle="bold" /> | ||||||
|  |  | ||||||
|             <Space |             <androidx.legacy.widget.Space | ||||||
|                 android:layout_width="match_parent" |                 android:layout_width="match_parent" | ||||||
|                 android:layout_height="20dp" /> |                 android:layout_height="20dp" /> | ||||||
|  |  | ||||||
| @@ -88,7 +87,7 @@ | |||||||
|                 android:textSize="16sp" |                 android:textSize="16sp" | ||||||
|                 android:textStyle="bold" /> |                 android:textStyle="bold" /> | ||||||
|  |  | ||||||
|             <Space |             <androidx.legacy.widget.Space | ||||||
|                 android:layout_width="match_parent" |                 android:layout_width="match_parent" | ||||||
|                 android:layout_height="30dp" /> |                 android:layout_height="30dp" /> | ||||||
|  |  | ||||||
| @@ -98,11 +97,10 @@ | |||||||
|                 android:layout_height="wrap_content" |                 android:layout_height="wrap_content" | ||||||
|                 android:text="@string/aboutInstance" |                 android:text="@string/aboutInstance" | ||||||
|                 android:textAlignment="center" |                 android:textAlignment="center" | ||||||
|                 android:textAppearance="@android:style/TextAppearance.Material.Medium.Inverse" |                 android:textAppearance="@android:style/TextAppearance.Material.Medium" | ||||||
|                 android:textColor="@android:color/black" |  | ||||||
|                 android:textStyle="bold" /> |                 android:textStyle="bold" /> | ||||||
|  |  | ||||||
|             <Space |             <androidx.legacy.widget.Space | ||||||
|                 android:layout_width="match_parent" |                 android:layout_width="match_parent" | ||||||
|                 android:layout_height="20dp" /> |                 android:layout_height="20dp" /> | ||||||
|  |  | ||||||
| @@ -124,7 +122,7 @@ | |||||||
|                 android:textSize="16sp" |                 android:textSize="16sp" | ||||||
|                 android:textStyle="bold" /> |                 android:textStyle="bold" /> | ||||||
|  |  | ||||||
|             <Space |             <androidx.legacy.widget.Space | ||||||
|                 android:layout_width="match_parent" |                 android:layout_width="match_parent" | ||||||
|                 android:layout_height="30dp" /> |                 android:layout_height="30dp" /> | ||||||
|  |  | ||||||
| @@ -135,7 +133,11 @@ | |||||||
|                 android:text="@string/aboutLicense" |                 android:text="@string/aboutLicense" | ||||||
|                 android:textAlignment="textStart" |                 android:textAlignment="textStart" | ||||||
|                 android:textSize="16sp" /> |                 android:textSize="16sp" /> | ||||||
|  |  | ||||||
|  |             <androidx.legacy.widget.Space | ||||||
|  |                 android:layout_width="match_parent" | ||||||
|  |                 android:layout_height="wrap_content" /> | ||||||
|         </LinearLayout> |         </LinearLayout> | ||||||
|     </ScrollView> |     </ScrollView> | ||||||
|  |  | ||||||
| </android.support.constraint.ConstraintLayout> | </androidx.constraintlayout.widget.ConstraintLayout> | ||||||
| @@ -1,5 +1,5 @@ | |||||||
| <?xml version="1.0" encoding="utf-8"?> | <?xml version="1.0" encoding="utf-8"?> | ||||||
| <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | <androidx.constraintlayout.widget.ConstraintLayout 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" | ||||||
| @@ -141,14 +141,13 @@ | |||||||
|                     tools:layout_editor_absoluteY="214dp" /> |                     tools:layout_editor_absoluteY="214dp" /> | ||||||
|             </FrameLayout> |             </FrameLayout> | ||||||
|  |  | ||||||
|             <android.support.v7.widget.RecyclerView |             <androidx.recyclerview.widget.RecyclerView | ||||||
|                 android:id="@+id/listVideosChannel" |                 android:id="@+id/listVideosChannel" | ||||||
|                 android:layout_width="match_parent" |                 android:layout_width="match_parent" | ||||||
|                 android:layout_height="wrap_content" |                 android:layout_height="wrap_content" /> | ||||||
|                 android:scrollbars="none" /> |  | ||||||
|  |  | ||||||
|         </LinearLayout> |         </LinearLayout> | ||||||
|     </ScrollView> |     </ScrollView> | ||||||
|  |  | ||||||
|  |  | ||||||
| </android.support.constraint.ConstraintLayout> | </androidx.constraintlayout.widget.ConstraintLayout> | ||||||
| @@ -1,5 +1,5 @@ | |||||||
| <?xml version="1.0" encoding="utf-8"?> | <?xml version="1.0" encoding="utf-8"?> | ||||||
| <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | <androidx.constraintlayout.widget.ConstraintLayout 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" | ||||||
| @@ -29,38 +29,46 @@ | |||||||
|                 android:contentDescription="Logo" |                 android:contentDescription="Logo" | ||||||
|                 app:srcCompat="@drawable/icon" /> |                 app:srcCompat="@drawable/icon" /> | ||||||
|  |  | ||||||
|             <Space |             <androidx.legacy.widget.Space | ||||||
|                 android:layout_width="match_parent" |                 android:layout_width="match_parent" | ||||||
|                 android:layout_height="30dp" /> |                 android:layout_height="30dp" /> | ||||||
|  |  | ||||||
|             <TextView |             <androidx.appcompat.widget.AppCompatTextView | ||||||
|                 android:id="@+id/hostInfoText" |                 android:id="@+id/hostInfoText" | ||||||
|                 android:layout_width="match_parent" |                 android:layout_width="match_parent" | ||||||
|                 android:layout_height="wrap_content" |                 android:layout_height="wrap_content" | ||||||
|                 android:text="@string/hostInfoText" |                 android:text="@string/hostInfoText" | ||||||
|                 android:textAlignment="center" |                 android:textAlignment="center" | ||||||
|                 android:textAppearance="@android:style/TextAppearance.Material.Medium.Inverse" |                 /> | ||||||
|                 android:textColor="@android:color/black" /> |  | ||||||
|  |  | ||||||
|             <Space |             <androidx.legacy.widget.Space | ||||||
|                 android:layout_width="match_parent" |                 android:layout_width="match_parent" | ||||||
|                 android:layout_height="30dp" /> |                 android:layout_height="30dp" /> | ||||||
|  |  | ||||||
|             <EditText |             <com.google.android.material.textfield.TextInputLayout | ||||||
|                 android:id="@+id/hostText" |  | ||||||
|                 android:layout_width="match_parent" |                 android:layout_width="match_parent" | ||||||
|                 android:layout_height="wrap_content" |                 android:layout_height="wrap_content" | ||||||
|                 android:ems="10" |                 android:layout_margin="4dp" | ||||||
|                 android:hint="@string/hostText" |                 android:hint="@string/instance" | ||||||
|                 android:inputType="text" /> |                 app:expandedHintEnabled="false"> | ||||||
|  |  | ||||||
|             <Button |                 <com.google.android.material.textfield.TextInputEditText | ||||||
|  |                     android:id="@+id/hostText" | ||||||
|  |                     android:layout_width="match_parent" | ||||||
|  |                     android:layout_height="wrap_content" | ||||||
|  |                     android:ems="10" | ||||||
|  |                     android:hint="@string/hostText" | ||||||
|  |                     android:inputType="text" /> | ||||||
|  |  | ||||||
|  |             </com.google.android.material.textfield.TextInputLayout> | ||||||
|  |  | ||||||
|  |  | ||||||
|  |             <com.google.android.material.button.MaterialButton | ||||||
|                 android:id="@+id/button" |                 android:id="@+id/button" | ||||||
|                 style="@style/Widget.AppCompat.Button.Colored" |  | ||||||
|                 android:layout_width="match_parent" |                 android:layout_width="match_parent" | ||||||
|                 android:layout_height="wrap_content" |                 android:layout_height="wrap_content" | ||||||
|                 android:text="@string/okButton" /> |                 android:text="@string/okButton" /> | ||||||
|  |  | ||||||
|         </LinearLayout> |         </LinearLayout> | ||||||
|     </FrameLayout> |     </FrameLayout> | ||||||
| </android.support.constraint.ConstraintLayout> | </androidx.constraintlayout.widget.ConstraintLayout> | ||||||
|   | |||||||
| @@ -1,5 +1,5 @@ | |||||||
| <?xml version="1.0" encoding="utf-8"?> | <?xml version="1.0" encoding="utf-8"?> | ||||||
| <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | <androidx.constraintlayout.widget.ConstraintLayout 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" | ||||||
| @@ -29,7 +29,7 @@ | |||||||
|                 android:contentDescription="Logo" |                 android:contentDescription="Logo" | ||||||
|                 app:srcCompat="@drawable/icon" /> |                 app:srcCompat="@drawable/icon" /> | ||||||
|  |  | ||||||
|             <Space |             <androidx.legacy.widget.Space | ||||||
|                 android:layout_width="match_parent" |                 android:layout_width="match_parent" | ||||||
|                 android:layout_height="30dp" /> |                 android:layout_height="30dp" /> | ||||||
|  |  | ||||||
| @@ -39,62 +39,64 @@ | |||||||
|                 android:layout_height="wrap_content" |                 android:layout_height="wrap_content" | ||||||
|                 android:text="@string/loginInfo" |                 android:text="@string/loginInfo" | ||||||
|                 android:textAlignment="center" |                 android:textAlignment="center" | ||||||
|                 android:textAppearance="@android:style/TextAppearance.Material.Medium.Inverse" |                 android:textAppearance="@android:style/TextAppearance.DeviceDefault.Medium"/> | ||||||
|                 android:textColor="@android:color/black" /> |  | ||||||
|  |  | ||||||
|             <Space |             <androidx.legacy.widget.Space | ||||||
|                 android:layout_width="match_parent" |                 android:layout_width="match_parent" | ||||||
|                 android:layout_height="30dp" /> |                 android:layout_height="30dp" /> | ||||||
|  |  | ||||||
|             <TextView |             <com.google.android.material.textfield.TextInputLayout | ||||||
|                 android:id="@+id/userTxt" |                 android:id="@+id/userTxt" | ||||||
|                 android:layout_width="match_parent" |                 android:layout_width="match_parent" | ||||||
|                 android:layout_height="wrap_content" |                 android:layout_height="wrap_content" | ||||||
|                 android:text="@string/userTxt" /> |                 android:layout_margin="4dp" | ||||||
|  |                 android:hint="@string/userTxt"> | ||||||
|  |  | ||||||
|             <EditText |                 <com.google.android.material.textfield.TextInputEditText | ||||||
|                 android:id="@+id/userText" |                     android:id="@+id/userText" | ||||||
|                 android:layout_width="match_parent" |                     android:layout_width="match_parent" | ||||||
|                 android:layout_height="wrap_content" |                     android:layout_height="wrap_content" | ||||||
|                 android:ems="10" |                     android:ems="10" | ||||||
|                 android:hint="@string/userText" |                     android:hint="@string/userText" | ||||||
|                 android:inputType="text" /> |                     android:inputType="text" /> | ||||||
|  |             </com.google.android.material.textfield.TextInputLayout> | ||||||
|  |  | ||||||
|             <TextView |             <com.google.android.material.textfield.TextInputLayout | ||||||
|                 android:id="@+id/passwordTxt" |                 android:id="@+id/passwordTxt" | ||||||
|                 android:layout_width="match_parent" |                 android:layout_width="match_parent" | ||||||
|                 android:layout_height="wrap_content" |                 android:layout_height="wrap_content" | ||||||
|                 android:text="@string/passwordTxt" /> |                 android:layout_margin="4dp" | ||||||
|  |                 app:endIconMode="password_toggle" | ||||||
|  |                 android:hint="@string/passwordTxt" > | ||||||
|  |  | ||||||
|             <EditText |                 <EditText | ||||||
|                 android:id="@+id/passwordText" |                     android:id="@+id/passwordText" | ||||||
|                 android:layout_width="match_parent" |                     android:layout_width="match_parent" | ||||||
|                 android:layout_height="wrap_content" |                     android:layout_height="wrap_content" | ||||||
|                 android:ems="10" |                     android:ems="10" | ||||||
|                 android:hint="@string/passwordText" |                     android:inputType="textPassword"/> | ||||||
|                 android:inputType="text|textPassword" /> |             </com.google.android.material.textfield.TextInputLayout> | ||||||
|  |  | ||||||
|             <Button |             <com.google.android.material.button.MaterialButton | ||||||
|                 android:id="@+id/loginBtn" |                 android:id="@+id/loginBtn" | ||||||
|                 style="@style/Widget.AppCompat.Button.Colored" |  | ||||||
|                 android:layout_width="match_parent" |                 android:layout_width="match_parent" | ||||||
|                 android:layout_height="wrap_content" |                 android:layout_height="wrap_content" | ||||||
|                 android:text="@string/loginBtn" |                 android:text="@string/loginBtn" | ||||||
|                 android:textAlignment="center" /> |                 android:textAlignment="center" /> | ||||||
|  |  | ||||||
|             <Space |             <androidx.legacy.widget.Space | ||||||
|                 android:layout_width="match_parent" |                 android:layout_width="match_parent" | ||||||
|                 android:layout_height="30dp" /> |                 android:layout_height="30dp" /> | ||||||
|  |  | ||||||
|             <Button |             <com.google.android.material.button.MaterialButton | ||||||
|                 android:id="@+id/registerActionBtn" |                 android:id="@+id/registerActionBtn" | ||||||
|                 style="@style/Widget.AppCompat.Button.Borderless" |                 style="@style/Widget.MaterialComponents.Button.TextButton" | ||||||
|                 android:layout_width="match_parent" |                 android:layout_width="match_parent" | ||||||
|                 android:layout_height="wrap_content" |                 android:layout_height="wrap_content" | ||||||
|                 android:text="@string/registerActionBtn" |                 android:text="@string/registerActionBtn" | ||||||
|                 android:visibility="visible" /> |                 android:visibility="invisible" /> | ||||||
|  |  | ||||||
|         </LinearLayout> |         </LinearLayout> | ||||||
|  |  | ||||||
|     </FrameLayout> |     </FrameLayout> | ||||||
| </android.support.constraint.ConstraintLayout> | </androidx.constraintlayout.widget.ConstraintLayout> | ||||||
| @@ -1,5 +1,5 @@ | |||||||
| <?xml version="1.0" encoding="utf-8"?> | <?xml version="1.0" encoding="utf-8"?> | ||||||
| <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" | <androidx.drawerlayout.widget.DrawerLayout 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:id="@+id/drawer_layout" |     android:id="@+id/drawer_layout" | ||||||
| @@ -13,7 +13,7 @@ | |||||||
|         android:layout_width="match_parent" |         android:layout_width="match_parent" | ||||||
|         android:layout_height="match_parent" /> |         android:layout_height="match_parent" /> | ||||||
|  |  | ||||||
|     <android.support.design.widget.NavigationView |     <com.google.android.material.navigation.NavigationView | ||||||
|         android:id="@+id/nav_view" |         android:id="@+id/nav_view" | ||||||
|         android:layout_width="wrap_content" |         android:layout_width="wrap_content" | ||||||
|         android:layout_height="match_parent" |         android:layout_height="match_parent" | ||||||
| @@ -26,4 +26,4 @@ | |||||||
|         app:headerLayout="@layout/nav_header_main" |         app:headerLayout="@layout/nav_header_main" | ||||||
|         app:menu="@menu/activity_main_drawer" /> |         app:menu="@menu/activity_main_drawer" /> | ||||||
|  |  | ||||||
| </android.support.v4.widget.DrawerLayout> | </androidx.drawerlayout.widget.DrawerLayout> | ||||||
|   | |||||||
| @@ -1,5 +1,5 @@ | |||||||
| <?xml version="1.0" encoding="utf-8"?> | <?xml version="1.0" encoding="utf-8"?> | ||||||
| <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | <androidx.constraintlayout.widget.ConstraintLayout 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" | ||||||
| @@ -12,8 +12,8 @@ | |||||||
|         android:layout_height="fill_parent" |         android:layout_height="fill_parent" | ||||||
|         android:layout_alignParentTop="true" |         android:layout_alignParentTop="true" | ||||||
|         android:layout_alignParentBottom="true" |         android:layout_alignParentBottom="true" | ||||||
|         android:layout_alignParentLeft="true" |         android:layout_alignParentStart="true" | ||||||
|         android:layout_alignParentRight="true" |         android:layout_alignParentEnd="true" | ||||||
|         android:visibility="gone" /> |         android:visibility="gone" /> | ||||||
|  |  | ||||||
|     <ScrollView |     <ScrollView | ||||||
| @@ -37,17 +37,15 @@ | |||||||
|             <WebView |             <WebView | ||||||
|                 android:id="@+id/videoView" |                 android:id="@+id/videoView" | ||||||
|                 android:layout_width="match_parent" |                 android:layout_width="match_parent" | ||||||
|                 android:layout_height="270dp" |                 android:layout_height="222dp" | ||||||
|                 android:layout_weight="1"> |                 android:layout_weight="1" /> | ||||||
|  |  | ||||||
|             </WebView> |  | ||||||
|  |  | ||||||
|             <TextView |             <TextView | ||||||
|                 android:id="@+id/tittleVideoTxt" |                 android:id="@+id/tittleVideoTxt" | ||||||
|                 android:layout_width="match_parent" |                 android:layout_width="match_parent" | ||||||
|                 android:layout_height="wrap_content" |                 android:layout_height="wrap_content" | ||||||
|                 android:paddingStart="5dp" |                 android:paddingStart="5dp" | ||||||
|                 android:textAppearance="@android:style/TextAppearance.Material.Large" |                 android:textAppearance="@android:style/TextAppearance.Material.Display1" | ||||||
|                 android:textSize="18sp" |                 android:textSize="18sp" | ||||||
|                 android:textStyle="bold" /> |                 android:textStyle="bold" /> | ||||||
|  |  | ||||||
| @@ -59,7 +57,7 @@ | |||||||
|                 android:paddingRight="5dp" |                 android:paddingRight="5dp" | ||||||
|                 android:textSize="12sp" /> |                 android:textSize="12sp" /> | ||||||
|  |  | ||||||
|             <LinearLayout |             <androidx.appcompat.widget.LinearLayoutCompat | ||||||
|                 android:id="@+id/actionsLayout" |                 android:id="@+id/actionsLayout" | ||||||
|                 android:layout_width="match_parent" |                 android:layout_width="match_parent" | ||||||
|                 android:layout_height="50dp" |                 android:layout_height="50dp" | ||||||
| @@ -67,7 +65,7 @@ | |||||||
|                 android:orientation="horizontal" |                 android:orientation="horizontal" | ||||||
|                 android:visibility="gone"> |                 android:visibility="gone"> | ||||||
|  |  | ||||||
|                 <LinearLayout |                 <androidx.appcompat.widget.LinearLayoutCompat | ||||||
|                     android:id="@+id/likeLayout" |                     android:id="@+id/likeLayout" | ||||||
|                     android:layout_width="match_parent" |                     android:layout_width="match_parent" | ||||||
|                     android:layout_height="match_parent" |                     android:layout_height="match_parent" | ||||||
| @@ -94,7 +92,7 @@ | |||||||
|                         android:layout_weight="1" |                         android:layout_weight="1" | ||||||
|                         android:text="@string/likeBtn" |                         android:text="@string/likeBtn" | ||||||
|                         android:textAlignment="center" /> |                         android:textAlignment="center" /> | ||||||
|                 </LinearLayout> |                 </androidx.appcompat.widget.LinearLayoutCompat> | ||||||
|  |  | ||||||
|                 <LinearLayout |                 <LinearLayout | ||||||
|                     android:id="@+id/dislikeLayout" |                     android:id="@+id/dislikeLayout" | ||||||
| @@ -166,7 +164,7 @@ | |||||||
|                         android:layout_height="match_parent" |                         android:layout_height="match_parent" | ||||||
|                         android:layout_weight="1" |                         android:layout_weight="1" | ||||||
|                         android:adjustViewBounds="false" |                         android:adjustViewBounds="false" | ||||||
|                         android:contentDescription="@string/dislikeBtn" |                         android:contentDescription="@string/shareBtn" | ||||||
|                         android:cropToPadding="false" |                         android:cropToPadding="false" | ||||||
|                         android:visibility="visible" |                         android:visibility="visible" | ||||||
|                         app:srcCompat="@drawable/ic_share" /> |                         app:srcCompat="@drawable/ic_share" /> | ||||||
| @@ -179,7 +177,7 @@ | |||||||
|                         android:text="@string/shareBtn" |                         android:text="@string/shareBtn" | ||||||
|                         android:textAlignment="center" /> |                         android:textAlignment="center" /> | ||||||
|                 </LinearLayout> |                 </LinearLayout> | ||||||
|             </LinearLayout> |             </androidx.appcompat.widget.LinearLayoutCompat> | ||||||
|  |  | ||||||
|             <LinearLayout |             <LinearLayout | ||||||
|                 android:layout_width="match_parent" |                 android:layout_width="match_parent" | ||||||
| @@ -202,7 +200,7 @@ | |||||||
|                 <LinearLayout |                 <LinearLayout | ||||||
|                     android:layout_width="wrap_content" |                     android:layout_width="wrap_content" | ||||||
|                     android:layout_height="match_parent" |                     android:layout_height="match_parent" | ||||||
|                     android:layout_weight="2" |                     android:layout_weight="3" | ||||||
|                     android:orientation="vertical"> |                     android:orientation="vertical"> | ||||||
|  |  | ||||||
|                     <TextView |                     <TextView | ||||||
| @@ -210,7 +208,6 @@ | |||||||
|                         android:layout_width="match_parent" |                         android:layout_width="match_parent" | ||||||
|                         android:layout_height="wrap_content" |                         android:layout_height="wrap_content" | ||||||
|                         android:textAppearance="@android:style/TextAppearance.Material.Large" |                         android:textAppearance="@android:style/TextAppearance.Material.Large" | ||||||
|                         android:textColor="@android:color/black" |  | ||||||
|                         android:textSize="18sp" |                         android:textSize="18sp" | ||||||
|                         android:textStyle="bold" /> |                         android:textStyle="bold" /> | ||||||
|  |  | ||||||
| @@ -223,14 +220,14 @@ | |||||||
|  |  | ||||||
|                 </LinearLayout> |                 </LinearLayout> | ||||||
|  |  | ||||||
|                 <Button |                 <com.google.android.material.button.MaterialButton | ||||||
|                     android:id="@+id/subscribeBtn" |                     android:id="@+id/subscribeBtn" | ||||||
|                     style="@style/Widget.AppCompat.Button.Colored" |                     style="@style/Widget.MaterialComponents.Button" | ||||||
|                     android:layout_width="wrap_content" |                     android:layout_width="wrap_content" | ||||||
|                     android:layout_height="wrap_content" |                     android:layout_height="wrap_content" | ||||||
|                     android:layout_weight="1" |                     android:layout_weight="1" | ||||||
|                     android:text="@string/subscribeBtn" |                     android:text="@string/subscribeBtn" | ||||||
|                     android:textSize="10sp" |                     android:textSize="12sp" | ||||||
|                     android:visibility="invisible" /> |                     android:visibility="invisible" /> | ||||||
|             </LinearLayout> |             </LinearLayout> | ||||||
|  |  | ||||||
| @@ -257,9 +254,9 @@ | |||||||
|                 android:paddingLeft="10dp" |                 android:paddingLeft="10dp" | ||||||
|                 android:paddingRight="10dp" /> |                 android:paddingRight="10dp" /> | ||||||
|  |  | ||||||
|             <Button |             <com.google.android.material.button.MaterialButton | ||||||
|                 android:id="@+id/showMoreBtn" |                 android:id="@+id/showMoreBtn" | ||||||
|                 style="@style/Widget.AppCompat.Button.Borderless.Colored" |                 style="@style/Widget.MaterialComponents.Button.TextButton" | ||||||
|                 android:layout_width="wrap_content" |                 android:layout_width="wrap_content" | ||||||
|                 android:layout_height="wrap_content" |                 android:layout_height="wrap_content" | ||||||
|                 android:layout_weight="1" |                 android:layout_weight="1" | ||||||
| @@ -272,7 +269,7 @@ | |||||||
|                 android:layout_height="1dp" |                 android:layout_height="1dp" | ||||||
|                 android:background="?android:attr/listDivider" /> |                 android:background="?android:attr/listDivider" /> | ||||||
|  |  | ||||||
|             <Space |             <androidx.legacy.widget.Space | ||||||
|                 android:layout_width="match_parent" |                 android:layout_width="match_parent" | ||||||
|                 android:layout_height="10dp" |                 android:layout_height="10dp" | ||||||
|                 android:layout_weight="1" /> |                 android:layout_weight="1" /> | ||||||
| @@ -285,11 +282,11 @@ | |||||||
|                 android:text="@string/commentariesTxt" |                 android:text="@string/commentariesTxt" | ||||||
|                 android:textStyle="bold" /> |                 android:textStyle="bold" /> | ||||||
|  |  | ||||||
|             <Space |             <androidx.legacy.widget.Space | ||||||
|                 android:layout_width="match_parent" |                 android:layout_width="match_parent" | ||||||
|                 android:layout_height="20dp" /> |                 android:layout_height="20dp" /> | ||||||
|  |  | ||||||
|             <LinearLayout |             <androidx.appcompat.widget.LinearLayoutCompat | ||||||
|                 android:id="@+id/commentaryLayout" |                 android:id="@+id/commentaryLayout" | ||||||
|                 android:layout_width="match_parent" |                 android:layout_width="match_parent" | ||||||
|                 android:layout_height="wrap_content" |                 android:layout_height="wrap_content" | ||||||
| @@ -308,28 +305,33 @@ | |||||||
|                         android:layout_weight="1" |                         android:layout_weight="1" | ||||||
|                         app:srcCompat="@drawable/default_avatar" /> |                         app:srcCompat="@drawable/default_avatar" /> | ||||||
|  |  | ||||||
|                     <EditText |                     <com.google.android.material.textfield.TextInputLayout | ||||||
|                         android:id="@+id/commentaryText" |  | ||||||
|                         android:layout_width="wrap_content" |                         android:layout_width="wrap_content" | ||||||
|                         android:layout_height="wrap_content" |                         android:layout_height="wrap_content" | ||||||
|                         android:layout_weight="2" |                         android:layout_margin="4dp" | ||||||
|                         android:ems="10" |                         android:layout_weight="3" | ||||||
|                         android:hint="@string/commentHolder" |                         android:hint="@string/commentHolder"> | ||||||
|                         android:inputType="textMultiLine" /> |  | ||||||
|  |                         <com.google.android.material.textfield.TextInputEditText | ||||||
|  |                             android:id="@+id/commentaryText" | ||||||
|  |                             android:layout_width="match_parent" | ||||||
|  |                             android:layout_height="match_parent" | ||||||
|  |                             android:ems="10" | ||||||
|  |                             android:inputType="textMultiLine" /> | ||||||
|  |                     </com.google.android.material.textfield.TextInputLayout> | ||||||
|  |  | ||||||
|                 </LinearLayout> |                 </LinearLayout> | ||||||
|  |  | ||||||
|                 <Button |                 <com.google.android.material.button.MaterialButton | ||||||
|                     android:id="@+id/commentaryBtn" |                     android:id="@+id/commentaryBtn" | ||||||
|                     style="@style/Widget.AppCompat.Button.Colored" |  | ||||||
|                     android:layout_width="match_parent" |                     android:layout_width="match_parent" | ||||||
|                     android:layout_height="match_parent" |                     android:layout_height="match_parent" | ||||||
|                     android:layout_weight="1" |                     android:layout_weight="1" | ||||||
|                     android:text="@string/commentaryText" /> |                     android:text="@string/commentaryText" /> | ||||||
|  |  | ||||||
|             </LinearLayout> |             </androidx.appcompat.widget.LinearLayoutCompat> | ||||||
|  |  | ||||||
|             <android.support.v7.widget.RecyclerView |             <androidx.recyclerview.widget.RecyclerView | ||||||
|                 android:id="@+id/listCommentaries" |                 android:id="@+id/listCommentaries" | ||||||
|                 android:layout_width="match_parent" |                 android:layout_width="match_parent" | ||||||
|                 android:layout_height="wrap_content" |                 android:layout_height="wrap_content" | ||||||
| @@ -340,4 +342,4 @@ | |||||||
|  |  | ||||||
|         </LinearLayout> |         </LinearLayout> | ||||||
|     </ScrollView> |     </ScrollView> | ||||||
| </android.support.constraint.ConstraintLayout> | </androidx.constraintlayout.widget.ConstraintLayout> | ||||||
| @@ -1,5 +1,5 @@ | |||||||
| <?xml version="1.0" encoding="utf-8"?> | <?xml version="1.0" encoding="utf-8"?> | ||||||
| <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | <androidx.constraintlayout.widget.ConstraintLayout 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" | ||||||
| @@ -29,7 +29,7 @@ | |||||||
|                 android:contentDescription="@string/app_name" |                 android:contentDescription="@string/app_name" | ||||||
|                 app:srcCompat="@mipmap/ic_launcher" /> |                 app:srcCompat="@mipmap/ic_launcher" /> | ||||||
|  |  | ||||||
|             <Space |             <androidx.legacy.widget.Space | ||||||
|                 android:layout_width="match_parent" |                 android:layout_width="match_parent" | ||||||
|                 android:layout_height="30dp" /> |                 android:layout_height="30dp" /> | ||||||
|  |  | ||||||
| @@ -39,10 +39,9 @@ | |||||||
|                 android:layout_height="wrap_content" |                 android:layout_height="wrap_content" | ||||||
|                 android:text="@string/charging" |                 android:text="@string/charging" | ||||||
|                 android:textAlignment="center" |                 android:textAlignment="center" | ||||||
|                 android:textAppearance="@android:style/TextAppearance.Material.Medium.Inverse" |                 android:textAppearance="@android:style/TextAppearance.Material.Medium" /> | ||||||
|                 android:textColor="@android:color/black" /> |  | ||||||
|  |  | ||||||
|             <Space |             <androidx.legacy.widget.Space | ||||||
|                 android:layout_width="match_parent" |                 android:layout_width="match_parent" | ||||||
|                 android:layout_height="30dp" /> |                 android:layout_height="30dp" /> | ||||||
|  |  | ||||||
| @@ -55,4 +54,4 @@ | |||||||
|  |  | ||||||
|         </LinearLayout> |         </LinearLayout> | ||||||
|     </FrameLayout> |     </FrameLayout> | ||||||
| </android.support.constraint.ConstraintLayout> | </androidx.constraintlayout.widget.ConstraintLayout> | ||||||
| @@ -1,25 +1,22 @@ | |||||||
| <?xml version="1.0" encoding="utf-8"?> | <?xml version="1.0" encoding="utf-8"?> | ||||||
| <android.support.design.widget.CoordinatorLayout 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" | ||||||
|     tools:context=".MainActivity"> |     tools:context=".MainActivity"> | ||||||
|  |  | ||||||
|     <android.support.design.widget.AppBarLayout |     <com.google.android.material.appbar.AppBarLayout | ||||||
|         android:layout_width="match_parent" |         android:layout_width="match_parent" | ||||||
|         android:layout_height="wrap_content" |         android:layout_height="wrap_content"> | ||||||
|         android:theme="@style/P2playTheme.AppBarOverlay"> |  | ||||||
|  |  | ||||||
|         <android.support.v7.widget.Toolbar |         <androidx.appcompat.widget.Toolbar | ||||||
|             android:id="@+id/toolbar" |             android:id="@+id/toolbar" | ||||||
|             android:layout_width="match_parent" |             android:layout_width="match_parent" | ||||||
|             android:layout_height="?attr/actionBarSize" |             android:layout_height="?attr/actionBarSize"/> | ||||||
|             android:background="?attr/colorPrimary" |  | ||||||
|             app:popupTheme="@style/P2playTheme.PopupOverlay" /> |  | ||||||
|  |  | ||||||
|     </android.support.design.widget.AppBarLayout> |     </com.google.android.material.appbar.AppBarLayout> | ||||||
|  |  | ||||||
|     <include layout="@layout/content_main" /> |     <include layout="@layout/content_main" /> | ||||||
|  |  | ||||||
| </android.support.design.widget.CoordinatorLayout> | </androidx.coordinatorlayout.widget.CoordinatorLayout> | ||||||
| @@ -1,5 +1,5 @@ | |||||||
| <?xml version="1.0" encoding="utf-8"?> | <?xml version="1.0" encoding="utf-8"?> | ||||||
| <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | <androidx.constraintlayout.widget.ConstraintLayout 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" | ||||||
| @@ -8,7 +8,7 @@ | |||||||
|     tools:context=".MainActivity" |     tools:context=".MainActivity" | ||||||
|     tools:showIn="@layout/app_bar_main"> |     tools:showIn="@layout/app_bar_main"> | ||||||
|  |  | ||||||
|     <android.support.v4.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android" |     <androidx.swiperefreshlayout.widget.SwipeRefreshLayout | ||||||
|         android:id="@+id/swipeContainer" |         android:id="@+id/swipeContainer" | ||||||
|         android:layout_width="match_parent" |         android:layout_width="match_parent" | ||||||
|         android:layout_height="match_parent" |         android:layout_height="match_parent" | ||||||
| @@ -16,7 +16,7 @@ | |||||||
|         android:visibility="visible" |         android:visibility="visible" | ||||||
|         app:layout_constraintTop_toTopOf="parent"> |         app:layout_constraintTop_toTopOf="parent"> | ||||||
|  |  | ||||||
|         <android.support.v7.widget.RecyclerView |         <view class="androidx.recyclerview.widget.RecyclerView" | ||||||
|             android:id="@+id/list" |             android:id="@+id/list" | ||||||
|             android:layout_width="match_parent" |             android:layout_width="match_parent" | ||||||
|             android:layout_height="wrap_content" |             android:layout_height="wrap_content" | ||||||
| @@ -24,5 +24,5 @@ | |||||||
|             app:layout_constraintStart_toStartOf="parent" |             app:layout_constraintStart_toStartOf="parent" | ||||||
|             app:layout_constraintTop_toTopOf="parent" /> |             app:layout_constraintTop_toTopOf="parent" /> | ||||||
|  |  | ||||||
|     </android.support.v4.widget.SwipeRefreshLayout> |     </androidx.swiperefreshlayout.widget.SwipeRefreshLayout> | ||||||
| </android.support.constraint.ConstraintLayout> | </androidx.constraintlayout.widget.ConstraintLayout> | ||||||
| @@ -6,21 +6,26 @@ | |||||||
|     android:orientation="vertical" |     android:orientation="vertical" | ||||||
|     android:padding="10dp" > |     android:padding="10dp" > | ||||||
|  |  | ||||||
|     <TextView |  | ||||||
|         android:id="@+id/reportTxt" |  | ||||||
|         android:layout_width="wrap_content" |  | ||||||
|         android:layout_height="wrap_content" |  | ||||||
|         android:text="@string/reportDialog" |  | ||||||
|         android:textAppearance="?android:attr/textAppearanceLarge" /> |  | ||||||
|  |  | ||||||
|     <EditText |     <com.google.android.material.textfield.TextInputLayout | ||||||
|         android:id="@+id/reportText" |  | ||||||
|         android:layout_width="match_parent" |         android:layout_width="match_parent" | ||||||
|         android:layout_height="wrap_content" |         android:layout_height="wrap_content" | ||||||
|         android:inputType="textMultiLine"> |         android:layout_margin="4dp" | ||||||
|  |         android:layout_weight="3" | ||||||
|  |         android:hint="@string/reportDialog"> | ||||||
|  |  | ||||||
|  |         <com.google.android.material.textfield.TextInputEditText | ||||||
|  |             android:id="@+id/reportText" | ||||||
|  |             android:layout_width="match_parent" | ||||||
|  |             android:layout_height="wrap_content" | ||||||
|  |             android:inputType="textMultiLine" > | ||||||
|  |  | ||||||
|  |             <requestFocus /> | ||||||
|  |  | ||||||
|  |         </com.google.android.material.textfield.TextInputEditText> | ||||||
|  |  | ||||||
|  |     </com.google.android.material.textfield.TextInputLayout> | ||||||
|  |  | ||||||
|         <requestFocus /> |  | ||||||
|  |  | ||||||
|     </EditText> |  | ||||||
|  |  | ||||||
| </LinearLayout> | </LinearLayout> | ||||||
| @@ -1,5 +1,5 @@ | |||||||
| <?xml version="1.0" encoding="utf-8"?> | <?xml version="1.0" encoding="utf-8"?> | ||||||
| <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | <androidx.constraintlayout.widget.ConstraintLayout 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="wrap_content"> |     android:layout_height="wrap_content"> | ||||||
| @@ -48,4 +48,4 @@ | |||||||
|                 android:maxLines="10" /> |                 android:maxLines="10" /> | ||||||
|         </LinearLayout> |         </LinearLayout> | ||||||
|     </LinearLayout> |     </LinearLayout> | ||||||
| </android.support.constraint.ConstraintLayout> | </androidx.constraintlayout.widget.ConstraintLayout> | ||||||
| @@ -1,5 +1,5 @@ | |||||||
| <?xml version="1.0" encoding="utf-8"?> | <?xml version="1.0" encoding="utf-8"?> | ||||||
| <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | <androidx.constraintlayout.widget.ConstraintLayout 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" | ||||||
| @@ -50,7 +50,8 @@ | |||||||
|                     android:layout_height="wrap_content" |                     android:layout_height="wrap_content" | ||||||
|                     android:maxLength="70" |                     android:maxLength="70" | ||||||
|                     android:textSize="14sp" |                     android:textSize="14sp" | ||||||
|                     android:textStyle="bold" /> |                     android:textStyle="bold" | ||||||
|  |                     android:theme="@style/MaterialAlertDialog.MaterialComponents.Title.Text"/> | ||||||
|  |  | ||||||
|                 <TextView |                 <TextView | ||||||
|                     android:id="@+id/descriptionTxt" |                     android:id="@+id/descriptionTxt" | ||||||
| @@ -64,10 +65,10 @@ | |||||||
|  |  | ||||||
|     </LinearLayout> |     </LinearLayout> | ||||||
|  |  | ||||||
|     <Space |     <androidx.legacy.widget.Space | ||||||
|         android:layout_width="match_parent" |         android:layout_width="match_parent" | ||||||
|         android:layout_height="15dp" |         android:layout_height="15dp" | ||||||
|         android:layout_weight="1" |         android:layout_weight="1" | ||||||
|         app:layout_constraintTop_toBottomOf="@+id/linearLayout" /> |         app:layout_constraintTop_toBottomOf="@+id/linearLayout" /> | ||||||
|  |  | ||||||
| </android.support.constraint.ConstraintLayout> | </androidx.constraintlayout.widget.ConstraintLayout> | ||||||
| @@ -5,7 +5,8 @@ | |||||||
|     <item |     <item | ||||||
|         android:id="@+id/app_bar_search" |         android:id="@+id/app_bar_search" | ||||||
|         android:icon="@drawable/ic_search_black_24dp" |         android:icon="@drawable/ic_search_black_24dp" | ||||||
|         app:actionViewClass="android.widget.SearchView" |         app:actionViewClass="androidx.appcompat.widget.SearchView" | ||||||
|  |         android:title="@string/action_login" | ||||||
|         app:showAsAction="always"/> |         app:showAsAction="always"/> | ||||||
|  |  | ||||||
|     <item |     <item | ||||||
|   | |||||||
| @@ -9,7 +9,7 @@ | |||||||
|     <string name="aboutLabel">Sobre P2Play</string> |     <string name="aboutLabel">Sobre P2Play</string> | ||||||
|     <string name="aboutText">P2Play es una aplicacion no-oficial de PeerTube. Tu puedes ver y cntribuir con el codigo en GitLab:</string> |     <string name="aboutText">P2Play es una aplicacion no-oficial de PeerTube. Tu puedes ver y cntribuir con el codigo en GitLab:</string> | ||||||
|     <string name="aboutStatus">Puedes seguir nuestro blog:</string> |     <string name="aboutStatus">Puedes seguir nuestro blog:</string> | ||||||
|     <string name="aboutLicense">Copyleft GNU GPLv3 License</string> |     <string name="aboutLicense">GNU GPLv3 License</string> | ||||||
|     <string name="aboutInstance">Sobre la instancia</string> |     <string name="aboutInstance">Sobre la instancia</string> | ||||||
|     <string name="aboutInWeb">Para ver los terminos y mas visita la web:</string> |     <string name="aboutInWeb">Para ver los terminos y mas visita la web:</string> | ||||||
|     <!-- End About strings --> |     <!-- End About strings --> | ||||||
| @@ -25,6 +25,7 @@ | |||||||
|     <string name="passwordTxt">Contraseña:</string> |     <string name="passwordTxt">Contraseña:</string> | ||||||
|     <string name="loginBtn">Ingresar</string> |     <string name="loginBtn">Ingresar</string> | ||||||
|     <string name="registerActionBtn">Crear una cuenta</string> |     <string name="registerActionBtn">Crear una cuenta</string> | ||||||
|  |     <string name="instance">Instancia</string> | ||||||
|     <!-- Toast msg --> |     <!-- Toast msg --> | ||||||
|     <string name="loginSuccess_msg">Te has identificado</string> |     <string name="loginSuccess_msg">Te has identificado</string> | ||||||
|     <string name="loginError_msg">Ha ocurrido un error</string> |     <string name="loginError_msg">Ha ocurrido un error</string> | ||||||
|   | |||||||
| @@ -5,7 +5,7 @@ | |||||||
|     <string name="aboutLabel">Informazioni su P2Play</string> |     <string name="aboutLabel">Informazioni su P2Play</string> | ||||||
|     <string name="aboutText">P2Play è un\'applicazione Android non ufficiale per PeerTube. Puoi visualizzare e contribuire al codice su GitLab:</string> |     <string name="aboutText">P2Play è un\'applicazione Android non ufficiale per PeerTube. Puoi visualizzare e contribuire al codice su GitLab:</string> | ||||||
|     <string name="aboutStatus">Puoi seguire il nostro blog:</string> |     <string name="aboutStatus">Puoi seguire il nostro blog:</string> | ||||||
|     <string name="aboutLicense">Copyleft GNU GPLv3 License</string> |     <string name="aboutLicense">GNU GPLv3 License</string> | ||||||
|     <string name="aboutInstance">Informazioni sull\'istanza</string> |     <string name="aboutInstance">Informazioni sull\'istanza</string> | ||||||
|     <string name="aboutInWeb">Puoi vedere in termini ed altro sul web:</string> |     <string name="aboutInWeb">Puoi vedere in termini ed altro sul web:</string> | ||||||
|     <string name="hostInfoText">Scegliere l\'istanza</string> |     <string name="hostInfoText">Scegliere l\'istanza</string> | ||||||
|   | |||||||
							
								
								
									
										23
									
								
								app/src/main/res/values-night/themes.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								app/src/main/res/values-night/themes.xml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,23 @@ | |||||||
|  |  | ||||||
|  | <resources> | ||||||
|  |     <style name="Theme.P2play" parent="Theme.MaterialComponents.DayNight"> | ||||||
|  |         <item name="colorPrimary">@color/md_theme_dark_primary</item> | ||||||
|  |         <item name="colorOnPrimary">@color/md_theme_dark_onPrimary</item> | ||||||
|  |         <item name="colorSecondary">@color/md_theme_dark_secondary</item> | ||||||
|  |         <item name="colorOnSecondary">@color/md_theme_dark_onSecondary</item> | ||||||
|  |         <item name="colorError">@color/md_theme_dark_error</item> | ||||||
|  |         <item name="colorOnError">@color/md_theme_dark_onError</item> | ||||||
|  |         <item name="android:colorBackground">@color/md_theme_dark_background</item> | ||||||
|  |         <item name="colorOnBackground">@color/md_theme_dark_onBackground</item> | ||||||
|  |         <item name="colorSurface">@color/md_theme_dark_surface</item> | ||||||
|  |         <item name="colorOnSurface">@color/md_theme_dark_onSurface</item> | ||||||
|  |         <item name="colorPrimaryDark">@color/colorAccent</item> | ||||||
|  |         <item name="colorAccent">@color/md_theme_dark_onBackground</item> | ||||||
|  |         <item name="android:textColorLink">@color/md_theme_dark_secondary</item> | ||||||
|  |     </style> | ||||||
|  |  | ||||||
|  |     <style name="Theme.P2play.NoActionBar" parent="Theme.P2play"> | ||||||
|  |         <item name="windowActionBar">false</item> | ||||||
|  |         <item name="windowNoTitle">true</item> | ||||||
|  |     </style> | ||||||
|  | </resources> | ||||||
| @@ -1,8 +1,8 @@ | |||||||
| <?xml version="1.0" encoding="utf-8"?> | <?xml version="1.0" encoding="utf-8"?> | ||||||
| <resources> | <resources> | ||||||
|     <color name="colorPrimary">#3F51B5</color> |     <color name="colorPrimary">#9F4200</color> | ||||||
|     <color name="colorPrimaryDark">#303F9F</color> |     <color name="colorPrimaryDark">#F4DED5</color> | ||||||
|     <color name="colorAccent">#FF4081</color> |     <color name="colorAccent">#0f3239</color> | ||||||
|     <color name="colorHeader">#ffffff</color> |     <color name="colorHeader">#ffffff</color> | ||||||
|     <color name="colorBody">#fff</color> |     <color name="colorBody">#fff</color> | ||||||
|     <color name="colorMenu">#000</color> |     <color name="colorMenu">#000</color> | ||||||
| @@ -10,4 +10,66 @@ | |||||||
|     <color name="colorLike">#FF3C9100</color> |     <color name="colorLike">#FF3C9100</color> | ||||||
|     <color name="colorDislike">#ec020e</color> |     <color name="colorDislike">#ec020e</color> | ||||||
|     <color name="colorProfile">#262626</color> |     <color name="colorProfile">#262626</color> | ||||||
|  |   | ||||||
|  |     <color name="seed">#f16805</color> | ||||||
|  |     <color name="md_theme_light_primary">#9F4200</color> | ||||||
|  |     <color name="md_theme_light_onPrimary">#FFFFFF</color> | ||||||
|  |     <color name="md_theme_light_primaryContainer">#FFDBCB</color> | ||||||
|  |     <color name="md_theme_light_onPrimaryContainer">#341100</color> | ||||||
|  |     <color name="md_theme_light_secondary">#566500</color> | ||||||
|  |     <color name="md_theme_light_onSecondary">#FFFFFF</color> | ||||||
|  |     <color name="md_theme_light_secondaryContainer">#D9EC7B</color> | ||||||
|  |     <color name="md_theme_light_onSecondaryContainer">#181E00</color> | ||||||
|  |     <color name="md_theme_light_tertiary">#904D00</color> | ||||||
|  |     <color name="md_theme_light_onTertiary">#FFFFFF</color> | ||||||
|  |     <color name="md_theme_light_tertiaryContainer">#FFDCC3</color> | ||||||
|  |     <color name="md_theme_light_onTertiaryContainer">#2F1500</color> | ||||||
|  |     <color name="md_theme_light_error">#BA1A1A</color> | ||||||
|  |     <color name="md_theme_light_errorContainer">#FFDAD6</color> | ||||||
|  |     <color name="md_theme_light_onError">#FFFFFF</color> | ||||||
|  |     <color name="md_theme_light_onErrorContainer">#410002</color> | ||||||
|  |     <color name="md_theme_light_background">#F8FDFF</color> | ||||||
|  |     <color name="md_theme_light_onBackground">#001F25</color> | ||||||
|  |     <color name="md_theme_light_surface">#F8FDFF</color> | ||||||
|  |     <color name="md_theme_light_onSurface">#001F25</color> | ||||||
|  |     <color name="md_theme_light_surfaceVariant">#F4DED5</color> | ||||||
|  |     <color name="md_theme_light_onSurfaceVariant">#52443D</color> | ||||||
|  |     <color name="md_theme_light_outline">#85736C</color> | ||||||
|  |     <color name="md_theme_light_inverseOnSurface">#D6F6FF</color> | ||||||
|  |     <color name="md_theme_light_inverseSurface">#00363F</color> | ||||||
|  |     <color name="md_theme_light_inversePrimary">#FFB692</color> | ||||||
|  |     <color name="md_theme_light_shadow">#000000</color> | ||||||
|  |     <color name="md_theme_light_surfaceTint">#9F4200</color> | ||||||
|  |     <color name="md_theme_light_outlineVariant">#D7C2B9</color> | ||||||
|  |     <color name="md_theme_light_scrim">#000000</color> | ||||||
|  |     <color name="md_theme_dark_primary">#FFB692</color> | ||||||
|  |     <color name="md_theme_dark_onPrimary">#562000</color> | ||||||
|  |     <color name="md_theme_dark_primaryContainer">#793000</color> | ||||||
|  |     <color name="md_theme_dark_onPrimaryContainer">#FFDBCB</color> | ||||||
|  |     <color name="md_theme_dark_secondary">#BDD062</color> | ||||||
|  |     <color name="md_theme_dark_onSecondary">#2C3400</color> | ||||||
|  |     <color name="md_theme_dark_secondaryContainer">#404C00</color> | ||||||
|  |     <color name="md_theme_dark_onSecondaryContainer">#D9EC7B</color> | ||||||
|  |     <color name="md_theme_dark_tertiary">#FFB77C</color> | ||||||
|  |     <color name="md_theme_dark_onTertiary">#4D2600</color> | ||||||
|  |     <color name="md_theme_dark_tertiaryContainer">#6E3900</color> | ||||||
|  |     <color name="md_theme_dark_onTertiaryContainer">#FFDCC3</color> | ||||||
|  |     <color name="md_theme_dark_error">#FFB4AB</color> | ||||||
|  |     <color name="md_theme_dark_errorContainer">#93000A</color> | ||||||
|  |     <color name="md_theme_dark_onError">#690005</color> | ||||||
|  |     <color name="md_theme_dark_onErrorContainer">#FFDAD6</color> | ||||||
|  |     <color name="md_theme_dark_background">#001F25</color> | ||||||
|  |     <color name="md_theme_dark_onBackground">#A6EEFF</color> | ||||||
|  |     <color name="md_theme_dark_surface">#001F25</color> | ||||||
|  |     <color name="md_theme_dark_onSurface">#A6EEFF</color> | ||||||
|  |     <color name="md_theme_dark_surfaceVariant">#52443D</color> | ||||||
|  |     <color name="md_theme_dark_onSurfaceVariant">#D7C2B9</color> | ||||||
|  |     <color name="md_theme_dark_outline">#A08D85</color> | ||||||
|  |     <color name="md_theme_dark_inverseOnSurface">#001F25</color> | ||||||
|  |     <color name="md_theme_dark_inverseSurface">#A6EEFF</color> | ||||||
|  |     <color name="md_theme_dark_inversePrimary">#9F4200</color> | ||||||
|  |     <color name="md_theme_dark_shadow">#000000</color> | ||||||
|  |     <color name="md_theme_dark_surfaceTint">#FFB692</color> | ||||||
|  |     <color name="md_theme_dark_outlineVariant">#52443D</color> | ||||||
|  |     <color name="md_theme_dark_scrim">#000000</color> | ||||||
| </resources> | </resources> | ||||||
|   | |||||||
| @@ -16,7 +16,7 @@ | |||||||
|     <string name="aboutLabel">About P2Play</string> |     <string name="aboutLabel">About P2Play</string> | ||||||
|     <string name="aboutText">P2Play is an unofficial Android application for PeerTube. You can watch and contribute with the code on GitLab:</string> |     <string name="aboutText">P2Play is an unofficial Android application for PeerTube. You can watch and contribute with the code on GitLab:</string> | ||||||
|     <string name="aboutStatus">You can follow our blog:</string> |     <string name="aboutStatus">You can follow our blog:</string> | ||||||
|     <string name="aboutLicense">Copyleft GNU GPLv3 License</string> |     <string name="aboutLicense">Licence GNU GPLv3 License</string> | ||||||
|     <string name="aboutInstance">About instance</string> |     <string name="aboutInstance">About instance</string> | ||||||
|     <string name="aboutInWeb">You can see terms and more on the web:</string> |     <string name="aboutInWeb">You can see terms and more on the web:</string> | ||||||
|     <!-- End About strings --> |     <!-- End About strings --> | ||||||
| @@ -25,6 +25,7 @@ | |||||||
|     <string name="okButton">Accept</string> |     <string name="okButton">Accept</string> | ||||||
|     <string name="errorMsg">Error, try again</string> |     <string name="errorMsg">Error, try again</string> | ||||||
|     <string name="finallyMsg">Host saved</string> |     <string name="finallyMsg">Host saved</string> | ||||||
|  |     <string name="instance">Instance</string> | ||||||
|     <!-- End Host strings --> |     <!-- End Host strings --> | ||||||
|     <!-- Start Login strings --> |     <!-- Start Login strings --> | ||||||
|     <string name="loginInfo">Login or register new account</string> |     <string name="loginInfo">Login or register new account</string> | ||||||
|   | |||||||
							
								
								
									
										23
									
								
								app/src/main/res/values/themes.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								app/src/main/res/values/themes.xml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,23 @@ | |||||||
|  |  | ||||||
|  | <resources> | ||||||
|  |     <style name="Theme.P2play" parent="Theme.MaterialComponents.DayNight"> | ||||||
|  |         <item name="colorPrimary">@color/md_theme_light_primary</item> | ||||||
|  |         <item name="colorOnPrimary">@color/md_theme_light_onPrimary</item> | ||||||
|  |         <item name="colorSecondary">@color/md_theme_light_secondary</item> | ||||||
|  |         <item name="colorOnSecondary">@color/md_theme_light_onSecondary</item> | ||||||
|  |         <item name="colorError">@color/md_theme_light_error</item> | ||||||
|  |         <item name="colorOnError">@color/md_theme_light_onError</item> | ||||||
|  |         <item name="android:colorBackground">@color/md_theme_light_background</item> | ||||||
|  |         <item name="colorOnBackground">@color/md_theme_light_onBackground</item> | ||||||
|  |         <item name="colorSurface">@color/md_theme_light_surface</item> | ||||||
|  |         <item name="colorOnSurface">@color/md_theme_light_onSurface</item> | ||||||
|  |         <item name="colorPrimaryDark">@color/md_theme_light_primary</item> | ||||||
|  |         <item name="colorAccent">@color/md_theme_light_onPrimary</item> | ||||||
|  |         <item name="android:textColorLink">@color/md_theme_light_secondary</item> | ||||||
|  |     </style> | ||||||
|  |  | ||||||
|  |     <style name="Theme.P2play.NoActionBar" parent="Theme.P2play"> | ||||||
|  |         <item name="windowActionBar">false</item> | ||||||
|  |         <item name="windowNoTitle">true</item> | ||||||
|  |     </style> | ||||||
|  | </resources> | ||||||
| @@ -5,7 +5,7 @@ | |||||||
|     <EditTextPreference |     <EditTextPreference | ||||||
|         android:capitalize="words" |         android:capitalize="words" | ||||||
|         android:defaultValue="@string/pref_hostname_error" |         android:defaultValue="@string/pref_hostname_error" | ||||||
|         android:inputType="textCapWords" |         android:inputType="text" | ||||||
|         android:key="hostP2play" |         android:key="hostP2play" | ||||||
|         android:maxLines="1" |         android:maxLines="1" | ||||||
|         android:selectAllOnFocus="true" |         android:selectAllOnFocus="true" | ||||||
|   | |||||||
| @@ -1,11 +1,14 @@ | |||||||
| <preference-headers xmlns:android="http://schemas.android.com/apk/res/android"> | <preference-headers xmlns:android="http://schemas.android.com/apk/res/android" | ||||||
|  |     xmlns:tools="http://schemas.android.com/tools" | ||||||
|  |     xmlns:app="http://schemas.android.com/apk/res-auto"> | ||||||
|  |  | ||||||
|     <!-- These settings headers are only used on tablets. --> |     <!-- These settings headers are only used on tablets. --> | ||||||
|  |  | ||||||
|     <header |     <header | ||||||
|         android:fragment="org.libre.agosto.p2play.SettingsActivity$GeneralPreferenceFragment" |         android:fragment="org.libre.agosto.p2play.SettingsActivity$GeneralPreferenceFragment" | ||||||
|         android:icon="@drawable/ic_info_black_24dp" |         android:icon="@drawable/ic_info_black_24dp" | ||||||
|         android:title="@string/pref_header_general" /> |         android:title="@string/pref_header_general" | ||||||
|  |         android:textColor="@color/md_theme_light_secondary"/> | ||||||
|  |  | ||||||
|     <!-- <header |     <!-- <header | ||||||
|         android:fragment="org.libre.agosto.p2play.SettingsActivity$NotificationPreferenceFragment" |         android:fragment="org.libre.agosto.p2play.SettingsActivity$NotificationPreferenceFragment" | ||||||
|   | |||||||
| @@ -7,6 +7,9 @@ | |||||||
| # Specifies the JVM arguments used for the daemon process. | # Specifies the JVM arguments used for the daemon process. | ||||||
| # The setting is particularly useful for tweaking memory settings. | # The setting is particularly useful for tweaking memory settings. | ||||||
| org.gradle.jvmargs=-Xmx1536m | org.gradle.jvmargs=-Xmx1536m | ||||||
|  | android.enableJetifier=true | ||||||
|  | android.useAndroidX=true | ||||||
|  |  | ||||||
| # When configured, Gradle will run in incubating parallel mode. | # When configured, Gradle will run in incubating parallel mode. | ||||||
| # This option should only be used with decoupled projects. More details, visit | # This option should only be used with decoupled projects. More details, visit | ||||||
| # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user