Browse Source

ui adjustments

pull/50/head
Thodoris1999 6 years ago
parent
commit
6df88a4c02
  1. 8
      app/src/main/java/gr/thmmy/mthmmy/activities/upload/UploadActivity.java
  2. 2
      app/src/main/java/gr/thmmy/mthmmy/activities/upload/UploadFieldsBuilderActivity.java
  3. 46
      app/src/main/res/layout/activity_upload.xml
  4. 3
      app/src/main/res/values/strings.xml

8
app/src/main/java/gr/thmmy/mthmmy/activities/upload/UploadActivity.java

@ -5,16 +5,12 @@ import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import android.content.pm.ResolveInfo; import android.content.pm.ResolveInfo;
import android.database.Cursor;
import android.graphics.Bitmap; import android.graphics.Bitmap;
import android.graphics.drawable.Drawable; import android.graphics.drawable.Drawable;
import android.net.Uri; import android.net.Uri;
import android.os.AsyncTask; import android.os.AsyncTask;
import android.os.Bundle; import android.os.Bundle;
import android.provider.MediaStore; import android.provider.MediaStore;
import android.provider.OpenableColumns;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v7.app.AlertDialog; import android.support.v7.app.AlertDialog;
import android.support.v7.content.res.AppCompatResources; import android.support.v7.content.res.AppCompatResources;
import android.support.v7.preference.PreferenceManager; import android.support.v7.preference.PreferenceManager;
@ -37,12 +33,8 @@ import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element; import org.jsoup.nodes.Element;
import org.jsoup.select.Elements; import org.jsoup.select.Elements;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File; import java.io.File;
import java.io.FileOutputStream; import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;

2
app/src/main/java/gr/thmmy/mthmmy/activities/upload/UploadFieldsBuilderActivity.java

@ -87,7 +87,7 @@ public class UploadFieldsBuilderActivity extends AppCompatActivity {
//Initialize toolbar //Initialize toolbar
Toolbar toolbar = findViewById(R.id.toolbar); Toolbar toolbar = findViewById(R.id.toolbar);
toolbar.setTitle("Upload fields builder"); toolbar.setTitle(R.string.upload_fields_builder_toolbar_title);
setSupportActionBar(toolbar); setSupportActionBar(toolbar);
if (getSupportActionBar() != null) { if (getSupportActionBar() != null) {
getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setDisplayHomeAsUpEnabled(true);

46
app/src/main/res/layout/activity_upload.xml

@ -117,25 +117,33 @@
android:maxLines="3" /> android:maxLines="3" />
</android.support.design.widget.TextInputLayout> </android.support.design.widget.TextInputLayout>
<android.support.v7.widget.AppCompatButton <LinearLayout
android:id="@+id/upload_select_file_button" android:layout_width="match_parent"
android:layout_width="wrap_content" android:layout_height="wrap_content">
android:layout_height="wrap_content" <View
android:layout_gravity="center" android:layout_width="0dp"
android:drawablePadding="5dp" android:layout_height="0dp"
android:gravity="center_vertical" android:layout_weight="1" />
android:text="@string/upload_select_file" <android.support.v7.widget.AppCompatButton
android:textColor="@color/primary_text" /> android:id="@+id/upload_select_file_button"
android:layout_width="wrap_content"
<android.support.v7.widget.AppCompatButton android:layout_height="wrap_content"
android:id="@+id/upload_upload_button" android:layout_gravity="end"
android:layout_width="wrap_content" android:drawablePadding="5dp"
android:layout_height="wrap_content" android:gravity="center_vertical"
android:layout_gravity="center" android:text="@string/upload_select_file"
android:gravity="center_vertical" android:textColor="@color/primary_text" />
android:text="@string/upload_upload_button"
android:textAlignment="center" <android.support.v7.widget.AppCompatButton
android:textColor="@color/accent" /> android:id="@+id/upload_upload_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:gravity="center_vertical"
android:text="@string/upload_upload_button"
android:textAlignment="center"
android:textColor="@color/accent" />
</LinearLayout>
</LinearLayout> </LinearLayout>
</ScrollView> </ScrollView>

3
app/src/main/res/values/strings.xml

@ -129,7 +129,7 @@
<string name="upload_fields_builder_radio_button_sept">September</string> <string name="upload_fields_builder_radio_button_sept">September</string>
<string name="upload_fields_builder_select_year_title">Select year</string> <string name="upload_fields_builder_select_year_title">Select year</string>
<string name="upload_fields_builder_year_hint">Year</string> <string name="upload_fields_builder_year_hint">Year</string>
<string name="upload_fields_builder_submit">Build</string> <string name="upload_fields_builder_submit">Generate</string>
<!--Settings Activity--> <!--Settings Activity-->
<string name="action_settings">Settings</string> <string name="action_settings">Settings</string>
@ -156,4 +156,5 @@
<string name="pref_category_uploading">Uploading</string> <string name="pref_category_uploading">Uploading</string>
<string name="pref_title_uploading_app_signature_enable">App signature</string> <string name="pref_title_uploading_app_signature_enable">App signature</string>
<string name="pref_summary_uploading_app_signature_enable">If enabled, an \"uploaded from mTHMMY\" message will be inserted at the end of your uploads descriptions</string> <string name="pref_summary_uploading_app_signature_enable">If enabled, an \"uploaded from mTHMMY\" message will be inserted at the end of your uploads descriptions</string>
<string name="upload_fields_builder_toolbar_title">Upload fields generator</string>
</resources> </resources>

Loading…
Cancel
Save