Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

164
Visualizações
Passing a value to layout file

I'm trying to display certain tweets using TweetView with fabric but I'm having trouble figuring out how to send the value of the tweetID to the layout file

here's part of the xml:

<com.twitter.sdk.android.tweetui.TweetView
    android:id="@+id/title"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    twittersdk:tw__tweet_id="?????"/>

here is where I have the value of the tweetID

private void render(Marker marker, View view) {
        ScreenResolution screenRes = deviceDimensions();
        String title = marker.getTitle();
        long tweetID = Long.parseLong(marker.getSnippet());
        }
over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

You cannot pass a value to layout file, instead you can set its value in .java.

As per your need, you may use like:

final LinearLayout tweet_layout
            = (LinearLayout) findViewById(R.id.tweet_layout);

    final List<Long> tweetIds = Arrays.asList(your_tweet_id);
    TweetUtils.loadTweets(tweetIds, new Callback<Tweet>() {
        @Override
        public void success(Result<Tweet> result) {
            for (Tweet tweet : result.data) {
                tweet_layout.addView(new TweetView(TweetActivity.this, tweet));
            }
        }

        @Override
        public void failure(TwitterException exception) {
            // Do something here.
        }
    });
}
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda