Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions HelpStackExample/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
android:minSdkVersion="9"
android:targetSdkVersion="22" />

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.INTERNET" />

<application
android:allowBackup="true"
Expand All @@ -24,7 +24,9 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<meta-data android:name="com.crashlytics.ApiKey" android:value="1d530866e0cb30a5451eee4b86edfa0e9f13de4a"/>
<meta-data
android:name="io.fabric.ApiKey"
android:value="1d530866e0cb30a5451eee4b86edfa0e9f13de4a" />
</application>

</manifest>
23 changes: 22 additions & 1 deletion HelpStackExample/build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,30 @@
buildscript {
repositories {
jcenter();
maven { url 'https://maven.fabric.io/public' }
}

dependencies {
classpath 'io.fabric.tools:gradle:1.20.1'
classpath 'com.google.gms:google-services:2.0.0-beta2'
}
}

apply plugin: 'com.android.application'
apply plugin: 'io.fabric'

repositories {
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
}

dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
compile project(':helpstack')

compile 'com.android.support:appcompat-v7:23.0.0'
compile('com.crashlytics.sdk.android:crashlytics:2.6.1@aar') {
transitive = true;
}
}

android {
Expand Down Expand Up @@ -40,4 +60,5 @@ android {
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
}

}
Binary file removed HelpStackExample/libs/crashlytics.jar
Binary file not shown.
16 changes: 12 additions & 4 deletions HelpStackExample/res/layout/fragment_main.xml
Original file line number Diff line number Diff line change
@@ -1,19 +1,27 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:gravity="center"
tools:context="com.example.helpstackexample.MainActivity$PlaceholderFragment" >

<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="30dp"
android:text="@string/show_help" />

</RelativeLayout>

<Button
android:id="@+id/btnClearCache"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:text="@string/clear_cache" />

</LinearLayout>
1 change: 1 addition & 0 deletions HelpStackExample/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
<string name="hello_world">Hello world!</string>
<string name="action_settings">Settings</string>
<string name="show_help">Show Help</string>
<string name="clear_cache">Clear Cache</string>

</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,25 @@

import android.app.Application;

import com.crashlytics.android.Crashlytics;
import com.tenmiles.helpstack.HSHelpStack;
import com.tenmiles.helpstack.gears.HSEmailGear;

import io.fabric.sdk.android.Fabric;

public class HSApplication extends Application {

HSHelpStack helpStack;
public static HSHelpStack helpStack;

@Override
public void onCreate() {
super.onCreate();
@Override
public void onCreate() {
super.onCreate();

helpStack = HSHelpStack.getInstance(this);
Fabric.with(this, new Crashlytics());
helpStack = HSHelpStack.getInstance(this);

HSEmailGear emailGear = new HSEmailGear("foo@bar.com", R.xml.articles);
helpStack.setGear(emailGear);
HSEmailGear emailGear = new HSEmailGear("foo@bar.com", R.xml.articles);
helpStack.setGear(emailGear);

/* Uncomment the following to use the HappyFox gear with appropriate support email address */

Expand All @@ -28,5 +32,7 @@ public void onCreate() {
// "<Priority ID>");
//
// helpStack.setGear(happyfoxGear);
}

}

}
97 changes: 51 additions & 46 deletions HelpStackExample/src/com/example/helpstackexample/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,61 +10,66 @@
import android.view.View.OnClickListener;
import android.view.ViewGroup;

import com.crashlytics.android.Crashlytics;
import com.tenmiles.helpstack.HSHelpStack;

public class MainActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Crashlytics.start(this);
setContentView(R.layout.activity_main);
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

if (savedInstanceState == null) {
getSupportFragmentManager().beginTransaction().add(R.id.container, new PlaceholderFragment()).commit();
}

getSupportActionBar().setDisplayHomeAsUpEnabled(false);
getSupportActionBar().setDisplayUseLogoEnabled(false);
getSupportActionBar().setIcon(R.color.hs_transparent_color);
}
if (savedInstanceState == null) {
getSupportFragmentManager().beginTransaction().add(R.id.container, new PlaceholderFragment()).commit();
}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
getSupportActionBar().setDisplayHomeAsUpEnabled(false);
getSupportActionBar().setDisplayUseLogoEnabled(false);
getSupportActionBar().setIcon(R.color.hs_transparent_color);
}

@Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.main, menu);
return true;
}

/**
* A placeholder fragment containing a simple view.
*/
public static class PlaceholderFragment extends Fragment {
@Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}

public PlaceholderFragment() {
}
/**
* A placeholder fragment containing a simple view.
*/
public static class PlaceholderFragment extends Fragment {

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_main, container, false);
rootView.findViewById(R.id.button1).setOnClickListener(new OnClickListener() {

@Override
public void onClick(View v) {
HSHelpStack.getInstance(getActivity()).showHelp(getActivity());
}
});
return rootView;
}
}
public PlaceholderFragment() {
}

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_main, container, false);
rootView.findViewById(R.id.button1).setOnClickListener(new OnClickListener() {

@Override
public void onClick(View v) {
HSHelpStack.getInstance(getActivity()).showHelp(getActivity());
}
});
rootView.findViewById(R.id.btnClearCache).setOnClickListener(new OnClickListener() {

@Override
public void onClick(View v) {
HSHelpStack.getInstance(getActivity()).clear(getActivity());
}
});
return rootView;
}
}

}
11 changes: 1 addition & 10 deletions Themes/HSDarkTheme/values/hs_custom_theme.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,7 @@
<style name="hs_messageEditTextStyle" parent="hs_editText_defaultStyle"></style>

<!-- DRAWABLES
Defining the drawable icons used in the project, override the drawable to give your own custom icons

Attachment icon used in New Issue screen, and chat screen to show attachments -->
<drawable name="hs_attachment_icon">@drawable/hs_attachment_img</drawable>

<!-- Search icon used in search menu -->
<drawable name="hs_search_icon">@drawable/hs_search_img_light</drawable>

<!-- Disclosure icon used in main list view -->
<drawable name="hs_disclosure_next">@drawable/hs_disclosure_img</drawable>
Defining the drawable icons used in the project, override the drawable to give your own custom icons -->

<!-- Add attachment icon used in issue detail screen - add reply -->
<drawable name="hs_add_attachment">@drawable/hs_add_attachment_img</drawable>
Expand Down
11 changes: 1 addition & 10 deletions Themes/HSFacebookTheme/values/hs_custom_theme.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,7 @@
<style name="hs_messageEditTextStyle" parent="hs_editText_defaultStyle"></style>

<!-- DRAWABLES
Defining the drawable icons used in the project, override the drawable to give your own custom icons

Attachment icon used in New Issue screen, and chat screen to show attachments -->
<drawable name="hs_attachment_icon">@drawable/hs_attachment_img</drawable>

<!-- Search icon used in search menu -->
<drawable name="hs_search_icon">@drawable/hs_search_img_light</drawable>

<!-- Disclosure icon used in main list view -->
<drawable name="hs_disclosure_next">@drawable/hs_disclosure_img</drawable>
Defining the drawable icons used in the project, override the drawable to give your own custom icons -->

<!-- Add attachment icon used in issue detail screen - add reply -->
<drawable name="hs_add_attachment">@drawable/hs_add_attachment_img</drawable>
Expand Down
11 changes: 1 addition & 10 deletions Themes/HSHalloweenTheme/values/hs_custom_theme.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,7 @@
<style name="hs_messageEditTextStyle" parent="hs_editText_defaultStyle"></style>

<!-- DRAWABLES
Defining the drawable icons used in the project, override the drawable to give your own custom icons

Attachment icon used in New Issue screen, and chat screen to show attachments -->
<drawable name="hs_attachment_icon">@drawable/hs_attachment_img</drawable>

<!-- Search icon used in search menu -->
<drawable name="hs_search_icon">@drawable/hs_search_img_light</drawable>

<!-- Disclosure icon used in main list view -->
<drawable name="hs_disclosure_next">@drawable/hs_disclosure_img</drawable>
Defining the drawable icons used in the project, override the drawable to give your own custom icons -->

<!-- Add attachment icon used in issue detail screen - add reply -->
<drawable name="hs_add_attachment">@drawable/hs_add_attachment_img</drawable>
Expand Down
11 changes: 1 addition & 10 deletions Themes/HSLightTheme/values/hs_custom_theme.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,7 @@
<style name="hs_messageEditTextStyle" parent="hs_editText_defaultStyle"></style>

<!-- DRAWABLES
Defining the drawable icons used in the project, override the drawable to give your own custom icons

Attachment icon used in New Issue screen, and chat screen to show attachments -->
<drawable name="hs_attachment_icon">@drawable/hs_attachment_img</drawable>

<!-- Search icon used in search menu -->
<drawable name="hs_search_icon">@drawable/hs_search_img</drawable>

<!-- Disclosure icon used in main list view -->
<drawable name="hs_disclosure_next">@drawable/hs_disclosure_img</drawable>
Defining the drawable icons used in the project, override the drawable to give your own custom icons -->

<!-- Add attachment icon used in issue detail screen - add reply -->
<drawable name="hs_add_attachment">@drawable/hs_add_attachment_img</drawable>
Expand Down
11 changes: 1 addition & 10 deletions Themes/HSPathTheme/values/hs_custom_theme.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,7 @@
<style name="hs_messageEditTextStyle" parent="hs_editText_defaultStyle"></style>

<!-- DRAWABLES
Defining the drawable icons used in the project, override the drawable to give your own custom icons

Attachment icon used in New Issue screen, and chat screen to show attachments -->
<drawable name="hs_attachment_icon">@drawable/hs_attachment_img</drawable>

<!-- Search icon used in search menu -->
<drawable name="hs_search_icon">@drawable/hs_search_img_light</drawable>

<!-- Disclosure icon used in main list view -->
<drawable name="hs_disclosure_next">@drawable/hs_disclosure_img</drawable>
Defining the drawable icons used in the project, override the drawable to give your own custom icons -->

<!-- Add attachment icon used in issue detail screen - add reply -->
<drawable name="hs_add_attachment">@drawable/hs_add_attachment_img</drawable>
Expand Down
11 changes: 1 addition & 10 deletions Themes/HSPinterestTheme/values/hs_custom_theme.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,7 @@
<style name="hs_messageEditTextStyle" parent="hs_editText_defaultStyle"></style>

<!-- DRAWABLES
Defining the drawable icons used in the project, override the drawable to give your own custom icons

Attachment icon used in New Issue screen, and chat screen to show attachments -->
<drawable name="hs_attachment_icon">@drawable/hs_attachment_img</drawable>

<!-- Search icon used in search menu -->
<drawable name="hs_search_icon">@drawable/hs_search_img_light</drawable>

<!-- Disclosure icon used in main list view -->
<drawable name="hs_disclosure_next">@drawable/hs_disclosure_img</drawable>
Defining the drawable icons used in the project, override the drawable to give your own custom icons -->

<!-- Add attachment icon used in issue detail screen - add reply -->
<drawable name="hs_add_attachment">@drawable/hs_add_attachment_img</drawable>
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.2.3'
classpath 'com.android.tools.build:gradle:2.2.3'
}
}

Expand Down
Loading