dev goku

Ranch Hand
+ Follow
since Feb 13, 2017
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
4
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by dev goku

Alright, I'm a android developer, I'm trying to make the part of text clickable that matches the regex by getting start and ending index of the text from a sentence, you can find the strings that needs to be found (*1111,*1111#,numbers, url). You can also see the regex for the individual words and I combined them to be able to use it.
5 years ago
I want to get the specific words from the given example sentence that match the combined regex.
5 years ago
I've been trying to get the start and end position of string from a sentence using Matcher Class . so far I have wrote the following regex for finding the following strings:


this works fine when a single word is entered but not when i try to find those words in a sentence by combining the regex like this,

Combined Regex


I don't know what i'm doing wrong and i assume there should be a better way for implementing this.

The Code


this is used in android , the found string gets clickable by using ClickableSpan Class.

Examlple String


5 years ago
Actually,I have cleared the issue myself.
So I have this json,


and i have to parse this json in a loop and add to an List<SubCats> object ,and below shown is that object

public SubCats(String category_id, String category_name, String category_network,
                  String category_parent, List<SubCats> childSubCatsList, List<Packs> packsList) {
       this.category_id = category_id;
       this.category_name = category_name;
       this.category_network = category_network;
       this.category_parent = category_parent;
       this.subCatsList = subCatsList;
       this.packsList = packsList;
   }

and the json could go bigger, and i couldn't get it done so far,could any one help me?
The click response is slow on the first click,but its good on further clicks and the fragment is added quickly.

perform timings of each line of code to see which one takes a long time.



How do i do it though ?
6 years ago

Tim Moores wrote:Which line(s) of code are slow, specifically?



The fragment transition is slow, so I think the transaction codes are slow.. What do you think?
6 years ago
So I have a recyclerview in a fragment with child view consisting of some textviews inside a card view and I'm going to make a fragment transaction with bundles when the recyclerview gets clicked ,But the problem is the click response is so slow,it takes up to a second or two to complete the transaction ,and i have used in a thread too,but the problem persists .You can find the complete code below..Thanks...

Recyclerview Child view



Java --Click Listener



and the fragment that is going to be created ,usually populates some textview and imageviews by the data from bundle and not much of a code here.

6 years ago
Just Found the answer, I thought using 500*500 image won't decrease performance ,guess i was wrong ,i had to redcue it to 100*100.
6 years ago
I have this big layout  which is not scrolling smoothly ,the layout consisting slideshow library, recyclerview within cardview and cardview within recyclerview(horizontal scroll like in playstore) each contains a dozen of 500*500 images and text  offline data ,all wrapped in Nestedscrollview at first and used but not worked , later i replaced that with a regular scrollview for figuring out myself and also tried using AysncTask too but ,failed at it  so my problem is for some reason the views are not scrolling smoothly and lags heavly.

6 years ago
We can delete map values by keys,What i am hoping to get is that when i delete a value i want the(some ways to do ordering) following values to move up and link with those keys.

6 years ago
I use it to get data for my recyclerview by serialToId Hashmap ,after i delete a item in RV ,I have to delete the data hashmap also by the serial key ,but the position in Rv is identified by serial No.So, I only have to delete the value by the serial key and not the key itself,and want the values move to the above positions..

HashMap's have no ordering.



Is there any way ?
6 years ago
I hava a hashmap,
i want to delete a Key's value and fill the value by the next key's value automatically,
and remove the last unused key automatically,is this possible ? or is there any work around ?

6 years ago