├── .classpath ├── .gitignore ├── .project ├── .settings └── org.eclipse.jdt.core.prefs ├── AndroidManifest.xml ├── LICENSE ├── README.md ├── Screenshot_2014-07-23-20-41-05.png ├── Screenshot_2014-07-23-20-41-13.png ├── Screenshot_2014-07-23-20-41-27.png ├── Screenshot_2014-07-23-22-32-27.png ├── Screenshot_2014-07-23-23-06-04.png ├── ic_launcher-web.png ├── libs └── android-support-v4.jar ├── proguard-project.txt ├── project.properties ├── res ├── drawable-hdpi │ ├── android.png │ └── ic_launcher.png ├── drawable-mdpi │ └── ic_launcher.png ├── drawable-xhdpi │ └── ic_launcher.png ├── drawable-xxhdpi │ └── ic_launcher.png ├── layout │ ├── activity_example.xml │ ├── activity_main.xml │ ├── hashtag_listview.xml │ └── tagviewrow.xml ├── menu │ └── main.xml ├── values-sw600dp │ └── dimens.xml ├── values-sw720dp-land │ └── dimens.xml ├── values-v11 │ └── styles.xml ├── values-v14 │ └── styles.xml └── values │ ├── dimens.xml │ ├── strings.xml │ └── styles.xml └── src └── com └── hashtagandroid ├── HashTagActivity.java ├── ListViewHashTag.java ├── MainActivity.java ├── TagSelectingTextview.java ├── adaptors └── HashTagAdaptor.java └── interfaces └── TagClick.java /.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Built application files 2 | *.apk 3 | *.ap_ 4 | 5 | # Files for the Dalvik VM 6 | *.dex 7 | 8 | # Java class files 9 | *.class 10 | 11 | # Generated files 12 | bin/ 13 | gen/ 14 | 15 | # Gradle files 16 | .gradle/ 17 | build/ 18 | 19 | # Local configuration file (sdk path, etc) 20 | local.properties 21 | 22 | # Proguard folder generated by Eclipse 23 | proguard/ 24 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | MainActivity 4 | 5 | 6 | 7 | 8 | 9 | com.android.ide.eclipse.adt.ResourceManagerBuilder 10 | 11 | 12 | 13 | 14 | com.android.ide.eclipse.adt.PreCompilerBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.jdt.core.javabuilder 20 | 21 | 22 | 23 | 24 | com.android.ide.eclipse.adt.ApkBuilder 25 | 26 | 27 | 28 | 29 | 30 | com.android.ide.eclipse.adt.AndroidNature 31 | org.eclipse.jdt.core.javanature 32 | 33 | 34 | -------------------------------------------------------------------------------- /.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 3 | org.eclipse.jdt.core.compiler.compliance=1.6 4 | org.eclipse.jdt.core.compiler.source=1.6 5 | -------------------------------------------------------------------------------- /AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 10 | 11 | 16 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 29 | 30 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Ramesh M Nair 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Hash-Tags-Android 2 | ================= 3 | 4 | This is a sample of handling hash tags that contain in a text,the tags are clickable and user can do specifc actions for the corresponding hash tags.In this example we can change color and also can give underline to hash tags according to the usecase. 5 | 6 | Hash-Tags: how to use 7 | ------------------------ 8 | 9 | 10 | 1. Set Hash Tag Handler 11 | 12 | ```java 13 | 14 | TagSelectingTextview mTagSelectingTextview=new TagSelectingTextview(); 15 | 16 | 17 | ``` 18 | 19 | 20 | 21 | 2. For setting data form html content 22 | 23 | ```java 24 | 25 | mHashTagTextView = (TextView) findViewById(R.id.hashtag_textview); 26 | mHashTagTextView.setMovementMethod(LinkMovementMethod.getInstance()); 27 | mHashTagTextView.setText(mTagSelectingTextview.addClickablePart( 28 | testText, this, mHyperlinkStatus, hashTagColor), 29 | BufferType.SPANNABLE) 30 | 31 | ``` 32 | 33 | 34 | 3. For setting data form html content 35 | 36 | ```java 37 | 38 | mHashTagTextView.setText(mTagSelectingTextview.addClickablePart( 39 | Html.fromHtml(testText).toString(), this, mhyperlickStatus, hashtagColor), 40 | BufferType.SPANNABLE); 41 | 42 | ``` 43 | 44 | 45 | 46 | ## VIDEO ([SAMPLE](https://www.youtube.com/watch?v=Bp7aiqxKhv0&feature=youtu.be)) 47 | 48 | 49 | 50 | 51 | 52 | 53 | ## License 54 | 55 | The MIT License (MIT) 56 | 57 | Copyright (c) 2014 Ramesh M Nair 58 | 59 | Permission is hereby granted, free of charge, to any person obtaining a copy 60 | of this software and associated documentation files (the "Software"), to deal 61 | in the Software without restriction, including without limitation the rights 62 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 63 | copies of the Software, and to permit persons to whom the Software is 64 | furnished to do so, subject to the following conditions: 65 | 66 | The above copyright notice and this permission notice shall be included in all 67 | copies or substantial portions of the Software. 68 | 69 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 70 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 71 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 72 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 73 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 74 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 75 | SOFTWARE. 76 | 77 | 78 | 79 | 80 | -------------------------------------------------------------------------------- /Screenshot_2014-07-23-20-41-05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rameshvoltella/Hash-Tags-Android/64037bb337767cba34036c6d70f8decb68e98c9e/Screenshot_2014-07-23-20-41-05.png -------------------------------------------------------------------------------- /Screenshot_2014-07-23-20-41-13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rameshvoltella/Hash-Tags-Android/64037bb337767cba34036c6d70f8decb68e98c9e/Screenshot_2014-07-23-20-41-13.png -------------------------------------------------------------------------------- /Screenshot_2014-07-23-20-41-27.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rameshvoltella/Hash-Tags-Android/64037bb337767cba34036c6d70f8decb68e98c9e/Screenshot_2014-07-23-20-41-27.png -------------------------------------------------------------------------------- /Screenshot_2014-07-23-22-32-27.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rameshvoltella/Hash-Tags-Android/64037bb337767cba34036c6d70f8decb68e98c9e/Screenshot_2014-07-23-22-32-27.png -------------------------------------------------------------------------------- /Screenshot_2014-07-23-23-06-04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rameshvoltella/Hash-Tags-Android/64037bb337767cba34036c6d70f8decb68e98c9e/Screenshot_2014-07-23-23-06-04.png -------------------------------------------------------------------------------- /ic_launcher-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rameshvoltella/Hash-Tags-Android/64037bb337767cba34036c6d70f8decb68e98c9e/ic_launcher-web.png -------------------------------------------------------------------------------- /libs/android-support-v4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rameshvoltella/Hash-Tags-Android/64037bb337767cba34036c6d70f8decb68e98c9e/libs/android-support-v4.jar -------------------------------------------------------------------------------- /proguard-project.txt: -------------------------------------------------------------------------------- 1 | # To enable ProGuard in your project, edit project.properties 2 | # to define the proguard.config property as described in that file. 3 | # 4 | # Add project specific ProGuard rules here. 5 | # By default, the flags in this file are appended to flags specified 6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt 7 | # You can edit the include path and order by changing the ProGuard 8 | # include property in project.properties. 9 | # 10 | # For more details, see 11 | # http://developer.android.com/guide/developing/tools/proguard.html 12 | 13 | # Add any project specific keep options here: 14 | 15 | # If your project uses WebView with JS, uncomment the following 16 | # and specify the fully qualified class name to the JavaScript interface 17 | # class: 18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 19 | # public *; 20 | #} 21 | -------------------------------------------------------------------------------- /project.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system edit 7 | # "ant.properties", and override values to adapt the script to your 8 | # project structure. 9 | # 10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): 11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt 12 | 13 | # Project target. 14 | target=android-19 15 | -------------------------------------------------------------------------------- /res/drawable-hdpi/android.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rameshvoltella/Hash-Tags-Android/64037bb337767cba34036c6d70f8decb68e98c9e/res/drawable-hdpi/android.png -------------------------------------------------------------------------------- /res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rameshvoltella/Hash-Tags-Android/64037bb337767cba34036c6d70f8decb68e98c9e/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rameshvoltella/Hash-Tags-Android/64037bb337767cba34036c6d70f8decb68e98c9e/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rameshvoltella/Hash-Tags-Android/64037bb337767cba34036c6d70f8decb68e98c9e/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rameshvoltella/Hash-Tags-Android/64037bb337767cba34036c6d70f8decb68e98c9e/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /res/layout/activity_example.xml: -------------------------------------------------------------------------------- 1 | 11 | 12 | 17 | 18 | 26 | 27 | 33 | 34 | 39 | 40 |