Update Gradle Version, Change Support Library to AndroidX and support dark theme

pull/9/head
Schoumi 2 weeks ago
parent 71cc375d13
commit d4350e83d3
  1. 20
      app/build.gradle
  2. 17
      app/src/main/AndroidManifest.xml
  3. 3
      app/src/main/java/fr/mobdev/goblim/ImageListAdapter.java
  4. 6
      app/src/main/java/fr/mobdev/goblim/MultiLinkAdapter.java
  5. 11
      app/src/main/java/fr/mobdev/goblim/activity/HistoryActivity.java
  6. 7
      app/src/main/java/fr/mobdev/goblim/activity/LinkActivity.java
  7. 11
      app/src/main/java/fr/mobdev/goblim/activity/MultiLinkActivity.java
  8. 7
      app/src/main/java/fr/mobdev/goblim/activity/ServersActivity.java
  9. 34
      app/src/main/java/fr/mobdev/goblim/activity/UploadActivity.java
  10. 8
      app/src/main/java/fr/mobdev/goblim/dialog/ServerDialog.java
  11. 24
      app/src/main/res/layout-land/upload.xml
  12. 23
      app/src/main/res/layout/history.xml
  13. 26
      app/src/main/res/layout/link.xml
  14. 28
      app/src/main/res/layout/multilink.xml
  15. 2
      app/src/main/res/layout/server_item.xml
  16. 18
      app/src/main/res/layout/servers.xml
  17. 12
      app/src/main/res/layout/thumb_items.xml
  18. 24
      app/src/main/res/layout/upload.xml
  19. 8
      app/src/main/res/values-night/colors.xml
  20. 8
      app/src/main/res/values-v21/styles.xml
  21. 9
      app/src/main/res/values-v23/styles.xml
  22. 6
      app/src/main/res/values-w820dp/dimens.xml
  23. 4
      app/src/main/res/values/colors.xml
  24. 24
      app/src/main/res/values/styles.xml
  25. 8
      build.gradle
  26. 15
      gradle.properties
  27. BIN
      gradle/wrapper/gradle-wrapper.jar
  28. 3
      gradle/wrapper/gradle-wrapper.properties
  29. 78
      gradlew
  30. 14
      gradlew.bat

@ -1,13 +1,12 @@
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.3"
compileSdkVersion 32
defaultConfig {
applicationId "fr.mobdev.goblim"
minSdkVersion 15
targetSdkVersion 25
minSdkVersion 21
targetSdkVersion 32
versionCode 11
versionName "2.8"
}
@ -18,15 +17,16 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
checkReleaseBuilds false
lint {
abortOnError false
checkReleaseBuilds false
}
namespace 'fr.mobdev.goblim'
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.activity:activity:1.5.1'
implementation 'com.google.android.material:material:1.6.1'
}

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="fr.mobdev.goblim">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
@ -14,8 +13,8 @@
android:theme="@style/AppTheme">
<activity
android:name=".activity.UploadActivity"
android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar">
android:theme="@style/AppTheme"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.SEND" />
@ -33,8 +32,8 @@
</activity>
<activity
android:name=".activity.HistoryActivity"
android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar">
android:theme="@style/AppTheme"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
@ -44,15 +43,15 @@
<activity
android:name=".activity.LinkActivity"
android:label="@string/title_activity_link"
android:theme="@style/AppTheme.NoActionBar"/>
android:theme="@style/AppTheme"/>
<activity
android:name=".activity.ServersActivity"
android:label="@string/title_activity_servers"
android:theme="@style/AppTheme.NoActionBar"/>
android:theme="@style/AppTheme"/>
<activity
android:name=".activity.MultiLinkActivity"
android:label="@string/title_share_links"
android:theme="@style/AppTheme.NoActionBar"/>
android:theme="@style/AppTheme"/>
</application>
</manifest>

@ -21,13 +21,14 @@ package fr.mobdev.goblim;
import android.content.Context;
import android.graphics.Bitmap;
import android.net.Uri;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.ProgressBar;
import androidx.recyclerview.widget.RecyclerView;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;

@ -18,8 +18,8 @@
package fr.mobdev.goblim;
import android.annotation.SuppressLint;
import android.graphics.Bitmap;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@ -27,6 +27,8 @@ import android.widget.CheckBox;
import android.widget.ImageView;
import android.widget.ProgressBar;
import androidx.recyclerview.widget.RecyclerView;
import java.util.ArrayList;
import java.util.List;
@ -85,7 +87,7 @@ public class MultiLinkAdapter extends RecyclerView.Adapter<MultiLinkViewHolder>{
}
@Override
public void onBindViewHolder(MultiLinkViewHolder holder, int position) {
public void onBindViewHolder(MultiLinkViewHolder holder, @SuppressLint("RecyclerView") int position) {
Bitmap bt = bitmaps.get(position);
if(bt != null) {
holder.progress.setVisibility(View.GONE);

@ -23,10 +23,6 @@ import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.Typeface;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.design.widget.FloatingActionButton;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
@ -38,6 +34,11 @@ import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import java.text.DateFormat;
import java.util.ArrayList;
import java.util.Calendar;
@ -63,8 +64,6 @@ public class HistoryActivity extends AppCompatActivity {
super.onCreate(savedInstanceState);
setContentView(R.layout.history);
Toolbar toolbar = (Toolbar) findViewById(R.id.history_toolbar);
setSupportActionBar(toolbar);
FloatingActionButton new_image_button = (FloatingActionButton) findViewById(R.id.new_image_button);
new_image_button.setOnClickListener(new View.OnClickListener() {

@ -23,8 +23,6 @@ import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.Typeface;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.widget.ImageButton;
import android.widget.ImageView;
@ -33,6 +31,8 @@ import android.widget.TextView;
import android.content.ClipboardManager;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
@ -54,9 +54,6 @@ public class LinkActivity extends AppCompatActivity {
super.onCreate(savedInstanceState);
setContentView(R.layout.link);
Toolbar toolbar = (Toolbar) findViewById(R.id.link_toolbar);
setSupportActionBar(toolbar);
//get url information
Intent receiveIntent = getIntent();
Long imageId = receiveIntent.getLongExtra("imageId", -1);

@ -23,16 +23,16 @@ import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.Typeface;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.widget.ImageButton;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.RecyclerView;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@ -57,9 +57,6 @@ public class MultiLinkActivity extends AppCompatActivity {
super.onCreate(savedInstanceState);
setContentView(R.layout.multilink);
Toolbar toolbar = (Toolbar) findViewById(R.id.link_toolbar);
setSupportActionBar(toolbar);
//get url information
Intent receiveIntent = getIntent();
Object[] extra = (Object[]) receiveIntent.getSerializableExtra("imageIds");

@ -23,8 +23,6 @@ import android.content.Context;
import android.content.DialogInterface;
import android.graphics.Typeface;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
@ -36,6 +34,8 @@ import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import java.util.ArrayList;
import java.util.List;
@ -59,9 +59,6 @@ public class ServersActivity extends AppCompatActivity {
super.onCreate(savedInstanceState);
setContentView(R.layout.servers);
Toolbar toolbar = (Toolbar) findViewById(R.id.servers_toolbar);
setSupportActionBar(toolbar);
ListView serverList = (ListView) findViewById(R.id.servers_list);
serverList.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() {
@Override

@ -30,11 +30,6 @@ import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.provider.OpenableColumns;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
@ -47,6 +42,11 @@ import android.widget.LinearLayout;
import android.widget.Spinner;
import android.widget.Toast;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileOutputStream;
@ -93,9 +93,6 @@ public class UploadActivity extends AppCompatActivity {
setContentView(R.layout.upload);
uploadInProgress = false;
Toolbar toolbar = (Toolbar) findViewById(R.id.upload_toolbar);
setSupportActionBar(toolbar);
setTitle(R.string.upload_pict);
hideImage();
@ -595,37 +592,36 @@ public class UploadActivity extends AppCompatActivity {
//ask for image file
Intent requestFileIntent = new Intent(Intent.ACTION_PICK);
requestFileIntent.setType("image/*");
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2)
requestFileIntent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE,true);
requestFileIntent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE,true);
startActivityForResult(requestFileIntent, 0);
}
@Override
public void onActivityResult(int requestCode, int resultCode,Intent returnIntent) {
if(resultCode == RESULT_OK){
super.onActivityResult(requestCode, resultCode, returnIntent);
if (resultCode == RESULT_OK) {
//retrieve uri from the request image activity and prepare
ClipData clip = null;
boolean hasAddUri = false;
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2)
clip = returnIntent.getClipData();
clip = returnIntent.getClipData();
LinearLayout infosLayout = (LinearLayout) findViewById(R.id.info_layout);
FrameLayout dataLayout = (FrameLayout) findViewById(R.id.data_layout);
if(clip == null) {
if (clip == null) {
Uri imageUri = returnIntent.getData();
if(imageUri == null)
if (imageUri == null)
return;
uris.add(imageUri);
hasAddUri = true;
updateSpanCount();
adapter.addUri(this,imageUri);
adapter.addUri(this, imageUri);
infosLayout.setVisibility(View.GONE);
dataLayout.setVisibility(View.VISIBLE);
} else {
for(int i = 0; i < clip.getItemCount(); i++) {
for (int i = 0; i < clip.getItemCount(); i++) {
Uri imageUri = clip.getItemAt(i).getUri();
if(imageUri == null)
if (imageUri == null)
continue;
uris.add(imageUri);
hasAddUri = true;
@ -638,7 +634,7 @@ public class UploadActivity extends AppCompatActivity {
}
}
if(hasAddUri) {
if (hasAddUri) {
Button uploadBt = (Button) findViewById(R.id.upload_button);
uploadBt.setEnabled(false);
}

@ -22,11 +22,12 @@ import android.app.AlertDialog;
import android.app.Dialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import android.view.View;
import android.widget.EditText;
import android.widget.Spinner;
import android.support.annotation.NonNull;
import androidx.annotation.NonNull;
import androidx.fragment.app.DialogFragment;
import fr.mobdev.goblim.Database;
import fr.mobdev.goblim.listener.ServerListener;
@ -46,7 +47,8 @@ public class ServerDialog extends DialogFragment {
}
@Override
public @NonNull Dialog onCreateDialog(Bundle savedInstanceState)
public @NonNull
Dialog onCreateDialog(Bundle savedInstanceState)
{
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
final View view = View.inflate(getActivity(),R.layout.server_dialog, null);

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
<androidx.coordinatorlayout.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
@ -9,20 +9,6 @@
tools:context="fr.mobdev.goblim.activity.HistoryActivity"
>
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.PopupOverlay">
<android.support.v7.widget.Toolbar
android:id="@+id/upload_toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="@style/AppTheme.PopupOverlay"
/>
</android.support.design.widget.AppBarLayout>
<RelativeLayout
app:layout_behavior="@string/appbar_scrolling_view_behavior"
android:paddingLeft="@dimen/activity_horizontal_margin"
@ -90,7 +76,7 @@
android:gravity="center"
>
<ImageView
android:src="@android:drawable/ic_menu_add"
android:src="@drawable/add_photo"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
@ -110,11 +96,11 @@
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
>
<android.support.v7.widget.RecyclerView
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/imageList"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layoutManager="android.support.v7.widget.GridLayoutManager"
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
/>
<ImageView
android:id="@+id/thumbnail_main"
@ -124,4 +110,4 @@
</FrameLayout>
</RelativeLayout>
</android.support.design.widget.CoordinatorLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
<androidx.coordinatorlayout.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
@ -8,21 +8,6 @@
android:layout_width="match_parent"
tools:context="fr.mobdev.goblim.activity.HistoryActivity"
>
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.PopupOverlay">
<android.support.v7.widget.Toolbar
android:id="@+id/history_toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="@style/AppTheme.PopupOverlay"
/>
</android.support.design.widget.AppBarLayout>
<RelativeLayout
app:layout_behavior="@string/appbar_scrolling_view_behavior"
android:paddingLeft="@dimen/activity_horizontal_margin"
@ -40,15 +25,15 @@
</RelativeLayout>
<android.support.design.widget.FloatingActionButton
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/new_image_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="16dp"
android:src="@android:drawable/stat_sys_upload"
android:src="@drawable/file_upload"
app:borderWidth="0dp"
app:elevation="0dp"
/>
</android.support.design.widget.CoordinatorLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
<androidx.coordinatorlayout.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
@ -8,21 +8,6 @@
android:layout_width="match_parent"
tools:context="fr.mobdev.goblim.activity.LinkActivity"
>
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.PopupOverlay">
<android.support.v7.widget.Toolbar
android:id="@+id/link_toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="@style/AppTheme.PopupOverlay"
/>
</android.support.design.widget.AppBarLayout>
<RelativeLayout
app:layout_behavior="@string/appbar_scrolling_view_behavior"
android:paddingLeft="@dimen/activity_horizontal_margin"
@ -46,6 +31,7 @@
android:layout_above="@+id/buttons_layout"
android:layout_centerHorizontal="true"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="https://pouet.net"
android:gravity="center_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -64,24 +50,24 @@
>
<ImageButton
android:id="@+id/copy_clipboard_button"
android:src="@drawable/abc_ic_menu_copy_mtrl_am_alpha"
android:src="@drawable/copy"
android:layout_width="60dp"
android:layout_height="60dp"
/>
<ImageButton
android:src="@android:drawable/ic_menu_share"
android:src="@drawable/share"
android:id="@+id/share_button"
android:layout_width="60dp"
android:layout_height="60dp"
/>
<ImageButton
android:src="@android:drawable/ic_menu_delete"
android:src="@drawable/delete"
android:layout_width="60dp"
android:layout_height="60dp"
android:id="@+id/delete_button"
/>
</LinearLayout>
</RelativeLayout>
</android.support.design.widget.CoordinatorLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
<androidx.coordinatorlayout.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
@ -9,20 +9,6 @@
tools:context="fr.mobdev.goblim.activity.MultiLinkActivity"
>
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.PopupOverlay">
<android.support.v7.widget.Toolbar
android:id="@+id/link_toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="@style/AppTheme.PopupOverlay"
/>
</android.support.design.widget.AppBarLayout>
<RelativeLayout
app:layout_behavior="@string/appbar_scrolling_view_behavior"
android:paddingBottom="@dimen/activity_vertical_margin"
@ -32,14 +18,14 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
<androidx.recyclerview.widget.RecyclerView
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_above="@+id/link"
android:id="@+id/link_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layoutManager="android.support.v7.widget.GridLayoutManager"
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
app:spanCount="2"/>
<TextView
@ -64,24 +50,24 @@
>
<ImageButton
android:id="@+id/copy_clipboard_button"
android:src="@drawable/abc_ic_menu_copy_mtrl_am_alpha"
android:src="@drawable/copy"
android:layout_width="60dp"
android:layout_height="60dp"
/>
<ImageButton
android:src="@android:drawable/ic_menu_share"
android:src="@drawable/share"
android:id="@+id/share_button"
android:layout_width="60dp"
android:layout_height="60dp"
/>
<ImageButton
android:src="@android:drawable/ic_menu_delete"
android:src="@drawable/delete"
android:layout_width="60dp"
android:layout_height="60dp"
android:id="@+id/delete_button"
/>
</LinearLayout>
</RelativeLayout>
</android.support.design.widget.CoordinatorLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>

@ -5,7 +5,7 @@
<ImageView
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:src="@drawable/ic_action_remove"
android:src="@drawable/remove"
android:id="@+id/server_delete"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
<androidx.coordinatorlayout.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
@ -9,20 +9,6 @@
tools:context="fr.mobdev.goblim.activity.ServersActivity"
>
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.PopupOverlay">
<android.support.v7.widget.Toolbar
android:id="@+id/servers_toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="@style/AppTheme.PopupOverlay"
/>
</android.support.design.widget.AppBarLayout>
<RelativeLayout
app:layout_behavior="@string/appbar_scrolling_view_behavior"
android:paddingLeft="@dimen/activity_horizontal_margin"
@ -50,4 +36,4 @@
android:choiceMode="singleChoice"
/>
</RelativeLayout>
</android.support.design.widget.CoordinatorLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>

@ -17,15 +17,15 @@
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
/>
<ImageButton
android:id="@+id/reset_img"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_marginBottom="10dp"
android:src="@android:drawable/ic_delete"
android:id="@+id/reset_img"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_alignParentTop="true"
/>
android:layout_alignParentEnd="true"
android:layout_marginBottom="10dp"
android:scaleType="fitCenter"
android:background="@drawable/delete" />
</RelativeLayout>

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
<androidx.coordinatorlayout.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
@ -9,20 +9,6 @@
tools:context="fr.mobdev.goblim.activity.UploadActivity"
>
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.PopupOverlay">
<android.support.v7.widget.Toolbar
android:id="@+id/upload_toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="@style/AppTheme.PopupOverlay"
/>
</android.support.design.widget.AppBarLayout>
<RelativeLayout
app:layout_behavior="@string/appbar_scrolling_view_behavior"
android:paddingLeft="@dimen/activity_horizontal_margin"
@ -81,7 +67,7 @@
android:gravity="center"
>
<ImageView
android:src="@android:drawable/ic_menu_add"
android:src="@drawable/add_photo"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
@ -100,11 +86,11 @@
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
>
<android.support.v7.widget.RecyclerView
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/imageList"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layoutManager="android.support.v7.widget.GridLayoutManager"
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
/>
<ImageView
android:id="@+id/thumbnail_main"
@ -113,4 +99,4 @@
/>
</FrameLayout>
</RelativeLayout>
</android.support.design.widget.CoordinatorLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimaryDark">#c41b66</color>
<color name="colorPrimary">#ea619e</color>
<color name="colorAccent">#FFFFFF</color>
<color name="colorOnSecondary">#FFFFFF</color>
<color name="icon">#FFFFFF</color>
</resources>

@ -1,8 +0,0 @@
<resources>
<style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
<item name="android:statusBarColor">@android:color/transparent</item>
</style>
</resources>

@ -1,9 +0,0 @@
<resources>
<style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:titleTextColor">@android:color/black</item>
</style>
</resources>

@ -1,6 +0,0 @@
<resources>
<!-- Example customization of dimensions originally defined in res/values/dimens.xml
(such as screen margins) for screens with more than 820dp of available width. This
would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). -->
<dimen name="activity_horizontal_margin">64dp</dimen>
</resources>

@ -2,5 +2,7 @@
<resources>
<color name="colorPrimaryDark">#c41b66</color>
<color name="colorPrimary">#ea619e</color>
<color name="colorAccent">#a0c41b66</color>
<color name="colorAccent">#000000</color>
<color name="colorOnSecondary">#FFFFFF</color>
<color name="icon">#000000</color>
</resources>

@ -1,19 +1,31 @@
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<style name="AppTheme" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="android:navigationBarColor">@color/colorPrimaryDark</item>
<item name="floatingActionButtonStyle">@style/floatingActionButtonStyle</item>
<item name="actionBarStyle">@style/Widget.MaterialComponents.ActionBar.Primary</item>
<item name="colorControlNormal">@color/icon</item>
<item name="iconTint">@color/colorOnSecondary</item>
<item name="imageButtonStyle">@style/customImageButtonColor</item>
</style>
<style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<style name="customImageButtonColor" parent="Widget.AppCompat.ImageButton">
<item name="backgroundTint">@color/colorPrimary</item>
<item name="tint">@color/colorOnSecondary</item>
</style>
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar"/>
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Dark"/>
<style name="customFabColor" parent="" >
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorSecondary">@color/colorPrimary</item>
<item name="colorOnSecondary">@color/colorOnSecondary</item>
</style>
<style name="floatingActionButtonStyle" parent="Widget.MaterialComponents.FloatingActionButton">
<item name="materialThemeOverlay">@style/customFabColor</item>
</style>
</resources>

@ -2,10 +2,11 @@
buildscript {
repositories {
jcenter()
mavenCentral()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.android.tools.build:gradle:7.3.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
@ -14,7 +15,8 @@ buildscript {
allprojects {
repositories {
jcenter()
mavenCentral()
google()
}
}

@ -0,0 +1,15 @@
## For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
#
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx1024m -XX:MaxPermSize=256m
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
#
# When configured, Gradle will run in incubating parallel mode.
# 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
# org.gradle.parallel=true
#Fri Sep 16 10:11:32 CEST 2022
android.useAndroidX=true
android.enableJetifier=true

Binary file not shown.

@ -1,6 +1,5 @@
#Sat Mar 04 02:18:36 CET 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip

78
gradlew vendored

@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/usr/bin/env sh
##############################################################################
##
@ -6,20 +6,38 @@
##
##############################################################################
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn ( ) {
warn () {
echo "$*"
}
die ( ) {
die () {
echo
echo "$*"
echo
@ -30,6 +48,7 @@ die ( ) {
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
@ -40,31 +59,11 @@ case "`uname`" in
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac
# For Cygwin, ensure paths are in UNIX format before anything is touched.
if $cygwin ; then
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
fi
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >&-
APP_HOME="`pwd -P`"
cd "$SAVED" >&-
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
@ -90,7 +89,7 @@ location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
@ -114,6 +113,7 @@ fi
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
@ -154,11 +154,19 @@ if $cygwin ; then
esac
fi
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
APP_ARGS=$(save "$@")
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
exec "$JAVACMD" "$@"

14
gradlew.bat vendored

@ -8,14 +8,14 @@
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
@ -46,10 +46,9 @@ echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windowz variants
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args
:win9xME_args
@rem Slurp the command line arguments.
@ -60,11 +59,6 @@ set _SKIP=2
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
goto execute
:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$
:execute
@rem Setup the command line

Loading…
Cancel
Save