From 9d430209d39d0e68f6311adfff9d476c8856f662 Mon Sep 17 00:00:00 2001 From: Joe Robinson Date: Sat, 20 Apr 2019 03:56:13 +0200 Subject: Initial commit - working file list view --- .../blatech/blaupload3/ExampleInstrumentedTest.kt | 24 +++++++ app/src/main/AndroidManifest.xml | 26 ++++++++ .../java/uk/co/blatech/blaupload3/model/File.kt | 30 +++++++++ .../java/uk/co/blatech/blaupload3/model/Image.kt | 7 ++ .../java/uk/co/blatech/blaupload3/model/Video.kt | 4 ++ .../uk/co/blatech/blaupload3/util/AppController.kt | 67 +++++++++++++++++++ .../java/uk/co/blatech/blaupload3/util/Config.kt | 12 ++++ .../co/blatech/blaupload3/util/FileListAdapter.kt | 37 +++++++++++ .../uk/co/blatech/blaupload3/util/JSONLoader.kt | 43 ++++++++++++ .../co/blatech/blaupload3/util/LruBitmapCache.kt | 28 ++++++++ .../uk/co/blatech/blaupload3/view/ListFragment.kt | 21 ++++++ .../uk/co/blatech/blaupload3/view/MainActivity.kt | 70 +++++++++++++++++++ app/src/main/res/drawable-v21/ic_menu_camera.xml | 12 ++++ app/src/main/res/drawable-v21/ic_menu_gallery.xml | 9 +++ app/src/main/res/drawable-v21/ic_menu_manage.xml | 9 +++ app/src/main/res/drawable-v21/ic_menu_send.xml | 9 +++ app/src/main/res/drawable-v21/ic_menu_share.xml | 9 +++ .../main/res/drawable-v21/ic_menu_slideshow.xml | 9 +++ .../res/drawable-v24/ic_launcher_foreground.xml | 34 ++++++++++ .../main/res/drawable/ic_launcher_background.xml | 74 +++++++++++++++++++++ app/src/main/res/drawable/side_nav_bar.xml | 9 +++ app/src/main/res/layout/activity_main.xml | 35 ++++++++++ app/src/main/res/layout/app_bar_main.xml | 34 ++++++++++ app/src/main/res/layout/content_main.xml | 21 ++++++ app/src/main/res/layout/file_list_row.xml | 40 +++++++++++ app/src/main/res/layout/image_list_item.xml | 6 ++ app/src/main/res/layout/list_fragment.xml | 13 ++++ app/src/main/res/layout/nav_header_main.xml | 37 +++++++++++ app/src/main/res/menu/activity_main_drawer.xml | 34 ++++++++++ app/src/main/res/menu/main.xml | 8 +++ app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml | 5 ++ .../res/mipmap-anydpi-v26/ic_launcher_round.xml | 5 ++ app/src/main/res/mipmap-hdpi/ic_launcher.png | Bin 0 -> 2963 bytes app/src/main/res/mipmap-hdpi/ic_launcher_round.png | Bin 0 -> 4905 bytes app/src/main/res/mipmap-mdpi/ic_launcher.png | Bin 0 -> 2060 bytes app/src/main/res/mipmap-mdpi/ic_launcher_round.png | Bin 0 -> 2783 bytes app/src/main/res/mipmap-xhdpi/ic_launcher.png | Bin 0 -> 4490 bytes .../main/res/mipmap-xhdpi/ic_launcher_round.png | Bin 0 -> 6895 bytes app/src/main/res/mipmap-xxhdpi/ic_launcher.png | Bin 0 -> 6387 bytes .../main/res/mipmap-xxhdpi/ic_launcher_round.png | Bin 0 -> 10413 bytes app/src/main/res/mipmap-xxxhdpi/ic_launcher.png | Bin 0 -> 9128 bytes .../main/res/mipmap-xxxhdpi/ic_launcher_round.png | Bin 0 -> 15132 bytes app/src/main/res/navigation/nav_graph.xml | 18 +++++ app/src/main/res/values-v21/styles.xml | 7 ++ app/src/main/res/values/colors.xml | 6 ++ app/src/main/res/values/dimens.xml | 8 +++ app/src/main/res/values/drawables.xml | 8 +++ app/src/main/res/values/strings.xml | 9 +++ app/src/main/res/values/styles.xml | 17 +++++ .../uk/co/blatech/blaupload3/ExampleUnitTest.kt | 17 +++++ 50 files changed, 871 insertions(+) create mode 100644 app/src/androidTest/java/uk/co/blatech/blaupload3/ExampleInstrumentedTest.kt create mode 100644 app/src/main/AndroidManifest.xml create mode 100644 app/src/main/java/uk/co/blatech/blaupload3/model/File.kt create mode 100644 app/src/main/java/uk/co/blatech/blaupload3/model/Image.kt create mode 100644 app/src/main/java/uk/co/blatech/blaupload3/model/Video.kt create mode 100644 app/src/main/java/uk/co/blatech/blaupload3/util/AppController.kt create mode 100644 app/src/main/java/uk/co/blatech/blaupload3/util/Config.kt create mode 100644 app/src/main/java/uk/co/blatech/blaupload3/util/FileListAdapter.kt create mode 100644 app/src/main/java/uk/co/blatech/blaupload3/util/JSONLoader.kt create mode 100644 app/src/main/java/uk/co/blatech/blaupload3/util/LruBitmapCache.kt create mode 100644 app/src/main/java/uk/co/blatech/blaupload3/view/ListFragment.kt create mode 100644 app/src/main/java/uk/co/blatech/blaupload3/view/MainActivity.kt create mode 100644 app/src/main/res/drawable-v21/ic_menu_camera.xml create mode 100644 app/src/main/res/drawable-v21/ic_menu_gallery.xml create mode 100644 app/src/main/res/drawable-v21/ic_menu_manage.xml create mode 100644 app/src/main/res/drawable-v21/ic_menu_send.xml create mode 100644 app/src/main/res/drawable-v21/ic_menu_share.xml create mode 100644 app/src/main/res/drawable-v21/ic_menu_slideshow.xml create mode 100644 app/src/main/res/drawable-v24/ic_launcher_foreground.xml create mode 100644 app/src/main/res/drawable/ic_launcher_background.xml create mode 100644 app/src/main/res/drawable/side_nav_bar.xml create mode 100644 app/src/main/res/layout/activity_main.xml create mode 100644 app/src/main/res/layout/app_bar_main.xml create mode 100644 app/src/main/res/layout/content_main.xml create mode 100644 app/src/main/res/layout/file_list_row.xml create mode 100644 app/src/main/res/layout/image_list_item.xml create mode 100644 app/src/main/res/layout/list_fragment.xml create mode 100644 app/src/main/res/layout/nav_header_main.xml create mode 100644 app/src/main/res/menu/activity_main_drawer.xml create mode 100644 app/src/main/res/menu/main.xml create mode 100644 app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml create mode 100644 app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml create mode 100644 app/src/main/res/mipmap-hdpi/ic_launcher.png create mode 100644 app/src/main/res/mipmap-hdpi/ic_launcher_round.png create mode 100644 app/src/main/res/mipmap-mdpi/ic_launcher.png create mode 100644 app/src/main/res/mipmap-mdpi/ic_launcher_round.png create mode 100644 app/src/main/res/mipmap-xhdpi/ic_launcher.png create mode 100644 app/src/main/res/mipmap-xhdpi/ic_launcher_round.png create mode 100644 app/src/main/res/mipmap-xxhdpi/ic_launcher.png create mode 100644 app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png create mode 100644 app/src/main/res/mipmap-xxxhdpi/ic_launcher.png create mode 100644 app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png create mode 100644 app/src/main/res/navigation/nav_graph.xml create mode 100644 app/src/main/res/values-v21/styles.xml create mode 100644 app/src/main/res/values/colors.xml create mode 100644 app/src/main/res/values/dimens.xml create mode 100644 app/src/main/res/values/drawables.xml create mode 100644 app/src/main/res/values/strings.xml create mode 100644 app/src/main/res/values/styles.xml create mode 100644 app/src/test/java/uk/co/blatech/blaupload3/ExampleUnitTest.kt (limited to 'app/src') diff --git a/app/src/androidTest/java/uk/co/blatech/blaupload3/ExampleInstrumentedTest.kt b/app/src/androidTest/java/uk/co/blatech/blaupload3/ExampleInstrumentedTest.kt new file mode 100644 index 0000000..b92a631 --- /dev/null +++ b/app/src/androidTest/java/uk/co/blatech/blaupload3/ExampleInstrumentedTest.kt @@ -0,0 +1,24 @@ +package uk.co.blatech.blaupload3 + +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("uk.co.blatech.blaupload3", appContext.packageName) + } +} diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..7494ef3 --- /dev/null +++ b/app/src/main/AndroidManifest.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/java/uk/co/blatech/blaupload3/model/File.kt b/app/src/main/java/uk/co/blatech/blaupload3/model/File.kt new file mode 100644 index 0000000..677b852 --- /dev/null +++ b/app/src/main/java/uk/co/blatech/blaupload3/model/File.kt @@ -0,0 +1,30 @@ +package uk.co.blatech.blaupload3.model + +import java.net.URI +import java.text.SimpleDateFormat +import java.util.* + +data class File (var filename: String, var type: String, var modified: Long, var size: Long) { + + var url = URI("http://wupload.of.je/$filename") + var thumb_url = URI("http://wupload.of.je/thumbs/$filename") + var modified_formatted = SimpleDateFormat("dd/MM/yyyy mm:HH:ss").format(Date(modified*1000)) + val units = arrayOf("B", "kB", "MB", "GB", "TB") + var size_lambda = { size : Long -> + var curSize = size.toDouble() + var curUnit = units[0] + for (i in 0 until units.size-1) { + if (curSize < 1000) { + break + } + curSize /= 1000 + curUnit = units[i+1] + } + val sizeRounded = String.format("%.3g", curSize) + "$sizeRounded $curUnit" + } + + var size_formatted = size_lambda(size) + + +} \ No newline at end of file diff --git a/app/src/main/java/uk/co/blatech/blaupload3/model/Image.kt b/app/src/main/java/uk/co/blatech/blaupload3/model/Image.kt new file mode 100644 index 0000000..1ca0bff --- /dev/null +++ b/app/src/main/java/uk/co/blatech/blaupload3/model/Image.kt @@ -0,0 +1,7 @@ +//package uk.co.blatech.blaupload3.model +// +//import android.graphics.Bitmap +// +//class Image(filename: String, image: Bitmap, type: String, modified: Long, size: Long) : File(filename, type, modified, size) { +// +//} \ No newline at end of file diff --git a/app/src/main/java/uk/co/blatech/blaupload3/model/Video.kt b/app/src/main/java/uk/co/blatech/blaupload3/model/Video.kt new file mode 100644 index 0000000..5882114 --- /dev/null +++ b/app/src/main/java/uk/co/blatech/blaupload3/model/Video.kt @@ -0,0 +1,4 @@ +//package uk.co.blatech.blaupload3.model +// +//class Video(filename: String, type: String, modified: Long, size: Long) : File(filename, type, modified, size) { +//} \ No newline at end of file diff --git a/app/src/main/java/uk/co/blatech/blaupload3/util/AppController.kt b/app/src/main/java/uk/co/blatech/blaupload3/util/AppController.kt new file mode 100644 index 0000000..feb0b6d --- /dev/null +++ b/app/src/main/java/uk/co/blatech/blaupload3/util/AppController.kt @@ -0,0 +1,67 @@ +package uk.co.blatech.blaupload3.util + +import android.app.Application +import android.text.TextUtils +import com.android.volley.Request +import com.android.volley.RequestQueue +import com.android.volley.toolbox.ImageLoader +import com.android.volley.toolbox.Volley + + +class AppController : Application() { + + private var mRequestQueue: RequestQueue? = null + private var mImageLoader: ImageLoader? = null + + val requestQueue: RequestQueue + get() { + if (mRequestQueue == null) { + mRequestQueue = Volley.newRequestQueue(applicationContext) + } + + return mRequestQueue!! + } + + val imageLoader: ImageLoader + get() { + requestQueue + if (mImageLoader == null) { + mImageLoader = ImageLoader( + this.mRequestQueue, + LruBitmapCache() + ) + } + return mImageLoader!! + } + + override fun onCreate() { + super.onCreate() + instance = this + } + + fun addToRequestQueue(req: Request, tag: String) { + // set the default tag if tag is empty + req.tag = if (TextUtils.isEmpty(tag)) TAG else tag + requestQueue.add(req) + } + + fun addToRequestQueue(req: Request) { + req.tag = TAG + requestQueue.add(req) + } + + fun cancelPendingRequests(tag: Any) { + if (mRequestQueue != null) { + mRequestQueue!!.cancelAll(tag) + } + } + + companion object { + + val TAG = AppController::class.java.simpleName + + @get:Synchronized + var instance: AppController? = null + private set + } +} \ No newline at end of file diff --git a/app/src/main/java/uk/co/blatech/blaupload3/util/Config.kt b/app/src/main/java/uk/co/blatech/blaupload3/util/Config.kt new file mode 100644 index 0000000..2b7356b --- /dev/null +++ b/app/src/main/java/uk/co/blatech/blaupload3/util/Config.kt @@ -0,0 +1,12 @@ +//package uk.co.blatech.blaupload3.util +// +//import com.natpryce.konfig.* +//import com.natpryce.konfig.ConfigurationProperties.Companion.systemProperties +// +//class Config { +// val server_url = Key("server.url", stringType) +// +// val config = systemProperties() overriding +// EnvironmentVariables() overriding +// ConfigurationProperties.fromResource("application.properties") +//} \ No newline at end of file diff --git a/app/src/main/java/uk/co/blatech/blaupload3/util/FileListAdapter.kt b/app/src/main/java/uk/co/blatech/blaupload3/util/FileListAdapter.kt new file mode 100644 index 0000000..b32fe6c --- /dev/null +++ b/app/src/main/java/uk/co/blatech/blaupload3/util/FileListAdapter.kt @@ -0,0 +1,37 @@ +package uk.co.blatech.blaupload3.util + +import android.content.Context +import android.view.LayoutInflater +import android.view.View +import android.view.ViewGroup +import android.widget.BaseAdapter +import uk.co.blatech.blaupload3.model.File +import kotlinx.android.synthetic.main.file_list_row.view.* +import uk.co.blatech.blaupload3.R + + +class FileListAdapter(private val context: Context, private val fileList : ArrayList) : BaseAdapter() { + private val infater: LayoutInflater = context.getSystemService(Context.LAYOUT_INFLATER_SERVICE) as LayoutInflater + var imageLoader = AppController.instance?.imageLoader + override fun getView(position: Int, convertView: View?, parent: ViewGroup?): View { + val listRow = infater.inflate(R.layout.file_list_row, parent, false) + listRow.list_filename.text = fileList[position].filename + listRow.list_modified.text = fileList[position].modified_formatted.toString() + listRow.list_size.text = fileList[position].size_formatted + listRow.list_thumbnail.setImageUrl(fileList[position].thumb_url.toASCIIString(), imageLoader) + return listRow + } + + override fun getItem(position: Int): Any { + return fileList[position] + } + + override fun getItemId(position: Int): Long { + return position.toLong() + } + + override fun getCount(): Int { + return fileList.size + } + +} \ No newline at end of file diff --git a/app/src/main/java/uk/co/blatech/blaupload3/util/JSONLoader.kt b/app/src/main/java/uk/co/blatech/blaupload3/util/JSONLoader.kt new file mode 100644 index 0000000..dff7043 --- /dev/null +++ b/app/src/main/java/uk/co/blatech/blaupload3/util/JSONLoader.kt @@ -0,0 +1,43 @@ +package uk.co.blatech.blaupload3.util + +import android.content.Context +import android.util.Log +import android.widget.ListView +import com.android.volley.Request +import com.android.volley.Response +import com.android.volley.toolbox.JsonArrayRequest +import com.android.volley.toolbox.Volley +import org.json.JSONArray +import uk.co.blatech.blaupload3.model.File + + +class JSONLoader { + companion object { + + fun getJsonListing(context: Context?, listView: ListView) { + val queue = Volley.newRequestQueue(context) + val url = "http://wupload.of.je/?format=json" + var fileList = ArrayList() + val jsonRequest = JsonArrayRequest( + Request.Method.GET, + url, + null, + Response.Listener { response -> + + for (i in 0 until response.length()) { + var jsonObj = response.getJSONObject(i) + var upload: File = File(filename =jsonObj.getString("filename"), type = jsonObj.getString("type"), modified = jsonObj.getLong("modified"), size = jsonObj.getLong("size")) + fileList.add(upload) + + + } + if (context != null) { + listView.adapter = FileListAdapter(context, fileList) + } + }, + Response.ErrorListener { Log.e("json error", "narp")}) + queue.add(jsonRequest) + + } + } +} \ No newline at end of file diff --git a/app/src/main/java/uk/co/blatech/blaupload3/util/LruBitmapCache.kt b/app/src/main/java/uk/co/blatech/blaupload3/util/LruBitmapCache.kt new file mode 100644 index 0000000..7fcc62e --- /dev/null +++ b/app/src/main/java/uk/co/blatech/blaupload3/util/LruBitmapCache.kt @@ -0,0 +1,28 @@ +package uk.co.blatech.blaupload3.util + +import android.graphics.Bitmap +import android.util.LruCache +import com.android.volley.toolbox.ImageLoader + +class LruBitmapCache constructor(sizeInKB: Int = defaultLruCacheSize): + LruCache(sizeInKB), ImageLoader.ImageCache { + override fun sizeOf(key: String, value: Bitmap): Int = value.rowBytes * value.height / 1024 + + override fun getBitmap(url: String): Bitmap? { + return get(url) + } + + override fun putBitmap(url: String, bitmap: Bitmap) { + put(url, bitmap) + } + + companion object { + val defaultLruCacheSize: Int + get() { + val maxMemory = (Runtime.getRuntime().maxMemory() / 1024).toInt() + val cacheSize = maxMemory / 8 + return cacheSize + } + } + +} \ No newline at end of file diff --git a/app/src/main/java/uk/co/blatech/blaupload3/view/ListFragment.kt b/app/src/main/java/uk/co/blatech/blaupload3/view/ListFragment.kt new file mode 100644 index 0000000..87a3db5 --- /dev/null +++ b/app/src/main/java/uk/co/blatech/blaupload3/view/ListFragment.kt @@ -0,0 +1,21 @@ +package uk.co.blatech.blaupload3.view + +import android.os.Bundle +import android.view.LayoutInflater +import android.view.View +import android.view.ViewGroup +import androidx.fragment.app.Fragment +import uk.co.blatech.blaupload3.R +import uk.co.blatech.blaupload3.util.JSONLoader + +class ListFragment : Fragment() { + + override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { + super.onCreate(savedInstanceState) + return inflater.inflate(R.layout.list_fragment, container, false) + + } + override fun onViewCreated(view: View, savedInstanceState: Bundle?) { + JSONLoader.getJsonListing(activity?.applicationContext, activity?.findViewById(R.id.file_list)!!) + } +} \ No newline at end of file diff --git a/app/src/main/java/uk/co/blatech/blaupload3/view/MainActivity.kt b/app/src/main/java/uk/co/blatech/blaupload3/view/MainActivity.kt new file mode 100644 index 0000000..1d4b7a5 --- /dev/null +++ b/app/src/main/java/uk/co/blatech/blaupload3/view/MainActivity.kt @@ -0,0 +1,70 @@ +package uk.co.blatech.blaupload3.view + +import android.os.Bundle +import androidx.appcompat.app.AppCompatActivity +import android.view.Menu +import android.view.MenuItem +import androidx.navigation.NavController +import kotlinx.android.synthetic.main.activity_main.* +import androidx.navigation.Navigation +import androidx.navigation.ui.NavigationUI +import com.google.android.material.navigation.NavigationView +import uk.co.blatech.blaupload3.R + + +class MainActivity : AppCompatActivity(), NavigationView.OnNavigationItemSelectedListener { + + private lateinit var navController : NavController + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + navController = Navigation.findNavController(this, R.id.nav_host_fragment) + NavigationUI.setupWithNavController(nav_view, navController) + nav_view.setNavigationItemSelectedListener(this) + + } + + + override fun onCreateOptionsMenu(menu: Menu): Boolean { + + // Inflate the menu; this adds items to the action bar if it is present. + menuInflater.inflate(R.menu.main, menu) + return true + } + + override fun onOptionsItemSelected(item: MenuItem): Boolean { + // Handle action bar item clicks here. The action bar will + // automatically handle clicks on the Home/Up button, so long + // as you specify a parent activity in AndroidManifest.xml. + when (item.itemId) { + R.id.action_settings -> return true + else -> return super.onOptionsItemSelected(item) + } + } + + override fun onNavigationItemSelected(item: MenuItem): Boolean { + // Handle navigation view item clicks here. + when (item.itemId) { + R.id.nav_upload -> { + + // Handle the camera action + } + R.id.nav_gallery -> { + navController.navigate(R.id.file_list) +// } + } + R.id.nav_settings -> { + + } + R.id.nav_share -> { + + } + R.id.nav_send -> { + + } + } + +// drawer_layout.closeDrawer(GravityCompat.START) + return true + } +} diff --git a/app/src/main/res/drawable-v21/ic_menu_camera.xml b/app/src/main/res/drawable-v21/ic_menu_camera.xml new file mode 100644 index 0000000..41688d5 --- /dev/null +++ b/app/src/main/res/drawable-v21/ic_menu_camera.xml @@ -0,0 +1,12 @@ + + + + diff --git a/app/src/main/res/drawable-v21/ic_menu_gallery.xml b/app/src/main/res/drawable-v21/ic_menu_gallery.xml new file mode 100644 index 0000000..ff8ce52 --- /dev/null +++ b/app/src/main/res/drawable-v21/ic_menu_gallery.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable-v21/ic_menu_manage.xml b/app/src/main/res/drawable-v21/ic_menu_manage.xml new file mode 100644 index 0000000..a0e423c --- /dev/null +++ b/app/src/main/res/drawable-v21/ic_menu_manage.xml @@ -0,0 +1,9 @@ + + + \ No newline at end of file diff --git a/app/src/main/res/drawable-v21/ic_menu_send.xml b/app/src/main/res/drawable-v21/ic_menu_send.xml new file mode 100644 index 0000000..9745066 --- /dev/null +++ b/app/src/main/res/drawable-v21/ic_menu_send.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable-v21/ic_menu_share.xml b/app/src/main/res/drawable-v21/ic_menu_share.xml new file mode 100644 index 0000000..b3e39e2 --- /dev/null +++ b/app/src/main/res/drawable-v21/ic_menu_share.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable-v21/ic_menu_slideshow.xml b/app/src/main/res/drawable-v21/ic_menu_slideshow.xml new file mode 100644 index 0000000..ae51e49 --- /dev/null +++ b/app/src/main/res/drawable-v21/ic_menu_slideshow.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/app/src/main/res/drawable-v24/ic_launcher_foreground.xml new file mode 100644 index 0000000..6348baa --- /dev/null +++ b/app/src/main/res/drawable-v24/ic_launcher_foreground.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + diff --git a/app/src/main/res/drawable/ic_launcher_background.xml b/app/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 0000000..a0ad202 --- /dev/null +++ b/app/src/main/res/drawable/ic_launcher_background.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/side_nav_bar.xml b/app/src/main/res/drawable/side_nav_bar.xml new file mode 100644 index 0000000..a33798b --- /dev/null +++ b/app/src/main/res/drawable/side_nav_bar.xml @@ -0,0 +1,9 @@ + + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml new file mode 100644 index 0000000..4cc95a2 --- /dev/null +++ b/app/src/main/res/layout/activity_main.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + diff --git a/app/src/main/res/layout/app_bar_main.xml b/app/src/main/res/layout/app_bar_main.xml new file mode 100644 index 0000000..d2e32b7 --- /dev/null +++ b/app/src/main/res/layout/app_bar_main.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/content_main.xml b/app/src/main/res/layout/content_main.xml new file mode 100644 index 0000000..1107ca8 --- /dev/null +++ b/app/src/main/res/layout/content_main.xml @@ -0,0 +1,21 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/file_list_row.xml b/app/src/main/res/layout/file_list_row.xml new file mode 100644 index 0000000..fe6c34c --- /dev/null +++ b/app/src/main/res/layout/file_list_row.xml @@ -0,0 +1,40 @@ + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/image_list_item.xml b/app/src/main/res/layout/image_list_item.xml new file mode 100644 index 0000000..6c159a4 --- /dev/null +++ b/app/src/main/res/layout/image_list_item.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/list_fragment.xml b/app/src/main/res/layout/list_fragment.xml new file mode 100644 index 0000000..573c7ed --- /dev/null +++ b/app/src/main/res/layout/list_fragment.xml @@ -0,0 +1,13 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/nav_header_main.xml b/app/src/main/res/layout/nav_header_main.xml new file mode 100644 index 0000000..92ca611 --- /dev/null +++ b/app/src/main/res/layout/nav_header_main.xml @@ -0,0 +1,37 @@ + + + + + + + + + + diff --git a/app/src/main/res/menu/activity_main_drawer.xml b/app/src/main/res/menu/activity_main_drawer.xml new file mode 100644 index 0000000..cab4f73 --- /dev/null +++ b/app/src/main/res/menu/activity_main_drawer.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/menu/main.xml b/app/src/main/res/menu/main.xml new file mode 100644 index 0000000..d579f6f --- /dev/null +++ b/app/src/main/res/menu/main.xml @@ -0,0 +1,8 @@ + + + + diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 0000000..bbd3e02 --- /dev/null +++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 0000000..bbd3e02 --- /dev/null +++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.png b/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000..898f3ed Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/app/src/main/res/mipmap-hdpi/ic_launcher_round.png new file mode 100644 index 0000000..dffca36 Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.png b/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000..64ba76f Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/app/src/main/res/mipmap-mdpi/ic_launcher_round.png new file mode 100644 index 0000000..dae5e08 Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000..e5ed465 Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png new file mode 100644 index 0000000..14ed0af Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000..b0907ca Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png new file mode 100644 index 0000000..d8ae031 Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000..2c18de9 Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png new file mode 100644 index 0000000..beed3cd Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ diff --git a/app/src/main/res/navigation/nav_graph.xml b/app/src/main/res/navigation/nav_graph.xml new file mode 100644 index 0000000..ef2595c --- /dev/null +++ b/app/src/main/res/navigation/nav_graph.xml @@ -0,0 +1,18 @@ + + +> + + + \ No newline at end of file diff --git a/app/src/main/res/values-v21/styles.xml b/app/src/main/res/values-v21/styles.xml new file mode 100644 index 0000000..e546804 --- /dev/null +++ b/app/src/main/res/values-v21/styles.xml @@ -0,0 +1,7 @@ + + + diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml new file mode 100644 index 0000000..69b2233 --- /dev/null +++ b/app/src/main/res/values/colors.xml @@ -0,0 +1,6 @@ + + + #008577 + #00574B + #D81B60 + diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml new file mode 100644 index 0000000..4ab4520 --- /dev/null +++ b/app/src/main/res/values/dimens.xml @@ -0,0 +1,8 @@ + + + 16dp + 16dp + 8dp + 176dp + 16dp + \ No newline at end of file diff --git a/app/src/main/res/values/drawables.xml b/app/src/main/res/values/drawables.xml new file mode 100644 index 0000000..52c6a6c --- /dev/null +++ b/app/src/main/res/values/drawables.xml @@ -0,0 +1,8 @@ + + @android:drawable/ic_menu_camera + @android:drawable/ic_menu_gallery + @android:drawable/ic_menu_slideshow + @android:drawable/ic_menu_manage + @android:drawable/ic_menu_share + @android:drawable/ic_menu_send + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml new file mode 100644 index 0000000..e84590e --- /dev/null +++ b/app/src/main/res/values/strings.xml @@ -0,0 +1,9 @@ + + Blaupload3 + Open navigation drawer + Close navigation drawer + Blaupload + android.studio@android.com + Navigation header + Settings + diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml new file mode 100644 index 0000000..16dbab3 --- /dev/null +++ b/app/src/main/res/values/styles.xml @@ -0,0 +1,17 @@ + + + + + +