Skip to content

Commit

Permalink
Updated icon and example.
Browse files Browse the repository at this point in the history
  • Loading branch information
tej.singh committed Sep 11, 2019
1 parent 8baded0 commit 762cded
Show file tree
Hide file tree
Showing 27 changed files with 38 additions and 18 deletions.
6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
<activity
android:name=".MainActivity"
android:configChanges="orientation|screenSize"
android:label=""
android:theme="@style/AppTheme.TransparentStatusBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand Down
Binary file added app/src/main/ic_launcher-web.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

import android.graphics.Color;
import android.os.Bundle;
import android.text.Html;
import android.text.Spannable;
import android.text.SpannableString;
import android.text.Spanned;
import android.text.style.ForegroundColorSpan;
import android.view.Gravity;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.Toast;
Expand All @@ -20,7 +21,6 @@
import com.tejpratapsingh.pdfcreator.views.basic.PDFImageView;
import com.tejpratapsingh.pdfcreator.views.basic.PDFLineSeparatorView;
import com.tejpratapsingh.pdfcreator.views.basic.PDFTextView;
import com.tejpratapsingh.pdfcreator.views.basic.PDFView;

import java.io.File;

Expand Down Expand Up @@ -49,11 +49,13 @@ protected PDFHeaderView getHeaderView() {
PDFHorizontalView horizontalView = new PDFHorizontalView(getApplicationContext());

PDFImageView imageView = new PDFImageView(getApplicationContext());
imageView.setLayout(new LinearLayout.LayoutParams(
LinearLayout.LayoutParams imageLayoutParam = new LinearLayout.LayoutParams(
60,
60, 0));
60, 0);
imageView.setImageScale(ImageView.ScaleType.CENTER_INSIDE);
imageView.setImageResource(R.drawable.ic_focus);
imageView.setImageResource(R.mipmap.ic_launcher);
imageLayoutParam.setMargins(0, 0, 10, 0);
imageView.setLayout(imageLayoutParam);

horizontalView.addView(imageView);

Expand Down Expand Up @@ -126,11 +128,20 @@ protected PDFBody getBodyViews() {
tableView.addRow(tableRowView);
}
pdfBody.addView(tableView);

PDFLineSeparatorView lineSeparatorView3 = new PDFLineSeparatorView(getApplicationContext()).setBackgroundColor(Color.WHITE);
pdfBody.addView(lineSeparatorView3);

PDFTextView pdfIconLicenseView = new PDFTextView(getApplicationContext(), PDFTextView.PDF_TEXT_SIZE.H3);
Spanned icon8Link = Html.fromHtml("Icon from <a href='https://icons8.com'>https://icons8.com</a>");
pdfIconLicenseView.getView().setText(icon8Link);
pdfBody.addView(pdfIconLicenseView);

return pdfBody;
}

@Override
protected void onNextClicked(File savedPDFFile) {

// TODO Do what you want to do when Next button is pressed
}
}
4 changes: 2 additions & 2 deletions app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
4 changes: 2 additions & 2 deletions app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
Binary file modified app/src/main/res/mipmap-hdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/src/main/res/mipmap-hdpi/ic_launcher_round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/src/main/res/mipmap-mdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/src/main/res/mipmap-mdpi/ic_launcher_round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/src/main/res/mipmap-xhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions app/src/main/res/values/ic_launcher_background.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#C7EDE6</color>
</resources>
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<resources>
<string name="app_name">PDFCreatorAndroid</string>
<string name="app_name">PDF Creator Android</string>
<string name="text_paragraph_example">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</string>
</resources>
Binary file added example_screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons8-pdf-100.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions pdfcreator/src/main/res/layout/item_pdf_page.xml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/layoutPDFPrescriptionParent"
android:id="@+id/layoutPDFParent"
android:layout_width="@dimen/pdf_width"
android:layout_height="@dimen/pdf_height"
android:orientation="vertical"
android:paddingBottom="@dimen/pdf_margin_vertical"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingLeft="@dimen/pdf_margin_horizontal"
android:paddingRight="@dimen/pdf_margin_horizontal"
android:paddingTop="@dimen/pdf_margin_vertical">

<LinearLayout
android:id="@+id/layoutPDFPrescriptionChild"
android:id="@+id/layoutPDFChild"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
Expand Down
4 changes: 2 additions & 2 deletions pdfcreator/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<dimen name="pdf_width">595px</dimen>
<dimen name="pdf_height">842px</dimen>
<dimen name="pdf_margin_horizontal">10px</dimen>
<dimen name="pdf_margin_vertical">10px</dimen>
<dimen name="pdf_margin_horizontal">20px</dimen>
<dimen name="pdf_margin_vertical">30px</dimen>
<dimen name="text_size_large">20sp</dimen>
</resources>

0 comments on commit 762cded

Please sign in to comment.