• LANGUAGES
    • English English
    • Français Français

Sompom Digital Agency

Sompom Digital Agency

Sompom digital agency helps build Web & Mobile applications and games.

Kh/En (855) 98 900 736
En/Fr (855) 78 900 736

Email: contact@sompom.com

Sompom Digital Agency
Building 36, St 169, Phnom Penh

  • About Us
  • ACCUEIL
  • ACCUEIL
  • HOME
  • THE COMPANY
    • ABOUT US
    • CAREERS
    • HR OPPORTUNITIES
    • PROCESS
  • L’ AGENCE
    • A PROPOS
    • NOTRE MÉTHODE
  • Our Expertise
  • Microblogging
  • HR Opportunities
  • Careers
  • NOTRE MÉTHODE
  • NOTRE EXPERTISE
  • NOS PRODUITS
    • LES JEUX MOBILES
      • Garden quest family, Un puzzle addictif!
      • 1WORD, Le meilleur jeu de mots au monde!
      • Shapu, Le casse tete!
    • LES APPLICATIONS
  • Contact Us
  • Privacy Policy
  • OUR EXPERTISE
  • OUR PRODUCTS
    • GAMES
      • Garden family quest, A Match 3 Puzzle game!
      • 1WORD, The best word game ever!
      • Boru the Amazing running Ninja!
      • Shapu, The brain taker!
    • APPLICATIONS
  • EULA
  • CONTACTEZ NOUS
  • CONTACT US
  • MICROBLOGGING
  • Home
  • development
  • Archive from category "development"
February 7, 2023

Category: development

Daily Technical Note – TEXTURE COMPRESSION MEMO

  • 0
Sompom Team
Sunday, 17 July 2016 / Published in development, Mobile, unity

 

 

Texture Compression with Texture Package

The rule :

 

 

DEFAULT CONFIGURATION FOR SCENE

CANVAS SCALER

  • SCREEN SPACE – OVERLAY
  • SCALE WITH SCREEN SIZE
  • 1536X2048
  • MATCH WIDTH OR HEIGHT
  • MATCH=1
  • REFERENCE PPU=1

CAMERA

  • SIZE=1024

IMAGE

  • PPU=1

 

EQUATION

PIXELS PER UNIT =(VERTICAL/(ORTHOGRAPHIC SIZE*2))

 

uk football betting tips and predictions footballtipsbetting.com latest soccer betting tips uk
soccer scores live and football results livecomscores.com live football scores and soccer results

Configuration should be:

  • Sprite Renderer : 
    1. Glow : 32bit
    2. No Glow : Compress ETC 8bit
                                                            
  • Canvas :
    1. Glow : 32bit
    2. No Glow : Compress ETC 8bit

 

 

cameracanvascompressionconfigurationequationglowimagepixelspputexture

2 collection views in 1 view controller

  • 0
Sompom Team
Sunday, 17 July 2016 / Published in Android, Application, development

The idea:

We need to use 2 collection views in 1 view controller. First collection view has no header and the second has a header.

So we need to register header(nib) for the second collection view controller only.

 

 

 

 

By calling this code:

code1

best soccer dropping odds footballdroppingodds.com dropping odds movements and best football odds for today
today football predictions from the experts todayfootballpredictions.com best football predictions and betting tips

But the app crash after the above method invoke:

code4

code3

 

How you fix it?

 

Issues come from thie method below that set the header’s size for collection view:

(CGSize)collectionView:(UICollectionView *)collectionView layout:   (UICollectionViewLayout*)collectionViewLayout referenceSizeForHeaderInSection:(NSInteger)section

 

It will call the method below for providing header to all collection view:

(UICollectionReusableView *)collectionView:(UICollectionView *)collectionView viewForSupplementaryElementOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath{

Note: our first collection don’t register the header class but the method invoke for providing header for the first collection view too.

 

You can fix it by providing the header’s size of the first collection view with size 0.

Example:

code4

collection viewcontrolleriossolution

ANDROID PRODUCT FLAVORS – One project to rule them all

  • 0
Sompom Team
Friday, 07 August 2015 / Published in Android, Application, development, Mobile

Snippet for changing the language configuration from inside the app?

  • 0
Sompom Team
Friday, 07 August 2015 / Published in Android, Application, development, Mobile, Technology

 Change language in application

A usefull snippet if you want to change the locale of the app without having to go through the settings.

Configuration conf = getResources().getConfiguration();
 conf.locale = new Locale(iso3SupportLanguage[position]);
 DisplayMetrics metrics = new DisplayMetrics();
 WindowManager wm = (WindowManager) getActivity().getSystemService(Activity.WINDOW_SERVICE);
 wm.getDefaultDisplay().getMetrics(metrics);
 getResources().updateConfiguration(conf, metrics);
 Resources resources = new Resources(getActivity().getAssets(), metrics, conf);
 resources.updateConfiguration(conf, metrics);
androidApplicationassetscodeconfigurationlanguagelocalsnippet

Flow Layout in your face.

  • 0
Sompom Team
Friday, 07 August 2015 / Published in Android, Application, development, Technology

There is no native FlowLayout component, so for people. The following library gives a hand, but changing the space between category can be tricky, so we made it as default to get things done.

Take a look if you are interested:

https://github.com/hongyangAndroid/FlowLayout

androidflowFlowLayoutgithubjavalayoutnativenichesstrategic

Your apps is slow when building multi-dex

  • 0
Sompom Team
Friday, 07 August 2015 / Published in Android, Application, development, Technology

What is the problem?

Slow to build the app if the app is multi-dex (over 65K method). And the build time is taking more than 1mn.

 

What’s the solution?

We can configure to make build multi-dex faster. Your device just need to have Android Lollipop or up.

 

Configure gradle like below

android {
productFlavors {
// Define separate dev and prod product flavors.
dev {
// dev utilizes minSDKVersion = 21 to allow the Android gradle plugin
// to pre-dex each module and produce an APK that can be tested on
// Android Lollipop without time consuming dex merging processes.
minSdkVersion 21
}
prod {
// The actual minSdkVersion for the application.
minSdkVersion 14
}
}
...
buildTypes {
release {
runProguard true
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
}
dependencies {
compile 'com.android.support:multidex:1.0.0'
}

When building, select devDebug in Build variant

 

More detailed stuff from here: https://developer.android.com/studio/build/multidex.html

androidApplicationbuilddebugflavorslollipopminsdkversionmulti-dexpluginprogard

Recent Posts

  • Daily Technical Note – TEXTURE COMPRESSION MEMO

        Texture Compression with Texture ...
  • 2 collection views in 1 view controller

    The idea: We need to use 2 collection views in ...
  • Build on IOS running time…too long!!

    Hi, Build on IOS running time : too long. The w...
  • ANDROID PRODUCT FLAVORS – One project to rule them all

    What is the problem: First, If I want to build ...
  • Snippet for changing the language configuration from inside the app?

     Change language in application A usefull snipp...
  • About Us
  • ACCUEIL
  • ACCUEIL
  • HOME
  • THE COMPANY
    • ABOUT US
    • CAREERS
    • HR OPPORTUNITIES
    • PROCESS
  • L’ AGENCE
    • A PROPOS
    • NOTRE MÉTHODE
  • Our Expertise
  • Microblogging
  • HR Opportunities
  • Careers
  • NOTRE MÉTHODE
  • NOTRE EXPERTISE
  • NOS PRODUITS
    • LES JEUX MOBILES
      • Garden quest family, Un puzzle addictif!
      • 1WORD, Le meilleur jeu de mots au monde!
      • Shapu, Le casse tete!
    • LES APPLICATIONS
  • Contact Us
  • Privacy Policy
  • OUR EXPERTISE
  • OUR PRODUCTS
    • GAMES
      • Garden family quest, A Match 3 Puzzle game!
      • 1WORD, The best word game ever!
      • Boru the Amazing running Ninja!
      • Shapu, The brain taker!
    • APPLICATIONS
  • EULA
  • CONTACTEZ NOUS
  • CONTACT US
  • MICROBLOGGING

NEWSLETTER SIGNUP

By subscribing to our mailing list you will always be up to date with the latest news from us..

We will never spam!

GET IN TOUCH

Khmer & English :+(855) 98 900 736
English & French :+(855) 78 900 736
Email: contact@sompom.com

Sompom Digital Agency
Parkway Square, St 163, Phnom Penh, Cambodia

Open in Google Maps

Could not authenticate you.
  • Tweet
  • GET SOCIAL
Sompom Digital Agency

© 2022 All rights reserved. Sompom Web and Mobile agency.

TOP